0
$\begingroup$

I'm trying to simulate an accurate wheel odometry sensor in gazebo, or at least with some noise, in order to perform some localization tests and see the localization error for different methods. From what I understand, the standard differential_drive_controller plugin doesn't simulate noise in the wheel odometry, so I wanted to ask if there is any way to simulate noise and drift in the odometry that comes from the wheels or if I have to create my own code to do that, and if so, what would I need to do?

$\endgroup$

1 Answer 1

0
$\begingroup$

Try setting the odom source parameter within the plugin tag for diff drive controller to 1 to use encoders for odometry, which will introduce some noise.

<gazebo>
    <plugin name="diff_drive" filename="libgazebo_ros_diff_drive.so">
        <left_joint>left_joint</left_joint>
        <right_joint>right_joint</right_joint>
        <wheel_separation>0.3</wheel_separation>
        <wheel_diameter>0.1</wheel_diameter>

        <odometry_frame>odom</odometry_frame>
        <odometry_topic>odom</odometry_topic>
        <robot_base_frame>base_footprint</robot_base_frame>

        #This line here
        <odometry_source>1</odometry_source>

        <publish_odom>true</publish_odom>
        <publish_wheel_tf>true</publish_wheel_tf>
    </plugin>
</gazebo>
```
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.