IMU plugin erratic acceleration measurements
Hi,
I am trying to use the IMU plugin in Gazebo (v2.2.5) but am seeing weird behavior. I am running the IMU without biases or noise, and the acceleration/rate outputs integrate to trajectories I expect, but the measurements are nevertheless erratic: they are constantly switching sign. I publish sinusoidal velocities in gazebo so I know what to expect from the acceleration measurements, but they look like this:
Whole dataset (a_x, a_y, w)
I don't expect perfectly smooth trajectories but 50m/s^2 accels at times seems too unstable, something must be wrong. If I just look at the gravity vector in rviz it jumps all over the place. I tried to set everything to zero...
<!-- Chassis -->
<link name="base_link">
<inertial>
<mass value="10.0"/>
<origin xyz="0 0 0.177"/>
<inertia
ixx="0.3338" ixy="0.0" ixz="0.0"
iyy="0.4783" iyz="0.0"
izz="0.3338"/>
</inertial>
<visual name="base_visual">
<origin xyz="0 0 0.177" rpy="0 0 0"/>
<geometry name="pioneer_geom">
<mesh filename="package://dopebot_description/meshes/chassis.stl"/>
</geometry>
<material name="ChassisRed">
<color rgba="0.851 0.0 0.0 1.0"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0.177" rpy="0 0 0"/>
<geometry>
<mesh filename="package://dopebot_description/meshes/chassis.stl"/>
</geometry>
</collision>
</link>
<!-- IMU -->
<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.0001" iyz="0" izz="0.0001"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
</collision>
</link>
<!-- IMU Joint -->
<joint name="imu_joint" type="fixed">
<axis xyz="1 0 0"/> <!-- 0 1 0 -->
<origin xyz="0 0 0.28"/>
<parent link="base_link"/>
<child link="imu_link"/>
</joint>
<plugin name="imu_plugin" filename="libhector_gazebo_ros_imu.so">
<updateRate>1000</updateRate>
<bodyName>base_link</bodyName>
<topicName>/imu</topicName>
<serviceName>/imu/calibrate</serviceName>
<accelOffset>0.0 0.0 0.0</accelOffset>
<accelDrift>0.0 0.0 0.0</accelDrift>
<accelDriftFrequency>0.0 0.0 0.0</accelDriftFrequency>
<accelGaussianNoise>0.0 0.0 0.0</accelGaussianNoise>
<rateOffset>0.0 0.0 0.0</rateOffset>
<rateDrift>0.0 0.0 0.0</rateDrift>
<rateDriftFrequency>0.0 0.0 0.0</rateDriftFrequency>
<rateGaussianNoise>0.0 0.0 0.0</rateGaussianNoise>
<headingOffset>0.0</headingOffset>
<headingDrift>0.0</headingDrift>
<headingDriftFrequency>0.0</headingDriftFrequency>
<headingGaussianNoise>0.0</headingGaussianNoise>
<rpyOffset>0.0 0.0 0.0</rpyOffset>
<xyzOffset>0.0 0.0 0.0</xyzOffset>
<gaussianNoise>0.0</gaussianNoise>
</plugin>
but the problem remains. Any ideas?
Thank you,
Jacob
+1. Noticed the same thing on my end.
Can you update your question with which gazebo version your running? And would you also mind attaching a code snippet of the link that you attach the imu plugin to, as well as any links/joints related?
Updated. I guess you had no luck fixing it? I tried finding a model that includes a hector IMU but could not find one. I haven't seen any examples out there, just this guy who seems to have managed to get it to behave
The jackal simulation model from clearpath uses it.