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

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
...

RViz

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

picture 0

gz-bridge.yaml

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