Skip to content

RFC Refactor - Split ROS2 Gem #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jhanca-robotecai
Copy link
Contributor

This is an RFC for splitting the ROS2 Gem into smaller modules.

Note: this is an initial version, with missing information on API for creating components. This section will be filled in later. The rest of the document is ready for the review.

| | - automated handling of simulation time |
| | - handling of transformation frames |
| | - handling ROS 2 _namespaces_ and ROS 2 _topics_ |
| | - dynamic objects spawning via ROS 2 _services_ |
Copy link

Choose a reason for hiding this comment

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

I think dynamic spawning feature should not be the part of ROS 2 gem.

However, we can handle it in the next step, after the initial split.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are few more components in the namespace that should be removed from the ROS2 Gem, e.g. FollowingCameraComponent. I will list them after this RFC is fully implemented and their visibility increases.

| Gem name | O3DE dependencies | External dependencies |
| ------------------- | -------------------------------------------------- | --------------------- |
| _ROS2_ | - | _ROS 2_ ecosystem |
| _ROS2Sensors_ | _ROS2_, _PhysX5_ | - |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

While developing the solution I noticed that ROS2WheelOdometrySensor uses the data from the WheelControllerComponent. This means ROS2Sensors Gem needs to depend on ROS2Controllers Gem. I will set this dependency in the first implementation before we decide how to solve this issue properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other option is to move ROS2WheelOdometrySensor to ROS2Controllers Gem and ROS2SensorBase to ROS2 Gem.

- Posts by OpenRobotics and Robotec.ai in their social media.
- New robotic templates.

### Are there any open questions?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is one open question about the namespaces. Currently, all sensors, controllers, and the importer are in the ROS2:: namespace. We might want to keep it as is, to ensure the projects using the current single-Gem implementation require only a simple change of adding more Gems in the project.json file, or switch namespaces completely to match the new Gems. I am open for comments.

@jhanca-robotecai jhanca-robotecai marked this pull request as ready for review June 3, 2025 09:04
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.

2 participants