Rosanswers logo

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

image description

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 image description

Originally posted by Hemanth on ROS Answers with karma: 13 on 2019-03-27

Post score: 0

Original comments

Comment by jayess on 2019-03-27:
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.

Comment by Hemanth on 2019-03-27:
I have updated the question with the text. Thank you for the suggestion.

Comment by pmuthu2s on 2019-03-27:
maybe the rplidar is connected to the robot in an inverted direction?

Comment by billy on 2019-03-27:
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.

Comment by jayess on 2019-03-27:
It could also be that the robot is moving/turning too fast. Try moving slowly while mapping.

Comment by Hemanth on 2019-03-28:
You are right billy, the laser scan is also rotating. I have updated the question.

Comment by Umar_Pirjade on 2020-12-13:
@Hemant I'm going through the same problem. Did you solve this problem? If yes, Can you tell me how did you solve it??


1 Answer 1


Rosanswers logo

Please update the question as follows:

  • Use the code formatting (little icon with zeros and ones) to format your EKF configuration
  • Also include your gmapping config
  • Please include sample messages from all sensor inputs. Again, use the code formatting button.

Just from a quick glance, the only question I have so far is why are you fusing the absolute yaw data from your IMU? And are you sure the signs for your IMU data are correct?

Originally posted by Tom Moore with karma: 13689 on 2019-05-15

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.