Gazebo Garden

4/20/25 TODO complete migration to Gazebo Garden

https://github.com/oc-robotics/differential_drive_robot/tree/jason

picture 3

Update lidar

picture 4

  • Update lidar.xacro
  • Check scan topic
ros2 topic info /scan
Type: sensor_msgs/msg/LaserScan
Publisher count: 1
Subscription count: 0
ros2 topic echo /scan
header:
  stamp:
    sec: 3014
    nanosec: 400000000
  frame_id: laser_frame
angle_min: -3.140000104904175
angle_max: 3.140000104904175
angle_increment: 0.01749303564429283
time_increment: 0.0
scan_time: 0.0
range_min: 0.30000001192092896
range_max: 12.0
ranges:
- 0.5050193071365356
- 0.5051422715187073
- 0.5053883790969849
- 0.5057575106620789
- 0.5062493681907654
- 0.506863534450531

Add Sim Camera

  • Test image topic
ros2 topic echo /camera/image_raw
header:
  stamp:
    sec: 142
    nanosec: 500000000
  frame_id: camera_link_optical
height: 480
width: 640
encoding: rgb8
is_bigendian: 0
step: 1920
data:
- 218
- 218
- 218
- 218
- 218
- 218
- 218
...

ros_gz_bridge

Launch file

Run simulation

picture 2

  • Update obstacle_worlds.sdf to include sensor plugins
  <plugin
       filename="gz-sim-sensors-system"
       name="gz::sim::systems::Sensors">
       <render_engine>ogre2</render_engine>
     </plugin>
 
- Drive the robot
```bash
ros2 run teleop_twist_keyboard teleop_twist_keyboard
  • List gazebo topics
 gz topic -l
/camera/camera_info
/camera/image_raw
/clock
/gazebo/resource_paths
/gui/camera/pose
/gui/record_video/stats
/keyboard/keypress
/model/my_bot/cmd_vel
/model/my_bot/joint_state
/model/my_bot/odometry
/model/my_bot/tf
/scan
/scan/points
/sensors/marker
/stats
/world/empty/clock
/world/empty/dynamic_pose/info
/world/empty/pose/info
/world/empty/scene/deletion
/world/empty/scene/info
/world/empty/state
/world/empty/stats
  • List ros topics
ros2 topic list
/camera/camera_info
/camera/image_raw
/camera/image_raw/compressed
/camera/image_raw/compressedDepth
/camera/image_raw/theora
/clock
/cmd_vel
/joint_states
/odom
/parameter_events
/robot_description
/rosout
/scan
/tf
/tf_static

Fix wheel joint issue

ros2 run teleop_twist_keyboard teleop_twist_keyboard

RViz

  • Update diff-drive.rviz
  • Run RViz
rviz2 -d src/differential_drive_robot/config/diff-drive.rviz

picture 0