-
Notifications
You must be signed in to change notification settings - Fork 84
Gazebo Topic Naming Conventions
Although the topic naming system between Gazebo and ROS looks similar, there are a few subtle yet important differences. It is important to get this right to make sure your messages get routed to the right place, and the entire system is scalable and modular when more robots get added to the environment.
Gazebo publishers and subscribers are associated with a containing node.
A tilde (~
) in the topic name is shorthand for the default world. This normally expands to /gazebo/default/
.
All topics published and subscribed to by CrazyS Gazebo plugins use (they use the same convention of RotorS) the default namespace (i.e. they create a node with myNode.Init()
, without passing in a string). This usually defaults to the /gazebo/default/
namespace.
Model plugins always prepend topic names with a unique name for the model. Note that this is not the model_
string which gets passed into the Load()
method of a plugin! Instead, a unique name is provided by the robotNamespace
parameter from the SDF file. This is obtained through the following code:
if (_sdf->HasElement("robotNamespace"))
namespace_ = _sdf->GetElement("robotNamespace")->Get<std::string>();
else
gzerr << "[gazebo_odometry_plugin] Please specify a robotNamespace.\n";
How to add
How to create
- Creating ROS Plugins for Gazebo
- Gazebo and Gazebo ROS Installation
- Gazebo Topic Naming Conventions
- ROS Interface Plugin
- Setup virtual keyboard joystick
How to install
How to generate
How to set
- Setting up CrazyS as Fixed Wing HiL Simulation (Pixhawk, Mavros, Mavlink, QGC)
- Setting up the CrazyS Simulator
How to develop
- Include ordering in cpp and header files
- Interfacing CrazyS through MATLAB
- Interfacing CrazyS with TravisCI
- Interfacing CrazyS with GitHub Action
- Package Versioning
- Software Specifications
- Specifying constants and default values
- Working With Meshes in Gazebo
More information