Lidar scanner does not match the map
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:
Here is when I took the lidar turning left or right mapping:
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:
I was used rf2o_laser_odometry and still have this problem. but the map does not follow the scanner to circle.
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.
What is your odometry source "link2_broadcaster"?
I updated my source about (link2_broadcaster).
Iam not big in python but in your odom.py 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?).
.i change to use rf2o_laser_odometry and still have this problem. but the map does not follow the scanner to circle
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.