This project enables GPU-accelerated LIDAR simulation for robotics.
The O3DE Robotec GPU Lidar Gem is a module working with O3DE ROS2 Gem and extending it with a fast and scalable LiDAR implementation by making use of the Robotec GPU Lidar library.
Combined with the O3DE ROS2 Gem's Lidar Sensor Component
the O3DE RGL Gem allows for creation of a configurable,
high - performance LiDAR. The Gem provides a faithful representation of the simulated environment by supporting the
following visuals:
and providing the following features:
You can fully customize the LiDAR's settings using the O3DE Level Editor. Those include properties like:
You can also choose one of the presets provided by the ROS2 Gem to create a LiDAR model that fits your needs.
The following ROS2 packages installed on your system:
cyclonedds
,fastrtps
,radar-msgs
.You can install those packages with the following commands:
sudo apt install -y ros-${ROS_DISTRO}-cyclonedds ros-${ROS_DISTRO}-rmw-cyclonedds-cpp
sudo apt install -y ros-${ROS_DISTRO}-fastrtps ros-${ROS_DISTRO}-rmw-fastrtps-cpp
sudo apt install -y ros-${ROS_DISTRO}-radar-msgs
IMPORTANT: You do not need to download or set up the RobotecGPULidar library itself and only have to meet the RUNTIME requirements.
Clone the Gem's repository.
git clone https://github.com/RobotecAI/o3de-rgl-gem.git
Switch to the correct branch. \ Depending on which version of O3DE and ROS2 gem you use this step may differ. Below is a table of supported build combinations:
o3de-rgl-gem | o3de/o3de-extras | Robotecai/o3de-extras | o3de |
---|---|---|---|
development branch | development branch | N/A | development branch |
development branch | N/A | rgl/stable-dev branch | Release 2310.3 |
main branch, O3DE_2409 tag | Release 2409.x | N/A | Release 2409.x |
main branch, O3DE_2310 tag | Release 2310.x | N/A | Release 2310.x |
Note: This table describes build combinations that are guaranteed to work. There may exist other working build combinations.
Register the Gem. \ You can either register the gem through the Command Line Interface or the O3DE Project Manager:
cd <o3de-dir>
./scripts/o3de.sh register --gem-path <gem-path>
Enable the Gem in your project. \ Once again you can either enable it through the Command Line Interface or the O3DE Project Manager:
Note: Please, make sure to enable the ROS2 Gem first.
./scripts/o3de.sh enable-gem -gn RGL -pp <project-path>
Create an entity with a ROS2 Lidar Sensor
component.
Within your O3DE project add a new entity by right - clicking on the viewport and selecting Create entity.
Select the newly created entity within the Entity Outliner. Next, within the Entity Inspector select
Add Component.
Then, search for ROS2 Lidar Sensor
and add it to your entity using the left mouse button.
Note: You need to add the required ROS2 Frame
component as well.
Select RobotecGPULidar
as your LiDAR implementation.
In the Entity Inspector find the ROS2 Lidar Sensor
component and change the Lidar Implementation
to RobotecGPULidar
.
Note: If you do not see the RobotecGPULidar
implementation, please make sure you followed the Setup
instructions correctly.
Customize your LiDAR.
After following through all previous instructions, you can customize the ROS2 Lidar Sensor
component in the Entity
Inspector to fit all your needs.
The RGL gem allows for global scene configuration. To achieve this:
Add the RGL Scene Configuration
component to the Level
entity.
The Level entity is the root entity, and it can be found in the uppermost section of the Entity Outliner.
In the Entity Inspector select Add Component . Then search for the RGL Scene Configuration
component and add
it to the entity.
Customize the scene configurations.
In the Entity Outliner, under the RGL Scene configuration
component parameters,
you can customizez the global scene configuration to fit your needs.
libRobotecGPULidar.so
fileIf you encounter any issues relating the libRobotecGPULidar.so
file please follow these steps:
Code/3rdParty/RobotecGPULidar/
directory.DOWNLOAD_RGL
file under the Code/
directory, delete it.One common issue is when the lidar detects unwanted geometry as shown below.
You can fix this with the following steps:
Locate the Excluded Entities
section in the ROS2 Lidar Sensor
component properties.
Add a new excluded entity. You can select it in the Viewport or in the Entity Outliner.
The entity's name should appear in the Excluded Entities list (as seen on the image below).
If this section does not seem to help, feel free to post an issue on the gem's github repository in which you describe the problem you are facing.