Lidar scanner does not match the map

asked 2021-12-06 02:05:28 -0500

alanotmt gravatar image

updated 2021-12-08 01:40:31 -0500

I am new to the ros system. I bought the lidar only and I want to test it on my car. First met the problem is lidar mapping to the map.

Here is when I took the lidar moving forward and back mapping: image description

Here is when I took the lidar turning left or right mapping: image description

The map direction is not fixed,

I use these commands:

roslaunch delta_lidar delta_lidar.launch

rosrun gmapping slam_gmapping scan:=scan _linearUpdate:=0.0 _angularUpdate:=0.0

rosrun rviz rviz

There are my tf tree and what I got in mapping:

image description image description

I was used rf2o_laser_odometry and still have this problem. but the map does not follow the scanner to circle.

image description

Also, I used the turtlebot3 sample code of navigation and Lidar was working, but the mapping does not match the map. moreover, the robot model not moving in rviz. Here is the video when i navigate

I would be glad if someone gives me any idea.

edit retag flag offensive close merge delete


What is your odometry source "link2_broadcaster"?

Dragonslayer gravatar image Dragonslayer  ( 2021-12-06 04:16:32 -0500 )edit

I updated my source about (link2_broadcaster).

alanotmt gravatar image alanotmt  ( 2021-12-06 19:22:16 -0500 )edit

Iam not big in python but in your you dont seem to be getting real robot data into the algorithm. It seems to be hard coded. vx, vy, vth you should get from your basecontroller/diff_drive_controller. However I would assume the 0.1, -0.1, 0.1 data should give you some movement (circle?).

Dragonslayer gravatar image Dragonslayer  ( 2021-12-07 02:55:17 -0500 )edit

.i change to use rf2o_laser_odometry and still have this problem. but the map does not follow the scanner to circle

alanotmt gravatar image alanotmt  ( 2021-12-08 01:30:16 -0500 )edit

I would suggest displaying all relevant frames in rviz to see where the problem is. Also what does the tf tree look now with using rf2o_laser_odometry? Are the topics subscribed AND published correctly and publishing data? In the end this should work, basically. Likely some mixup somewhere.

Dragonslayer gravatar image Dragonslayer  ( 2021-12-08 16:09:55 -0500 )edit