Laser Scan is centered around the grid and does not move with Robot Footprint
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.
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?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)
odom->base_footprint->base_link->map odom->base_footprint->base_link->laser_frame odom->base_footprint->base_link-> all other cliff, wheel, gyro sensors
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?
Also take a look at REP105 to get your foot in the door regarding how the tfs should be setup for a mobile platform
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 https://filebin.net/2cmayvsltzg92e7e/...
@mandal glad we could help! Condensed the comments here to an answer. Feel free to answer your own question too!