0
$\begingroup$

Rosanswers logo

Hello. I am working on a differential drive robot. When the robot collide with an object, the robot stops in Gazebo but keeps moving in rviz. I am expecting the robot to stop as it does not have enough mass to make the cone(object) move. I tried laser scan in rviz to find out if there is really any map being recognized by rviz and yes it is showing red dots representing the cones(obstacle). When i run over them, the red dots shifts (keeps moving ) in the direction of motion of the bot. Any Solutions?


Originally posted by KalaDaku on ROS Answers with karma: 3 on 2023-04-08

Post score: 0


Original comments

Comment by Mike Scheutzow on 2023-04-10:
You have not told us what you think should happen. It is not surprising to me that if the robot hits an object, the object moves. You can edit your existing description using the "edit" button near the end of the text.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The cause is most likely that your odom->base_link transform is inaccurate (i.e. it is accumulating error.) So when rviz tries to determine the current robot pose by looking up map->odom->base_link, it gets the wrong answer. The cones appear to move in the costmap because their position is calculated relative to the incorrect robot pose.


Originally posted by Mike Scheutzow with karma: 4903 on 2023-04-12

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by KalaDaku on 2023-04-12:
How do i correct it? Do i need to make changes to urdf? I am new to ROS.

Comment by Mike Scheutzow on 2023-04-13:
The first step is to understand how odometry is being calculated in your simulation. What are the inputs? Is a filter being used?

This is not a trivial problem to solve. The solution depends heavily on what sensor data is available and how accurate that data is. You could begin with a web search for terms odometry and odometry drift.

Comment by KalaDaku on 2023-04-13:
Feels like I need to explore Transforms a bit deeper. Thanks for the assistance.

$\endgroup$
1
  • $\begingroup$ using only wheel encoders as odometry source can also cause this. Could switch to world as source in the diff drive plugin. $\endgroup$
    – Vishaal
    Commented Feb 15 at 12:09

Your Answer

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