RoboticaUtnFrba / create_autonomy

ROS autonomy stack for iRobot Create 2.
BSD 3-Clause "New" or "Revised" License
28 stars 38 forks source link

Joint States message suddenly provides incorrect right wheel joint position. #242

Open GaganBhat opened 3 years ago

GaganBhat commented 3 years ago

image image

The rostopic /create1/joint_states publishes the position of the left and right joint, however, after driving the robot around, abruptly results in a very high number.

Scenario to reproduce: Move the robot around with keyboard teleop control while echoing the joint state.

GaganBhat commented 3 years ago

Any idea on why this may be? @eborghi10

eborghi10 commented 3 years ago

Sorry for the belated response, I've never seen that before.

That calculation is being done here and it's a copy of the original plugin in Gazebo with some slight fixes.

What could be happening here is an error with the physics solver of Gazebo in particular situations where it can't handle the states correctly. In which situations have you seen this? Does this happen when the robot collides with an obstacle?

GaganBhat commented 3 years ago

It happens randomly when moving around on the traditional home carpet. Out of nowhere the position of one side of the robot goes to an extremely high value.

eborghi10 commented 3 years ago

It might be because the carpet is at a different height and maybe the constraints of the physics solver should be tweaked. Nevertheless, if your robot fuses an IMU to improve the localization, you shouldn't have any problem.