In URDF, specifying IMU noise components (noise + bias)

asked 2019-09-24 10:20:59 -0600

viliwonka gravatar image

Hello people!

I have seen in this tutorial (linked below), how I can describe the IMU noise. Problem is, this tutorial is written in SDF, instead of URDF format (which I use). I tried same syntax in URDF robot model, and Gazebo just crashes.

The part of gazebo.xacro: (NOTE: I included only x, I ommited y and z, because it's same anyway)

    <gazebo reference="gyro">
    <sensor type="imu" name="gyro_sensor">           
                    <noise type="gaussian">
                    <noise type="gaussian">

        <pose>0 0 0 0 0 0</pose>
    <plugin name="gyro_plugin" filename="">

The part of macros.xacro:

<xacro:macro name="fixed_offset_joint" params="parent child offset">
    <joint name="${parent}_to_${child}" type="fixed">
        <parent link="${parent}"/>
        <child link="${child}"/>
        <origin xyz="${offset}" rpy="0 0 0" /> <!-- offset from parent to child, so with direction based in parent frame -->

<xacro:macro name="gyro_geometry">
    <origin xyz="0 0 ${gyro_height/2}" rpy="0 0 0" /> <!-- origin (0,0,0) is in the center of the box -->
        <box size="${gyro_length} ${gyro_width} ${gyro_height}"/>
<xacro:macro name="gyro_inertial">
    <origin xyz="0 0 ${gyro_height/2}" rpy="0 0 0" /> <!-- origin (0,0,0) is in the center of the box -->
    <xacro:box_inertial mass="${gyro_weight}" length="${gyro_length}" width="${gyro_width}" height="${gyro_height}" />

The part of model.xacro:

<link name="gyro">
        <material name="green"/>
<xacro:fixed_offset_joint parent="baseplate" child="gyro" offset="-0.155 -0.055 ${lidar_mount_height}"/>

Btw, I know I can use: <gaussiannoise>something</gaussiannoise> tag inside plugin in URDF, and it will work, but it's too little.

edit retag flag offensive close merge delete