Skip to content
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

RFC - ROS2 Gem #33

Closed
adamdbrw opened this issue Apr 7, 2022 · 5 comments
Closed

RFC - ROS2 Gem #33

adamdbrw opened this issue Apr 7, 2022 · 5 comments
Labels
rfc-feature Request for Comments for a Feature

Comments

@adamdbrw
Copy link

adamdbrw commented Apr 7, 2022

Summary:

O3DE will support robotic simulation through a dedicated Gem, providing components and tools which make it easier for ROS2 developers to migrate their projects to O3DE.

What is the relevance of this feature?

ROS2 is de facto standard in robotics, with a substantial and quickly growing user base. It supports numerous use-cases in robotics, both academic and industrial, and a variety of platforms such as warehouse logistics robots, agricultural robots, airborne drones, underwater platforms and autonomous vehicles. ROS2 Gem will encourage robotic communities to use O3DE.

Feature design description:

ROS2 Gem RFC can be seen in two perspectives:

  1. A bare minimum Gem - such as proposed in this PR.
  2. Feature set we would like ROS2 Gem to have. Some features have already been proposed (see this query). Each of these issues could benefit form SIG comments.

We can start with (1) first.

Features for the bare minimum Gem:

  • Cmake tool for ROS2 targets (projects can build with ROS2)
  • System component which includes
    • Simulation clock (source of time for ROS2 simulated systems)
    • Central ROS2 node (basic ROS2 entity)

Discussion for (2) is very important as well and I would like to put that on the radar. The ROS2 Gem will include a number of components such as:

  • Sensor components (Lidars, Cameras, IMU, GPS etc).
  • Robot control components

These will provide useful abstractions to be extendable with user types and custom implementations.
The Gem should also include a number of Assets to start with (environment and robot models).
The Gem should also include tools and extensions such as importing URDF files (and support in Asset Processor).
A robotic simulation project template would be useful as well, as well as a demo/tutorial scene.

Technical design description:

For a bare minimum:

  1. ROS2 Gem includes a simple cmake function for project targets (which ROS2 packages does your target depend on?)
    • This allows the user to specify which ROS2 packages to include. Custom messages are a good example of a package that users would want to use with O3DE on the project level.
    • It should respect ROS2 packages visibility in a typical ROS2 fashion (through environment sourcing).
    • It will detect whether ROS2 is installed and sourced while building the Gem, warns and returns if this is not the case
  2. ROS2 Gem includes a simulation clock, which is necessary to correctly timestamp ROS2 messages produced by the simulation. Time source should work well with non-real time modes.
    • The clock publishes on /clock topic
    • The Gem system component should expose time-stamping interface
  3. ROS2 Gem provides an O3DE system component responsible for ROS2 initialization (rclcpp::init), creating the main simulation node, and listening for inbound ROS2 communication (rclcpp::spin).
    • For most users, a single-node approach is optimal, but users are not prevented from creating their own nodes.

What are the advantages of the feature?

Solution for common robotic simulation needs. Users don't need to implement the entire framework repeatedly. ROS2 community is attracted to O3DE.

What are the disadvantages of the feature?

To respect the ROS2 way, the environment needs to be sourced before the build.

How will this be implemented or integrated into the O3DE environment?

Since this is a separate Gem, the integration is quite straightforward.

Are there any alternatives to this feature?

Explain what the impact might be of not doing this.

O3DE would not be a good choice for robotic simulation.

Note that other game engines already have solutions for that.

How will users learn this feature?

  • A design documentation for the Gem will be provided as the development progresses
  • ROS2 developers will familiarize themselves with O3DE through existing documentation
  • A tutorial oriented towards this specific group and their needs could be very useful

Are there any open questions?

  • What are the most useful sub-features for this Gem and their priorities?
  • How can we most efficiently provide robotic Assets for simulation users?
@SelfishOlex
Copy link

It's not clear if this gem will live outside of o3de's main repository or in it. Which one is it?

@adamdbrw
Copy link
Author

adamdbrw commented Apr 9, 2022

My intention is that it will live inside the o3de repository.

@adamdbrw
Copy link
Author

Sig-core has decided that the Gem should live here, at least for now.

@lemonade-dm
Copy link
Contributor

The ROS2 Gem has been moved to their repo, so SIG-Core doesn't need to approve this RFC anymore

@thefranke
Copy link

@lgleim This I believe is now part of @o3de/sig-simulation ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc-feature Request for Comments for a Feature
Projects
None yet
Development

No branches or pull requests

4 participants