Skip to content

Commit f70f9ae

Browse files
authored
Update RGL and bump version of the Plugin (#56)
* Update RGL to version 0.20.0 * Update pre-built libraries docs * Update docs * Add note to pattern presets update rate * Bump RGLGazeboPlugin version (0.1.2 -> 0.2.0)
1 parent 7e5833b commit f70f9ae

File tree

6 files changed

+31
-26
lines changed

6 files changed

+31
-26
lines changed

README.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,34 @@ Key features:
2525

2626
- GPU: CUDA-enabled
2727

28-
- Nvidia Driver: [See RGL requirements](https://github.com/RobotecAI/RobotecGPULidar/tree/v0.17.0#runtime-requirements)
28+
- Nvidia Driver: [See RGL requirements](https://github.com/RobotecAI/RobotecGPULidar/tree/v0.20.0#runtime-requirements)
2929

3030
## Installation:
3131

3232
### Using pre-built libraries
3333
1. Download libraries from [release](https://github.com/RobotecAI/RGLGazeboPlugin/releases).
3434
2. Make RGL plugins visible to Gazebo:
3535
- Move libraries to the plugin's directories.
36-
```shell
37-
# If Gazebo installed from apt:
38-
cp libRobotecGPULidar.so /usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/
39-
cp libRGLServerPluginInstance.so /usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/
40-
cp libRGLServerPluginManager.so /usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/
41-
cp libRGLVisualize.so /usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins/gui/
42-
```
36+
- If Gazebo installed from apt:
37+
```shell
38+
cp libRobotecGPULidar.so /usr/lib/x86_64-linux-gnu/gz-sim-8/plugins
39+
cp libRGLServerPluginInstance.so /usr/lib/x86_64-linux-gnu/gz-sim-8/plugins
40+
cp libRGLServerPluginManager.so /usr/lib/x86_64-linux-gnu/gz-sim-8/plugins
41+
cp libRGLVisualize.so /usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui
42+
```
43+
- If Gazebo installed from the ROS repository ([see](https://gazebosim.org/docs/latest/ros_installation/#installing-the-default-gazebo-ros-pairing)):
44+
```shell
45+
cp libRobotecGPULidar.so /opt/ros/${ROS_DISTRO}/opt/gz_sim_vendor/lib/gz-sim-8/plugins
46+
cp libRGLServerPluginInstance.so /opt/ros/${ROS_DISTRO}/opt/gz_sim_vendor/lib/gz-sim-8/plugins
47+
cp libRGLServerPluginManager.so /opt/ros/${ROS_DISTRO}/opt/gz_sim_vendor/lib/gz-sim-8/plugins
48+
cp libRGLVisualize.so /opt/ros/${ROS_DISTRO}/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui
49+
```
4350
- Or set environment variables:
4451
```shell
45-
# Assuming that libraries:
46-
# libRGLServerPluginInstance.so, libRGLServerPluginManager.so and libRobotecGPULidar.so
47-
# are located in RGLServerPlugin directory,
48-
# and libRGLVisualize.so in RGLGuiPlugin.
52+
# Assuming that system plugin libraries are located in RGLServerPlugin directory,
53+
# and gui plugins (libRGLVisualize.so) in RGLVisualize.
4954
export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/RGLServerPlugin:$GZ_SIM_SYSTEM_PLUGIN_PATH
50-
export GZ_GUI_PLUGIN_PATH=`pwd`/RGLGuiPlugin:$GZ_GUI_PLUGIN_PATH
55+
export GZ_GUI_PLUGIN_PATH=`pwd`/RGLVisualize:$GZ_GUI_PLUGIN_PATH
5156
```
5257
### Building from source
5358

@@ -57,15 +62,14 @@ docker build \
5762
--target=exporter \
5863
--output=install .
5964
```
65+
*Note: Build with [ROS Jazzy](https://docs.ros.org/en/jazzy/index.html) using [colcon](https://colcon.readthedocs.io/en/released/)*
6066

6167
#### Manual
6268
```shell
63-
mkdir build
64-
cd build
65-
cmake ..
66-
make -j
67-
make install
69+
mkdir build && cd build
70+
cmake .. && make -j && make install
6871
cd ..
72+
# Make it visible to Gazebo via environment variables:
6973
export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/install/RGLServerPlugin:$GZ_SIM_SYSTEM_PLUGIN_PATH
7074
export GZ_GUI_PLUGIN_PATH=`pwd`/install/RGLVisualize:$GZ_GUI_PLUGIN_PATH
7175
```
@@ -186,7 +190,8 @@ Inside the link entity in your model, add a custom sensor:
186190
```
187191

188192
- **pattern_preset**\
189-
We have prepared several lidar presets. You can type in the name of a LiDAR to use its pattern (all available patterns are shown below).
193+
We have prepared several lidar presets. You can type in the name of a LiDAR to use its pattern (all available patterns are shown below).\
194+
*Note: All presets are assumed to work at 10Hz update rate*
190195
```xml
191196
<pattern_preset>Alpha Prime</pattern_preset>
192197
<pattern_preset>Puck</pattern_preset>

RGLServerPlugin/include/RGLServerPluginManager.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private:
9999
const gz::sim::Entity& entity,
100100
const gz::sim::components::LaserRetro* laser_retro);
101101

102-
void UpdateRGLEntityPoses(const gz::sim::EntityComponentManager& ecm);
102+
void UpdateRGLEntityTransforms(const gz::sim::EntityComponentManager& ecm);
103103

104104
std::unordered_set<gz::sim::Entity> GetEntitiesInParentLink(
105105
gz::sim::Entity entity,

RGLServerPlugin/src/RGLServerPluginManager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void RGLServerPluginManager::PostUpdate(
7676
return RemoveEntityFromRGLCb(entity, visual, geometry);
7777
});
7878

79-
UpdateRGLEntityPoses(ecm);
79+
UpdateRGLEntityTransforms(ecm);
8080
}
8181

8282
} // namespace rgl

RGLServerPlugin/src/Scene.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ bool RGLServerPluginManager::SetLaserRetroCb(
156156
}
157157
#pragma clang diagnostic pop
158158

159-
void RGLServerPluginManager::UpdateRGLEntityPoses(const gz::sim::EntityComponentManager& ecm)
159+
void RGLServerPluginManager::UpdateRGLEntityTransforms(const gz::sim::EntityComponentManager& ecm)
160160
{
161161
for (auto entity: entitiesInRgl) {
162162
rgl_mat3x4f rglMatrix = FindWorldPoseInRglMatrix(entity.first, ecm);
163-
if (!CheckRGL(rgl_entity_set_pose(entity.second.first, &rglMatrix))) {
164-
gzerr << "Failed to update pose for entity (" << entity.first << ").\n";
163+
if (!CheckRGL(rgl_entity_set_transform(entity.second.first, &rglMatrix))) {
164+
gzerr << "Failed to update transform for entity (" << entity.first << ").\n";
165165
}
166166
}
167167
}

external/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if(RGL_CUSTOM_LIBRARY_PATH AND RGL_CUSTOM_API_HEADER_PATH) # Copy custom Robotec
2828
file(COPY ${RGL_CUSTOM_LIBRARY_PATH} DESTINATION ${RGL_LIBRARY_DIR})
2929
file(COPY ${RGL_CUSTOM_API_HEADER_PATH} DESTINATION ${RGL_PROJECT_DIR})
3030
else() # Download RobotecGPULidar from the release
31-
set(RGL_TAG "v0.17.0")
31+
set(RGL_TAG "v0.20.0")
3232
set(RGL_API_CORE_HEADER_PATH "${RGL_API_HEADERS_DIR}/core.h")
3333
set(RGL_SO_ZIP_FILENAME "RGL-core-linux-x64.zip")
3434
set(RGL_SO_ZIP_URL "https://github.com/RobotecAI/RobotecGPULidar/releases/download/${RGL_TAG}/${RGL_SO_ZIP_FILENAME}")

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>RGLGazeboPlugin</name>
5-
<version>0.1.2</version>
5+
<version>0.2.0</version>
66
<description>RGL Gazebo Plugin</description>
77
<maintainer email="[email protected]">Mateusz Szczygielski</maintainer>
88
<license>Apache License 2.0</license>

0 commit comments

Comments
 (0)