Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Standardization of simulation interfaces #410

@adamdbrw

Description

@adamdbrw

Update: the standard is now implemented here https://github.com/ros-simulation/simulation_interfaces. As implementations progress, amends are expected before the first release.

Problem

The number of simulator choices for ROS increased over time, and these simulators offer different advantages and trade-offs. For certain applications Gazebo is a match, for others, Open 3D Engine (O3DE) does the job the best, and for others yet, Isaac Sim might be a fit. There are many more yet.

Open 3D Engine robotic simulation (the ROS 2 Gem) depends on gazebo_msgs package, which was deprecated with the Jazzy release, but also, as an exception, released to make life easier for O3DE users. The gazebo_msgs package interfaces are quite generic and thus were reused in O3DE. However, one simulator interface user experience should not depend on a release cycle of another simulator, but rather be tied to a certain standard.

There is currently no standard for simulation interfaces. Simulation interfaces include spawning and de-spawning of robots and other entities, moving them around, pausing and resetting the scene, and so on. They are also highly important for automation of simulation-based testing. These interfaces are mostly services as they offer valuable response interaction which is needed for almost all the interface features.

Proposed solution

A new simulation_interfaces package which reuses much of gazebo_msgs but also introduces new interfaces and changes some fields to fully support current Gazebo and O3DE community needs. The priority for the first release should be minimizing impact (including semantic differences) for the users, and capturing new requirements in new services rather than re-imagining the entire package.

Current state of O3DE interfaces in use

Important: the up to data state of interfaces standard is in ros-simulation/simulation_interfaces#1, this is a start of discussion and not the proposal.

I come with the O3DE perspective and invite others to supply other perspectives. Note that current use for some of services and their fields is not adhering to their intended semantics, and includes extension Gems beyond the core ROS 2 Gem.

Services for simulation entities spawning and control (all are gazebo_msgs/srv/ services):

Service name Service Type Description
get_available_spawnables GetWorldProperties Return a list of spawnable names (e.g. turtlebot4).
get_spawn_points GetWorldProperties List named (pre-set) spawn points to use, e.g., “kitchen.”
get_spawn_point_info GetModelState Get a pre-set spawn point by name, returning its pose and description.
spawn_entity SpawnEntity Spawning robots and other entities by prefab name.
delete_entity DeleteEntity Despawn by unique name (e.g. turtlebot4_1).
get_scene_objects GetModelList Acquire dynamic objects which can be controlled (other than the robot).
get_object_state GetEntityState Acquire information about a specific simulation object.
set_object_state SetEntityState Instantly change the pose or Twist of an object.

Services for simulation scenes and control, especially important for automation with scenario testing (multiple runs of simulation on different scenes). Note that some services are not used semantically as intended, and some services are custom here indicating there is no great fit in current gazebo_msgs interface set:

Service name Service Type Description
load_level custom Load a named level, if another was loaded before, it is unloaded first.
get_current_level custom Get the current level of the simulation. Fails if no level is running.
get_available_levels GetModelList Get the available levels of the simulation.
reset_current_level std_msgs/srv/Trigger Reset the current level of the simulation.
unload_current_level std_msgs/srv/Trigger Unload the current level of the simulation.
set_simulation_paused std_srvs/srv/SetBool Pausing and un-pausing.

The benefits

Standardization would improve user experience when using their validation, testing and ML pipelines with several simulators, or when switching between one simulator and the other as they needs come to better match another platform. It would also make it easier to benchmark simulators.

Discussion

  • What would be the minimal simulation_interfaces package that would have the lowest adaptation cost for Gazebo?
  • Going from there, how can we best cover O3DE utility with reasonable addition of optional fields and services to such package?
  • As a community member, could you provide what is different in perspective of your simulator?

Please take a look, @azeey.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions