4
$\begingroup$

Rviz screenshot

Hi,

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.

$\endgroup$
  • $\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 at 23:22
  • $\begingroup$ But map or world frame is not available in the dropdown menu of Rviz. $\endgroup$ – Franky May 19 at 4:43
6
$\begingroup$

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.

$\endgroup$
  • 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 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.