laserscan move with robot in RViz

asked 2019-07-16 14:02:10 -0500

Youssef_Lah gravatar image

updated 2022-04-17 11:06:38 -0500

lucasw gravatar image

Hi ROS community, My problem is that when i move the robot in the simulation to create a map, the laserscan signals moves also with the robot in RViz, which prevents me to create the map properly. Please help.

edit retag flag offensive close merge delete

Comments

We will need more information in this case to narrow down the problem. Please show your navigation configuration (costmap params files.).
Especially check you costmap_common_params file and see which frame have you passed to your observation source (laser_scan_sensor) and which are your global and robot_base frames.

pavel92 gravatar image pavel92  ( 2019-07-17 02:17:39 -0500 )edit

I am using libgazebo_ros_control.so plugin to control my robot, you can check the images in the links bellow to understand exactly what i am talking about. https://ibb.co/k5THXCK (This is the initial state) https://ibb.co/tLCwpGf (here you can see when the robot moves, the signals moves also, but in gazebo they are fixed)

note that the problem is not occuring when I use the plugin libgazebo_ros_diff_drive.so to control the robot,

Youssef_Lah gravatar image Youssef_Lah  ( 2019-07-17 06:32:38 -0500 )edit

Yes I understand that. We will need to see your navigation configuration files in order to debug the problem

pavel92 gravatar image pavel92  ( 2019-07-17 09:41:45 -0500 )edit

Hi Pavel92, this is my costmap_common_params file:

obstacle_range: 8.0

raytrace_range: 10


footprint: [[-0.7874, -0.381], [-0.7874, 0.381], [0.8636, 0.381], [0.8636, -0.381]]


inflation_radius: 0.2

cost_scaling_factor: 0.5


map_type: costmap

transform_tolerance: 0.2

observation_sources: scan

scan: {data_type: LaserScan, topic: scan_multi, marking: true, clearing: true}
Youssef_Lah gravatar image Youssef_Lah  ( 2019-07-18 09:17:22 -0500 )edit

What do you think pavel ?

Youssef_Lah gravatar image Youssef_Lah  ( 2019-07-24 11:12:42 -0500 )edit

This is typically a transforms issue. Your laser data from the lidar iteself may be inverted. It is also possible that your localization stack is giving odometry / pose that does not follow ROS standard (ENU convention). Please check ROS REP 103 and ROS REP 105

hashirzahir gravatar image hashirzahir  ( 2020-04-17 06:12:39 -0500 )edit