Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Launching Gazebo

So launching gazebo is actually a major mess and a total pain in the

What's crucial is these steps:

  1. Create a .yaml document with all the mappings you care about between gazebo topics and ros topics.
  2. Launch the ros-gz bridge first using: ros2 launch ros_gz_sim ros_gz_sim.launch.py world_sdf_file:=blue_world.sdf bridge_name:=ros_gz_bridge config_file:=gz_config.yaml use_composition:=True create_own_container:=True
  3. Launch Gazebo using gz sim blue_world.sdf

You can then get it moving around by

  1. Unpausing the simulation in gazebo (press the resume button)
  2. Running ros2 topic pub /cmd_vel_ros geometry_msgs/msg/Twist "{linear: {x: 5.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: -0.1}}" to publish to the ros node.

The bridge will then send the messages from the ros topic to the gazebo topic and badamim badaboom the car is moving around.

If you'd like to launch P&C build, install, and run them.

Also use rqt_graph to see all the nodes.

Problems

  1. There is a weird bug where the sim will quickly pause and unpause for no reason.
  2. We need to change the way gazebo pulls in info to not use a twist. See Plugins header below.
  3. The entire car model needs to be updated. See "banana_to_scale.png" image. And it's also 3 wheeled and the weight is off and it's terrible and totally cooked and directly from the tutorial bc whenever I try to build a model it blows up. It'd be best if this task gets split up into a couple parts, this being one of them.

Also as an aside, it may be wise to consider not using gazebo in the future. Not making a case for it just putting this here as food for thought. I think for P&C we'll definitely be putting considerably more time and energy into our hand-written test cases over use gazebo from now on until it's clearer how it'll be used.

Plugins

Plugins (which are the absolute worst btw) only allow for like 11 different operations on the car.
I tried pretty extensively to build my own plugin but to no avail - I can't find the package with the headers needed.
Maybe check here: "https://gazebosim.org/docs/harmonic/ros2_gz_vendor_pkgs/"? Honestly idk.

Currently I'm using the gz-sim-diff-drive-system plugin which only takes in a twist (why on earth...). It would be best if we could publish turn commands and torque commands seperately in two different topics. We should look into this.

About

For testing Gazebo + ROS (P&C Team)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors