Skip to content

Conversation

michalpelka
Copy link
Collaborator

No description provided.

Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
@michalpelka michalpelka changed the title Initial, review of RFC to be submitted to o3de/sig-simulation Initial, internal review of RFC to be submitted to o3de/sig-simulation Mar 4, 2025
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Copy link

@PawelLiberadzki PawelLiberadzki left a comment

Choose a reason for hiding this comment

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

Great aggregation of all concepts in this topic. These are my comments to the first part of this RFC. Tomorrow I will add more.

Copy link

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

Great work.

What I miss in this RFC is a few more technical details listed in the comments.

Comment on lines 47 to 57
The implementation will be split into three (or more system components):
- ROS 2 Entities manager \
It will be responsible for the lifetime of spawned objects, it will cache initial positions.
- ROS 2 Named poses manager \
It will be responsible for aggregating information in the Named Pose Game Component.
- ROS 2 Simulator manager \
It will be responsible for modifying the global state of the simulation (e.g., pausing, reloading).

We will decouple the implementation of those managers from the ROS 2 service.
Every manager will need to expose public methods that will be callable both from C++ and ROS 2.
The purpose of that approach is to enable testability without the need for a ROS domain.

Choose a reason for hiding this comment

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

Should all system components land in the ROS 2 Gem? As a downside of the RFC you mentioned the increase of the ROS 2 codebase. Shouldn't we start thinking about splitting the Gem into smaller pieces?

  • ROS 2 - gem for the node and base sensor component to inherit from
  • RobotImporter - gem for importing URDF/SDF and possibly more
  • ROS 2 Sensors - gem with basic implementation of all sensors
    etc.

This implementation might be the first one to think about it as you mention decoupling c++ and ROS 2 service interfaces.

Choose a reason for hiding this comment

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

Regarding this topic, we have also considered moving feature implementations (Entity manager, Named pose manager, ...) into separate Gem, and placing their ROS 2 interfaces in ROS 2 Gem. If I remember correctly, this idea was not rejected explicitly, so we may also discuss it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Keeping open for discussion. I think it should be a new gem

- A component called `SimulationInfoComponent` will be created and attached to the root entity.
That component will be used to cache information in `simulationinfo` to be easily accessible in the future.
- [TagComponent](https://www.docs.o3de.org/docs/user-guide/components/reference/gameplay/tag/) from LmbrCentral gem at root entity will be created (if not present in prefab).
- TagComponent will be updated with a list of new tags.

Choose a reason for hiding this comment

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

I do not fully get what is the source of new tags.

Co-authored-by: Paweł Liberadzki <pawel.liberadzki@gmail.com>
Co-authored-by: Jan Hanca <jan.hanca@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Copy link

@PawelLiberadzki PawelLiberadzki left a comment

Choose a reason for hiding this comment

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

This is the second part of my remarks, covering rest of this document.

Comment on lines 47 to 57
The implementation will be split into three (or more system components):
- ROS 2 Entities manager \
It will be responsible for the lifetime of spawned objects, it will cache initial positions.
- ROS 2 Named poses manager \
It will be responsible for aggregating information in the Named Pose Game Component.
- ROS 2 Simulator manager \
It will be responsible for modifying the global state of the simulation (e.g., pausing, reloading).

We will decouple the implementation of those managers from the ROS 2 service.
Every manager will need to expose public methods that will be callable both from C++ and ROS 2.
The purpose of that approach is to enable testability without the need for a ROS domain.

Choose a reason for hiding this comment

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

Regarding this topic, we have also considered moving feature implementations (Entity manager, Named pose manager, ...) into separate Gem, and placing their ROS 2 interfaces in ROS 2 Gem. If I remember correctly, this idea was not rejected explicitly, so we may also discuss it here.

Let us investigate moving a `Simulated PhysX Rigid Body'.
We cannot simply call :
```cpp
AZ::TransformBus::Event(entityId, &AZ::TransformBus::Events::SetWorldTM, transform);

Choose a reason for hiding this comment

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

There is no need to support robots that are incorrectly made

I would follow this idea everywhere in this implementation. We rather have to make some assumptions, or put some requirements on what is supported with this implementation. Fortunately, in most places we do like that.

Co-authored-by: Paweł Liberadzki <pawel.liberadzki@gmail.com>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
jhanca-robotecai and others added 4 commits March 17, 2025 15:33
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Michał Pełka <michal.pelka@robotec.ai>
Co-authored-by: Paweł Liberadzki <pawel.liberadzki@robotec.ai>
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
@jhanca-robotecai
Copy link

jhanca-robotecai commented Mar 17, 2025

Comments that should be addressed - noted in #2

  • add information about Gems and Gem's names
  • clarify what is the starting state of the simulation
  • clean-up the sample c++ code

Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
@michalpelka
Copy link
Collaborator Author

Closed in favour of o3de#95

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