whats's wrong with this frames generated by tf2_tools frames.pdf

asked 2023-08-08 01:51:35 -0500

the_one gravatar image

Hi all, I have been trying to find what is the reason - when i move the bot in rviz, the map also moves. I generated a frames.pdf which u can find below using rosrun tf2_tools frames.pdf . All i can see that the static frames(base_link, base_footprint, Chassis, camera_link_optical, mount_link and lidar_link) are at average rate of 10000 and no values on transforms on all of those. I don't know why it behaves like this. And this is the project link for my 4wheel_bot. If anyone find out the reason, would be glad. Thank you

image description

edit retag flag offensive close merge delete

Comments

What's your fixed frame in rviz? You should set the fixed frame as map so that the map won't move.

Chan gravatar image Chan  ( 2023-08-10 07:39:55 -0500 )edit

The map moves when i changed the "odom" frame to the "map" frame in rviz.

the_one gravatar image the_one  ( 2023-08-10 21:16:09 -0500 )edit

I just checked your sample video in your github. The map is not moving, only the lidar scans are moving and are not aligned with the map. It means, the localization is not working.

Chan gravatar image Chan  ( 2023-08-11 01:36:09 -0500 )edit

But before the localisation, i have to generate a map of the robot environment. That's what i am trying to generate a map with the lidar/laser sensor.

the_one gravatar image the_one  ( 2023-08-11 08:05:40 -0500 )edit

Localisation is also needed when you map the environment. slam_gmapping takes into account the odometry data (rotation of wheel joints) for localisation. It looks like the odom data is messed up. I have never worked with 4 wheeled robot diff drive and I think it might be the issue. I would suggest you to check odom data while moving the robot. I digged in a bit for a 4 wheeled robot controller and it looks like you can use skid steer driving controller.

Chan gravatar image Chan  ( 2023-08-11 08:34:23 -0500 )edit