Ask Your Question

Laser Scan is centered around the grid and does not move with Robot Footprint

asked 2020-11-03 07:08:22 -0500

mandal gravatar image

I am a bit new to ROS and facing a few issues.

I have generated a map from Roomba and Ydlidar X4 Lidar using RPi 4. When I run the ROS navigation stack and rviz, I see that the laser scan is always centered around the grid. When I use 2D pose estimate to move the Robot Location to the desired place on the map, the Laser Scans do not move along with the Robot but still is centered around the grid.

Not sure where I am going wrong. Any suggestion would of great help. Thank you.

edit retag flag offensive close merge delete



Run rosrun tf view_frames. Do you see a connection between the frame associated with your lidar and the base_link frame of the robot?

JackB gravatar image JackB  ( 2020-11-03 09:29:34 -0500 )edit

Can you run ros-blessed to get an ascii rendering of the TF tree and paste it here? Also, can you look at the laser scan topic and verify which frame it species in the header (first tab in ros-blesssed or use rostopic echo)

chfritz gravatar image chfritz  ( 2020-11-03 09:31:50 -0500 )edit
  1. For the view Frames I obtained

odom->base_footprint->base_link->map odom->base_footprint->base_link->laser_frame odom->base_footprint->base_link-> all other cliff, wheel, gyro sensors

  1. Laser Scan topic shows frame as "map". I had kept it "laser_frame" before but since I wanted to display the map and the laser scan overlapping I had changed that frame to map.
mandal gravatar image mandal  ( 2020-11-03 09:38:20 -0500 )edit

The laser scan frame should be laser_frame not map. The visualizer, if the rest of you tf tree is setup properly, will transform it in the proper way to visualize it, you do not need to change anything for that. That being said, it is hard to parse what your frames are. Is there a more clear way you can show it please?

JackB gravatar image JackB  ( 2020-11-03 12:55:48 -0500 )edit

Also take a look at REP105 to get your foot in the door regarding how the tfs should be setup for a mobile platform

JackB gravatar image JackB  ( 2020-11-03 12:56:16 -0500 )edit

I was able to make changes to the transform tree now. It worked. There was a loop in the transform tree. After reading the REP105 article mentioned I changed it. Thank you so much JackB and chfritz. The Robot is able to move towards the goal slowly.

Here is the new transform Tree

mandal gravatar image mandal  ( 2020-11-04 08:08:02 -0500 )edit

@mandal glad we could help! Condensed the comments here to an answer. Feel free to answer your own question too!

JackB gravatar image JackB  ( 2020-11-04 12:00:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-04 11:59:05 -0500

JackB gravatar image

Condensing comment section into an answer:

Read REP-105 which covers how a mobile robot's tf tree should be structured before you do anything. Then to visualize the output of your tf tree run the command rosrun tf view_frames (or use ros-blessed like @chfritz said?). By visually inspecting this you can get to the root of any fundamental problems with your tf tree.

Also, DO NOT change the frame of your LIDAR scan. The data produced by the laser scanner is always produced in its own laser_link frame. If you tf tree is setup correctly then RVIZ will be able to transform your laser scan into whatever frame you would like to visualize it in.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-11-03 07:08:22 -0500

Seen: 90 times

Last updated: Nov 04 '20