map frame is not in the same direction as base_link frame

asked 2021-10-29 16:15:01 -0500

Delbina gravatar image

updated 2021-11-02 06:48:04 -0500


I have noticed that with turning on the robot,and after launching SLAM, i can see that map frame is not in the same direction with base_link frame (X Y Z). HOW can I change the map frame to be align with base_link at the initial state?!? totally should they be in the same orientation??? I have launched rtabmap slam, and I don not know maybe the problem is about this slam!!!

you know what makes me confuse, is REP 103 and also the information that i mentioned here about the initial orientation of the map frame. in terms of REP 103, and considering my case, the orientation of the base-link is In relation to the body and it shows x forward y left z up and the map frame follows the ENU convention: X east Y north Z up

SO why the map frame should be in the same orientation of base_link frame?

base_link image description

base_link and map frame, that as you can see, map frame has a 90 degree rotation from base_link image description

odm and map frame image description

base-link and imu_link image description

base_link, map and odom frame image description


edit retag flag offensive close merge delete


according to the right hand rule, map frame should also be in the same direction (x forward, y left, z up) as base_link frame. I am using RTABMAP as map provider and using robot-localization pkg in order to publish the map frame. Now how can i make the map frame to show the same x y z as base_link frame?

Delbina gravatar image Delbina  ( 2021-10-30 10:33:48 -0500 )edit

Hi @Masoum, there may be issues at the urdflevel when describing the relationships. Please take a look at this discussion, not with RTABMAP but with Cartographer: To be able to help you, more details are required. Can you explain what have you tried so far?

osilva gravatar image osilva  ( 2021-11-01 12:52:43 -0500 )edit

hi @osilva I have attached the frames in my question, just a i have take a number of pictures to be able to specify each of them. the urdf is ok for my case.

Delbina gravatar image Delbina  ( 2021-11-02 03:41:29 -0500 )edit

is there any answer?

Delbina gravatar image Delbina  ( 2021-11-02 13:47:45 -0500 )edit

Can you show the urdf relationship of base link and imu_link and the other links pls

osilva gravatar image osilva  ( 2021-11-02 14:04:32 -0500 )edit

Rviz is just a visualization tool so if you are seeing issues most likely is the orientation used

osilva gravatar image osilva  ( 2021-11-02 14:06:22 -0500 )edit

base_link and imu-link are considered relative to chassis link @osilva

<link name="base_link"></link>

  <joint name="base_link_joint" type="fixed">
    <origin xyz="0 0 0.025" rpy="0 0 0" />
    <parent link="base_link"/>
    <child link="chassis_link" />


  <link name="imu_link" />
  <joint name="imu_link_joint" type="fixed">
    <origin xyz="$(optenv WARTHOG_IMU_XYZ 0 0 0)" rpy="$(optenv WARTHOG_IMU_RPY 0 0 0)" />
    <parent link="chassis_link"/>
    <child link="imu_link" />
Delbina gravatar image Delbina  ( 2021-11-03 03:51:30 -0500 )edit

Is there any solution?

Delbina gravatar image Delbina  ( 2021-11-03 07:49:18 -0500 )edit