ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Help with IMU orientation

asked 2017-08-29 00:26:53 -0500

AlexR gravatar image

updated 2017-08-29 00:28:45 -0500

Hi,

I am trying to integrate IMU on the pioneer robot. I am using the BNO055 IMU sensor. For visualization I created a child_link from the base_link. The IMU is oriented with axes aligned to front (x axis), left (y axis) and top (z axis) from the sensors data sheet(pg.24).

   <joint name="imu_joint" type="fixed">
    <axis xyz="0 0 0"/> <!-- 0 1 0 -->
    <origin xyz="0 0 0.32"/>
    <parent link="base_link"/>
    <child link="imu_link"/>
  </joint>

<link name="imu_link">
  <inertial>
        <mass value="0.001"/>
        <origin rpy="0 0 0" xyz="0 0 0"/>
   <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.0001"/>
  </inertial>
    <visual>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
           <box size="0.01 0.01 0.01"/>
       </geometry>
   </visual>
  <collision>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <geometry>
      <box size=".01 .01 .01"/>
    </geometry>
  </collision>
</link>

And my launch file for the robot is:

  <launch>

  <node pkg="rosaria" type="RosAria" name="RosAria"/>
  <node pkg="topic_tools" type="relay" name="relay1" args="/RosAria/pose /odom" />
  <node pkg="topic_tools" type="relay" name="relay2" args="/cmd_vel /RosAria/cmd_vel" />

  <param name="robot_description" command="$(find xacro)/xacro.py '$(find kinect)/urdf/p3dx_real_new.xacro'" />

  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="20.0" />
  </node>

  <node pkg="tf" type="static_transform_publisher" name="static_transform_publisher" args="0 0 0 0 0 0 base_link base_footprint 50"/>
  <node pkg="tf" type="static_transform_publisher" name="static_transform_publisher2" args="-0.2 0 0.036 0 0 0 base_link center_wheel 50"/>
  <node pkg="tf" type="static_transform_publisher" name="static_transform_publisher3" args="-0.178 0 0.052 0 0 0 base_link swivel 50"/>
  <node pkg="tf" type="static_transform_publisher" name="static_transform_publisher4" args="0 0 0.32 0 0 0 base_link imu_link 50"/>
</launch>

The imu_link properly shows the orientation as same as the base_link. However, when I launch the imu node, the orientation of the imu is incorrect. Its been shown as rotated 180 degrees. I am not sure what am I doing wrong. My final goal is to use the robot_localization package to fuse the wheel odometry and imu sensor messages. But I am stuck for now.

Thanks

edit retag flag offensive close merge delete

Comments

Does the IMU publish its own transform? Do a rosnode info on the IMU node, and check if it's publishing to /tf or /tf_static.

Tom Moore gravatar image Tom Moore  ( 2017-10-03 03:13:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-12-01 03:21:39 -0500

AlexR gravatar image

Hi, Sorry for the late reply. You were right, I somehow screwed up the urdf definition and found that I was defining them at two places. Now its stable and all good. My next question is how to adjust the launch file for a differential drive robot 9dof imu (bno055). Thank you

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-08-29 00:26:53 -0500

Seen: 10,065 times

Last updated: Aug 29 '17