Map rotation in rviz during gmapping
Hello guys,
I am running the gmapping algorithm with the required transforms and the scan and odom topics using rplidar. While i am able to get the map, whenever i turn the map also turns in rviz creating some overlap between two different maps. I dont know if any of the gmapping parameters or robot_localization ekf paramaters need to be changed. It would be very helpful if someone can point this out. Also, i am not sure if there is an option in rviz or something to do this either. I would be happy to provide with any other information that is required.
Here is my ekf launch file parameters in a yaml file.C:\fakepath\rl_param.png
frequency: 50
two_d_mode: true
diagnostics_agg: true
odom0: /raw_odom
odom0_config: [false, false, false, false, false, false, true, true, false, false, false, true, false, false, false]
odom0_differential: true
odom0_relative: false
imu0: /imu/data
imu0_config: [false, false, false, false, false, true, false, false, false, false, false, true, false, false, false]
imu0_differential: true
imu0_relative: true
odom_frame: odom
base_link_frame: base_link
world_frame: odom
The laser scan in rviz also rotates not just when i turn the robot but also when im moving it forward or backward. Looks like there is some odom or tf issue as billy suggested. Please help me diagnose it. What do i need to check other than tf_tree. Here is my tf_tree
Please don't use an image to display text. Images are not searchable and people cannot copy and paste the text from the image. Please update your question with a copy and paste of the text instead.
I have updated the question with the text. Thank you for the suggestion.
maybe the rplidar is connected to the robot in an inverted direction?
This likely isn't a gmapping problem, It's more likely and ODOM issue or TF issue.For now stop trying to do mapping and just watch the robot and laser scan in RIVZ. If features in the laser scan(like corner of room) move around in RVIZ when you rotate the robot, it means a TF or ODOM not working properly. It may be a ODOM calculation issue, or scanner TF is inverted as suggested by pmuthu2s. Figure out where issue is and update question.
It could also be that the robot is moving/turning too fast. Try moving slowly while mapping.
You are right billy, the laser scan is also rotating. I have updated the question.
@hemant I'm going through the same problem. Did you solve this problem? If yes, Can you tell me how did you solve it??