Skip to content

Commit

Permalink
component documentation for frame, system and lidar (#2510)
Browse files Browse the repository at this point in the history
* component documentation for frame, system and lidar
* The description of GNSS sensor component. (#2518)
* Add documentation for ROS2FrameEditorComponent (#2516)
* Applied review comments
---------
Signed-off-by: Adam Dąbrowski <[email protected]>
Co-authored-by: Michał Pełka <[email protected]>
Co-authored-by: Artur Kamieniecki <[email protected]>
  • Loading branch information
adamdbrw authored Feb 22, 2024
1 parent 39471f7 commit 7efd373
Show file tree
Hide file tree
Showing 16 changed files with 261 additions and 0 deletions.
12 changes: 12 additions & 0 deletions content/docs/user-guide/components/reference/ros2/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: ROS 2 Components
linktitle: ROS 2
description: Using Robot Operating System (ROS 2) components in Open 3D Engine (O3DE).
---

Refer to the [Robotics](/docs/user-guide/interactivity/robotics) documentation to learn more about robotics simulation features of O3DE.

ROS 2 Gem components can be divided into the following categories:
- [Core components](core), essential to running simulations independent of the type of robot.
- [Sensor components](sensors), responsible for creating and publishing data of simulated robot sensors.
- [Control components](control), handling movement of mobile bases and robot arms due to control commands.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: ROS 2 Control Components
linktitle: Control
description: Components for robot control with Robot Operating System (ROS 2) in Open 3D Engine (O3DE).
---

Refer to the [Robotics](/docs/user-guide/interactivity/robotics) documentation to learn more about robotics simulation features of O3DE.

- [GeoReference Level Component](ros2-georeference.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: ROS 2 Georeference Level Component
linktitle: ROS 2 Georeference Level Component
description: The ROS 2 Georeference Level component enables you to specify the geographical location of your simulation within the Robot Operating System (ROS 2) in Open 3D Engine (O3DE).
---

The **ROS 2 Georeference Level** component allows you to choose the geographical location of your simulation. This component is a level component and should be added to the level entity. If you are using, for example, the [GNSS Sensor Component](../sensors/ros2-gnss-sensor.md), it complements its functionality.

## Provider

[ROS 2 Gem](/docs/user-guide/gems/reference/robotics/ros2)

## Dependencies

None

## Properties

![ROS 2 Georeference Level Component Properties](/images/user-guide/components/reference/robotics/ros2/ros2-georeference-component.png)

| Property | Description | Values | Default |
|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------|-------------|-----------------|
| **Altitude** | The elevation of the ENU origin entity above Earth's WGS84 ellipsoid | meters | 0 |
| **Latitude** | The north-south geographical coordinate in WGS84, where north is positive | degrees | 0 |
| **Longitude** | The east-west geographical coordinate in WGS84, where east is positive | degrees | 0 |
| **ENU Origin Transform** | Entity that has a geographical location assigned, and its local coordinate system follows ENU (East-North-Up) directions | Entity | |

## Usage

1. Identify a location in your level with a known geographical position. This could be a corner of a building or an intersection of roads.
2. Create an empty entity in known location.
3. Rotate the entity so that its local coordinate system aligns with mapping:
- X should point East.
- Y should point North.
- Z should point up.
4. In the **ROS 2 Georeference Level component**, enter the geographical location of the entity and set the **ENU Origin Transform** to reference the entity mentioned above.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: ROS 2 Core Components
linktitle: Core
description: Core components for Robot Operating System (ROS 2) in Open 3D Engine (O3DE).
---

The following pages describe the ROS 2 Gem core components:
- [System Components](ros2-system-component.md).
- [Frame components](ros2-frame).
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: ROS 2 Frame Component
linktitle: ROS 2 Frame
description: ROS 2 Frame component for Robot Operating System (ROS 2) in Open 3D Engine (O3DE).
---

The **ROS 2 Frame** component reflects the concept of ROS frames of reference for coordinates, which follow a [REP103 standard](https://www.ros.org/reps/rep-0103.html).
It is commonly used in any robotic system, for example sensors typically publish in their own reference frame, and
localization is about finding a transformation from robot local frame to a more general frame of reference.
**ROS 2 Frame** component also handles namespaces which are essential for multi-robot simulations.

## Provider

[ROS 2 Gem](/docs/user-guide/gems/reference/robotics/ros2)

## Dependencies

The **ROS 2 Frame** component depends on Transform Service, which is provided by **Transform** component.

## Properties

![ROS 2 Frame component properties - default namespace](/images/user-guide/components/reference/robotics/ros2/ros2-frame-component-namespace-default.png)
![ROS 2 Frame component properties - custom namespace](/images/user-guide/components/reference/robotics/ros2/ros2-frame-component-namespace-custom.png)

| Property | Description | Values | Default |
|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------|-------------|-------------------------------------------------------------|
| **Namespace Configuration** | Determines how to set the namespace for the component, which can be empty, custom, or derived from entity name. | Enumeration | Default (from name for top level entities, empty otherwise) |
| **Frame Name** | Name of the frame, which is used as `frame_id` field for published messages and broadcasted transforms. | String | `sensor_frame` |
| **Joint Name** | Name of the joint for this entity, which is supplementary information required by joint control APIs. | String | empty |
| **Publish Transform** | Determines whether the transformation to this frame's parent is included in the broadcasted transforms. | Boolean | true |
| **Effective namespace** | Read only value providing the effective namespace of the frame. It is automatically updated and takes other frames into consideration. | String | empty |

## Usage

**ROS 2 Frame** component handles namespace, frame id, and joint name associated with an entity, which is a part of a robot.
Many other components such as sensors and controllers depend on it. **ROS 2 Frame** works internally with these components to
ensure namespacing of topics, sending of proper `frame_id` in each message, and broadcasting of transforms to `/tf` and `/tf_static` topics.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: ROS 2 System Component
linktitle: ROS 2 System
description: System Component for Robot Operating System (ROS 2) in Open 3D Engine (O3DE).
---

The **ROS 2 System** component creates a default ROS 2 Node with an executor,
and handles singleton behaviors such as publishing simulation clock and broadcasting transforms.

## Provider

[ROS 2 Gem](/docs/user-guide/gems/reference/robotics/ros2)

## Dependencies

The ROS 2 System Component depends only on Physics System Service.

## Properties

The system component has no properties.

## Usage

ROS 2 System Component handles several singleton-like behaviors of the simulation.
You can make use of its **Node** to conveniently create publishers and subscribers.
When creating or updating ROS messages, you can use it to get current ROS timestamp from the simulation clock.
It is also internally used to publish static and dynamic transforms which are computed through **ROS 2 Frame** components.

Note that the simulation ROS node accessible through component's API is there as a convenience, and you can create your own nodes and executors if you wish.

## ROS2RequestsBus and ROS2Interface

The `ROS2RequestBus` alongside the `ROS2Interface` is an API system bus and interface
intended for both internal ROS 2 Gem components and external Gems.

| Request Name | Description | Parameters | Return | Scriptable |
|------------------------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|------------------------------------------------------------|-|
| `GetNode` | Returns simulation node which is already setup and executing. | None | Node: rclcpp::Node | No |
| `GetROSTimestamp` | Returns a ROS timestamp based on simulation clock. Timestamps are useful for any message with a header. | None | Time: simulation time in ROS format | No |
| `BroadcastTransform` | Broadcasts static or dynamic transforms. This API is used internally to handle ROS 2 Frame transform publishing. | T: transform to broadcast; IsDynamic: whether it is a dynamic transform | None | No |
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: ROS 2 Components
linktitle: ROS 2
description: Components for robot control with Robot Operating System (ROS 2) in Open 3D Engine (O3DE).
---

Refer to the [Robotics](/docs/user-guide/interactivity/robotics) documentation to learn more about robotics simulation features of O3DE.

ROS 2 Gem components can be divided into the following categories:
- [Lidar Sensor component](ros2-lidar-sensor.md)
- [GNSS Sensor Component](ros2-gnss-sensor.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Sensor Configuration
linktitle: Sensor Configuration
description: Robot Operating System (ROS 2) sensor configuration in Open 3D Engine (O3DE).
---

**Sensor Configuration** is a common part of all sensors, encapsulating topics as well as
[Quality of Service](https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Quality-of-Service-Settings.html) settings and frequency for publishing.

## Properties

| Property | Description | Values | Default |
|----------------|-------------------------------------------------------------------------------------------------------------|---------|---------|
| **Visualise** | Whether to show visualisation of sensor working in the simulation, such as drawing point clouds for lidars. | Boolean | true |
| **Publishing Enabled** | Turn publishing sensor data on or off. | Boolean | true |
| **Frequency** | How often to publish sensor data (per second). | Float | 10.0 |

**Sensor Configuration** can include multiple topics. For each topic, the following properties are listed:

| Property | Description | Values | Default |
|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|-------------------|
| **Topic** | Name of topic. Note that it should not include namespace, since namespaces are handled by **ROS 2 Frame** components. | String | Depends on sensor |
| **Reliability Policy** | Quality of Service (QoS) reliability setting. It controls whether published data needs to be delivered (with confirmation) or is only sent on best-effort basis. | Enumeration | Best Effort |
| **Durability Policy** | Quality of Service (QoS) durability setting. It controls whether published data persists for subscribers that join later. | Enumeration | Volatile |
| **History** | Quality of Service (QoS) history depth, which is how many messages are kept in the sender queue. | Integer | 5 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: ROS 2 GNSS Sensor Component
linktitle: ROS 2 GNSS Sensor
description: The ROS 2 GNSS Sensor component for the Robot Operating System (ROS 2) in Open 3D Engine (O3DE) simulates a GNSS (GPS) receiver and publishes corresponding messages.
---

The **ROS 2 GNSS Sensor** component encapsulates the simulation of a Global Navigation Satellite System (GNSS) receiver, providing data as if it were a real sensor. GNSSs include systems such as Global Positioning System (GPS) and Galileo. The GNSS component publishes messages containing the current geographical location as specified in the [NavSatFix](https://docs.ros2.org/latest/api/sensor_msgs/msg/NavSatFix.html) message format.

## Provider

[ROS 2 Gem](/docs/user-guide/gems/reference/robotics/ros2)

## Dependencies

[ROS 2 Frame Component](/user-guide/components/reference/ros2/core/ros2-frame)

## Properties

![ROS 2 GNSS Sensor Component Properties](/images/user-guide/components/reference/robotics/ros2/ros2-gnss-sensor-component.png)

| Property | Description | Values | Default |
|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------|-------------|-----------------|
| **Sensor Configuration** | See [Sensor Configuration properties](common/sensor-configuration.md) | | |

## Usage

1. Utilize the **ROS 2 Georeference Component** to establish the geographical localization of your level.
2. Add the **ROS 2 GNSS Sensor** to your robot to simulate data emanating from a GNSS receiver.
Loading

0 comments on commit 7efd373

Please sign in to comment.