Ask Your Question
0

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
8

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

<gazebo>
  <controller:gazebo_ros_imu name="imu_controller" plugin="libgazebo_ros_imu.so">
    <alwaysOn>true</alwaysOn>
    <updateRate>50.0</updateRate> 
    <bodyName>imu_link</bodyName>
    <topicName>imu_data</topicName>
    <gaussianNoise>2.89e-08</gaussianNoise>
    <xyzOffsets>0 0 0</xyzOffsets>
    <rpyOffsets>0 0 0</rpyOffsets>
    <interface:position name="imu_position"/>
  </controller:gazebo_ros_imu>
</gazebo>

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

Comments

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 imagehmmm ( 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 imageDimitriProsser ( 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 imagehmmm ( 2012-01-06 05:03:03 -0600 )edit

how do i use this in urdf?

rajnunes gravatar imagerajnunes ( 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

Stats

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

Seen: 4,811 times

Last updated: Jan 06 '12