ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Map rotation in rviz during gmapping

asked 2019-03-27 05:39:24 -0600

Hemanth gravatar image

updated 2019-03-28 02:24:30 -0600

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

edit retag flag offensive close merge delete

Comments

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.

jayess gravatar image jayess  ( 2019-03-27 07:20:06 -0600 )edit

I have updated the question with the text. Thank you for the suggestion.

Hemanth gravatar image Hemanth  ( 2019-03-27 07:46:37 -0600 )edit

maybe the rplidar is connected to the robot in an inverted direction?

pmuthu2s gravatar image pmuthu2s  ( 2019-03-27 08:41:18 -0600 )edit

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.

billy gravatar image billy  ( 2019-03-27 16:50:49 -0600 )edit

It could also be that the robot is moving/turning too fast. Try moving slowly while mapping.

jayess gravatar image jayess  ( 2019-03-27 16:56:01 -0600 )edit

You are right billy, the laser scan is also rotating. I have updated the question.

Hemanth gravatar image Hemanth  ( 2019-03-28 02:24:13 -0600 )edit

@hemant I'm going through the same problem. Did you solve this problem? If yes, Can you tell me how did you solve it??

Umar_Pirjade gravatar image Umar_Pirjade  ( 2020-12-13 19:06:00 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-05-15 03:49:24 -0600

Tom Moore gravatar image

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?

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2019-03-27 05:39:24 -0600

Seen: 1,669 times

Last updated: May 15 '19