Skip to content

Commit 25d625e

Browse files
authored
Merge pull request #686 from JdeRobot/add-noise-to-odom
Add noise to odometry
2 parents add60ca + 8922fd4 commit 25d625e

29 files changed

Lines changed: 2859 additions & 82 deletions

CustomRobots/roomba_robot/models/roombaROS/model.sdf

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
<inertial>
1010
<mass>1.0</mass>
1111
<inertia>
12-
<ixx>1</ixx><ixy>0.0</ixy><ixz>0.0</ixz>
13-
<iyy>1</iyy><iyz>0.0</iyz>
12+
<ixx>1</ixx>
13+
<ixy>0.0</ixy>
14+
<ixz>0.0</ixz>
15+
<iyy>1</iyy>
16+
<iyz>0.0</iyz>
1417
<izz>1</izz>
1518
</inertia>
1619
</inertial>
@@ -294,7 +297,7 @@
294297

295298
<link name="right_wheel">
296299
<pose>0 -0.130000 0.032000 0 0 0</pose>
297-
300+
298301
<inertial>
299302
<inertia>
300303
<ixx>0.001000</ixx>
@@ -457,5 +460,14 @@
457460
<dimensions>3</dimensions>
458461
</plugin>
459462

463+
<plugin filename="gz-sim-odometry-publisher-system" name="gz::sim::systems::OdometryPublisher">
464+
<odom_topic>/roombaROS/odom_noisy</odom_topic>
465+
<robot_base_frame>base</robot_base_frame>
466+
<odom_frame>odom</odom_frame>
467+
<odom_publish_frequency>20</odom_publish_frequency>
468+
<dimensions>3</dimensions>
469+
<gaussian_noise>0.01</gaussian_noise>
470+
</plugin>
471+
460472
</model>
461473
</sdf>

CustomRobots/roomba_robot/models/roombaROS_cam/model.sdf

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@
2929
<inertial>
3030
<mass>1.0</mass>
3131
<inertia>
32-
<ixx>1</ixx><ixy>0.0</ixy><ixz>0.0</ixz>
33-
<iyy>1</iyy><iyz>0.0</iyz>
32+
<ixx>1</ixx>
33+
<ixy>0.0</ixy>
34+
<ixz>0.0</ixz>
35+
<iyy>1</iyy>
36+
<iyz>0.0</iyz>
3437
<izz>1</izz>
3538
</inertia>
3639
</inertial>
@@ -551,7 +554,7 @@
551554
<mean>0.0</mean>
552555
<stddev>0.007</stddev>
553556
</noise>
554-
</camera>
557+
</camera>
555558
</sensor>
556559

557560
<velocity_decay>
@@ -625,5 +628,14 @@
625628
<dimensions>3</dimensions>
626629
</plugin>
627630

631+
<plugin filename="gz-sim-odometry-publisher-system" name="gz::sim::systems::OdometryPublisher">
632+
<odom_topic>/roombaROS/odom_noisy</odom_topic>
633+
<robot_base_frame>base</robot_base_frame>
634+
<odom_frame>odom</odom_frame>
635+
<odom_publish_frequency>20</odom_publish_frequency>
636+
<dimensions>3</dimensions>
637+
<gaussian_noise>0.01</gaussian_noise>
638+
</plugin>
639+
628640
</model>
629641
</sdf>

CustomRobots/roomba_robot/params/roombaROS.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
gz_type_name: "gz.msgs.Odometry"
66
direction: GZ_TO_ROS
77

8+
- ros_topic_name: "odom_noisy"
9+
gz_topic_name: "/roombaROS/odom_noisy"
10+
ros_type_name: "nav_msgs/msg/Odometry"
11+
gz_type_name: "gz.msgs.Odometry"
12+
direction: GZ_TO_ROS
813

914
# gz topic subscribed to by DiffDrive plugin
1015
- ros_topic_name: "cmd_vel"
@@ -36,4 +41,4 @@
3641
gz_topic_name: "/roombaROS/events/left_bumper"
3742
ros_type_name: "ros_gz_interfaces/msg/Contacts"
3843
gz_type_name: "gz.msgs.Contacts"
39-
direction: GZ_TO_ROS
44+
direction: GZ_TO_ROS

CustomRobots/roomba_robot/params/roombaROS_cam.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
gz_type_name: "gz.msgs.Odometry"
66
direction: GZ_TO_ROS
77

8+
- ros_topic_name: "odom_noisy"
9+
gz_topic_name: "/roombaROS/odom_noisy"
10+
ros_type_name: "nav_msgs/msg/Odometry"
11+
gz_type_name: "gz.msgs.Odometry"
12+
direction: GZ_TO_ROS
813

914
# gz topic subscribed to by DiffDrive plugin
1015
- ros_topic_name: "cmd_vel"
@@ -43,4 +48,4 @@
4348
gz_topic_name: "/camera/camera_info"
4449
ros_type_name: "sensor_msgs/msg/CameraInfo"
4550
gz_type_name: "gz.msgs.CameraInfo"
46-
direction: GZ_TO_ROS
51+
direction: GZ_TO_ROS
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
3+
<model>
4+
<name>TurtleBot3(Waffle)</name>
5+
<version>2.0</version>
6+
<sdf version="1.4">model-1_4.sdf</sdf>
7+
<sdf version="1.5">model.sdf</sdf>
8+
9+
<author>
10+
<name>Taehun Lim(Darby)</name>
11+
<email>thlim@robotis.com</email>
12+
</author>
13+
14+
<description>
15+
TurtleBot3 Waffle
16+
</description>
17+
</model>

0 commit comments

Comments
 (0)