Skip to content

Conversation

michalpelka
Copy link
Contributor

@michalpelka michalpelka commented Mar 17, 2025

This RFC proposes extension to ROS 2 support in O3DE regarding standardization of simulation control messages in ROS 2 space.
ros-simulation/simulation_interfaces#1 (comment)
ros-infrastructure/rep#410

This RFC was internally reviewed in RobotecAI#1.

michalpelka and others added 12 commits February 25, 2025 16:25
Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Co-authored-by: Paweł Liberadzki <[email protected]>
Co-authored-by: Jan Hanca <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Co-authored-by: Paweł Liberadzki <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Jan Hanca <[email protected]>
Co-authored-by: Michał Pełka <[email protected]>
Co-authored-by: Paweł Liberadzki <[email protected]>
Signed-off-by: Jan Hanca <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
| Term | Description |
| --------- | -------------------------------------------------------------------------------- |
| Spawnable | Robot or other object that can be spawned in simulation runtime. |
| Entity | Spawned spawnable, it has a unique name. |
Copy link
Contributor

@adamdbrw adamdbrw Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the standard, the entity is a very generic term, which has slightly different meaning in each simulator. In general, entities are any distinct objects at a granularity of interest to us, including "whole" object such as simulated robots and humans, boxes in a warehouse, but also "part of" objects such as sensors on a robot.

There are two perspective to consider:

  • Conceptual: Anything that satisfies entity interfaces consistently should be considered an entity. This might amount to a lot of entities but offers full flexibility & power. "Part of" entities might be tagged as such etc.
  • Utilitarian: Anything useful for these interfaces should be considered an entity. In some cases these might be only spawnables.

Open to discuss this further.

Copy link
Contributor Author

@michalpelka michalpelka Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In O3DE entity is fundamental block of building spawnable or prefab. It has different meaning to entity defined in rep410.
So I will use "O3DE entity" for entities that are part of O3DE prefab or spawnable, and "Simulation entity" regarding rep410.

So, "Simulation entity" maps to the root entity of "O3DE entity" in prefab that were spawned by ROS 2 EntityManager .

Technically, it is not root entity, but its first child, due to something called Container Entity

This "O3DE entity" is modified by ROS 2 EntityManager when spawning:

  • caching all data from simulationinfo,
  • adjusting pose,
  • add tags from simulationinfo.

"Simulation entity" can be introduced to O3DE only by calling SpawnEntity service. Entities that are created in other ways are not "Simulationions entities" e.g.,:

  • entities created by loading a level,
  • spawned entities using other APIs,
  • spawned by other gems (e.g., terrain gem)
  • entities that are descendants to "Simulation entity".

In other words, in the current shape, simulation interfaces will allow you to spawn robot and move it around, but will not let you to:

  • modify LiDAR on top of the robot,
  • change location of the decoration in level's prefab.

Let's discuss if it what is needed, or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can think about relaxing some constraints by letting every "O3DE entity" to be "Simulation entity" .
That will lead to some problems:

  • names of "O3DE entity" does not have to be unique,
  • robots that are created by adding them in Editor will not have valid EnityInfo.

Copy link
Contributor

@jhanca-robotecai jhanca-robotecai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two comments left from the internal review:

  • add information about Gems and Gem's names
  • clarify what is the starting state of the simulation

@michalpelka
Copy link
Contributor Author

The feature will be implemented in branch https://github.com/o3de/o3de-extras/tree/feature/simulation_interfaces. This branch should be targeted with PRs regarding this RFC. When simulation interfaces implementation will be ready (or partially ready), it will be rebase-merge to development via separate PR.
It is intended to apply two-stage review.

* Changes to entity definition

Signed-off-by: Michał Pełka <[email protected]>

* Adjust RFC to utilzie AZPhysics

Signed-off-by: Michał Pełka <[email protected]>

---------

Signed-off-by: Michał Pełka <[email protected]>
@jhanca-robotecai
Copy link
Contributor

I believe this RFC should be updated based on the changes in the code; next the PR can be merged.

@jhanca-robotecai jhanca-robotecai merged commit a739f34 into o3de:main Jul 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants