Robotics StackExchange | Archived questions

Moving in Rviz opposite to reality

My mobile robot moves well in the gazebo and Rviz using teleop node. However, when I implement the real robot, the robot moves well, in reality, using teleop node while Rviz moved the opposite. It moves forward and backward well but turns right in reality while turning left in Rviz. Could you help me?

Asked by Omar_Alkassas on 2023-01-23 10:14:19 UTC

Comments

Answers

There are a couple points that could be causing this issue and without more info it's difficult.

  • Incorrect static transform - a transform within your model may have the robot flipped along the X-Axis
  • Incorrect odom to base_link transform - calculations to built up the tranform may have either simply bad math or flipped the robot over(or something).
  • Incorrect odometry calcs - you don't describe the robot but if it is a differential drive then one motor is spinning forward and one backward and when calculating angle(rotation) maybe a minus sign got switched
  • You're viewing the RVIZ robot from the under side in RVIZ so it only looks like it's turning the wrong way - verify that the "Invert Z axis" in RVIZ is not checked.
  • You're viewing the real robot in a mirror and both the robot and RVIZ agree the TELOP is backwards.

Asked by billy on 2023-01-24 00:10:56 UTC

Comments