ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

modelling sensors(IMU) in Gazebo

asked 2011-12-21 21:25:11 -0600

hmmm gravatar image

hi all,i need to modell sensors like:gyro,acc,magnetfieldsensor in Gazebo. Are there any examples for a sensor implemented urdf-file? how can i modell these sensors in a urdf file,for my quadrotor?

thanks, greets

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-12-22 00:53:41 -0600

DimitriProsser gravatar image

updated 2012-01-06 05:14:57 -0600

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

<link name="imu_link">
    <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"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
      <box size="0.001 0.001 0.001"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
      <box size=".001 .001 .001"/>

  <controller:gazebo_ros_imu name="imu_controller" plugin="">
    <xyzOffsets>0 0 0</xyzOffsets>
    <rpyOffsets>0 0 0</rpyOffsets>
    <interface:position name="imu_position"/>

EDIT: This publishes a topic with the type sensor_msgs/Imu. To access the data via rxplot, you could use:

rxplot /imu_data/orientation/x
edit flag offensive delete link more


hi dimitri,i edit this to my urdf,but how can i now see the imu messages? which service do i have to call?
hmmm gravatar image hmmm  ( 2012-01-05 18:40:59 -0600 )edit
rostopic echo "imu_data". It publishes to a topic with the name that you specify in `<topicName>`.
DimitriProsser gravatar image DimitriProsser  ( 2012-01-06 00:15:32 -0600 )edit
hi dimitri,thanks . i had success. But how can i plot these imu data in rxplot? it does not work.For example, i tried : rxplot imu_data/x Can you please show me the correct syntax? greetz
hmmm gravatar image hmmm  ( 2012-01-06 05:03:03 -0600 )edit

how do i use this in urdf?

rajnunes gravatar image rajnunes  ( 2016-04-14 08:37:37 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-12-21 21:25:11 -0600

Seen: 7,494 times

Last updated: Jan 06 '12