Rviz screenshot


I have a wheeled-legged robot as you can see in the picture. When I simulate it in ROS-Gazebo it works fine, however at the same time in Rviz it moves sideways instead of forward or backwards. I have no idea why it is behaving like this. Would greatly appreciate if someone can give me some clue here.

  • $\begingroup$ You seem to be in the odom frame. Could be due to odom drift (there being bias in your odometry?) Switch to the map frame and see if your localization stack deals with the drift? $\endgroup$
    – cjds
    May 18 '19 at 23:22
  • $\begingroup$ But map or world frame is not available in the dropdown menu of Rviz. $\endgroup$
    – Franky
    May 19 '19 at 4:43
  • $\begingroup$ could you please tell us how you changed the coordinates in urdf file, thanks in advance $\endgroup$
    – Omar Bakr
    Jan 23 at 23:49

I have found the problem after some long search on the internet. The problem was that in Rviz, X-axis is defined as front of the robot and Y-axis is defined as the sideways. However, in my URDF I defined the robot in a way where Y-axis was its front and X-axis was its sideways. After fixing this, my robot moves normally in Rviz and Gazebo both.

  • 1
    $\begingroup$ Great job finding the answer yourself. Coordinate frame conventions can be tricky. It seems everyone has a different one. $\endgroup$
    – Ben
    Jun 8 '19 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.