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

Merge into jazzy #77

Merged
merged 7 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "cloi_common_interfaces"]
path = cloi_common_interfaces
url = https://github.com/lge-ros2/cloi_common_interfaces.git
branch = 4.0.0
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM ros:jazzy-ros-base

ENV HOSTNAME cloisim_ros
ENV RMW_IMPLEMENTATION rmw_cyclonedds_cpp
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NOWARNINGS yes

WORKDIR /opt/lge-ros2/src

RUN git clone https://github.com/lge-ros2/cloisim_ros.git -b ${ROS_DISTRO}
RUN git clone https://github.com/lge-ros2/cloi_common_interfaces.git -b ${ROS_DISTRO}
RUN git clone --recursive https://github.com/lge-ros2/cloisim_ros.git -b ${ROS_DISTRO}

WORKDIR /opt/lge-ros2

RUN apt update && apt upgrade -y && rosdep update && \
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro $ROS_DISTRO
RUN apt update && apt upgrade -y && \
apt install -y -q ros-${ROS_DISTRO}-rmw-cyclonedds-cpp && \
rosdep update && \
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro ${ROS_DISTRO}

RUN ["/bin/bash", "-c", "source /opt/ros/${ROS_DISTRO}/setup.bash; colcon build --symlink-install"]

Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ ROS2 simulation device packages to connect CLOiSim(the unity3D based multi-robot

## Install ROS2 jazzy

follow the guideline on below link.
follow the guideline on below link.

<https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debians.html>
<https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debians.html>

## Prerequisite

```shell
mkdir -p ~/cloisim_ws/src
cd ~/cloisim_ws/src
git clone --recursive https://github.com/lge-ros2/cloisim_ros.git -b jazzy

sudo apt update
sudo apt install -y python3-rosdep

sudo rosdep init
rosdep update
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro jazzy
Expand All @@ -29,6 +34,7 @@ Set up ROS2 environment first

```shell
source /opt/ros2/jazzy/setup.bash
cd ~/cloisim_ws
colcon build --symlink-install --packages-up-to cloisim_ros_bringup
```

Expand All @@ -45,6 +51,14 @@ check here [details](https://github.com/lge-ros2/cloisim_ros/tree/jazzy/cloisim_

### Run cloisim_ros (robot + world)

#### DDS

recommended to use cylcone DDS

```shell
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
```

#### Shared Memory DDS with FastRTPS

It's experimental feature for cloisim_ros. Use absolute path in FASTRTPS_DEFAULT_PROFILES_FILE environment variable.
Expand Down
1 change: 1 addition & 0 deletions cloi_common_interfaces
Submodule cloi_common_interfaces added at c081a2
2 changes: 1 addition & 1 deletion cloisim_ros_actor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_actor</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>node for actor plugin</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_base/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_base</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>CLOiSim-ROS base class for other CLOiSim-ROS</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_bridge_zmq/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_bridge_zmq</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>bridge for cloisim(simulator) connection through ZMQ</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
4 changes: 2 additions & 2 deletions cloisim_ros_bridge_zmq/src/bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ bool Bridge::CloseSocket(void *&target)

bool Bridge::Receive(void **buffer, int &bufferLength, bool isNonBlockingMode)
{
if (&m_msgRx == nullptr || pSockRx_ == nullptr)
if (pSockRx_ == nullptr)
{
DBG_SIM_ERR("Cannot Receive data due to uninitialized pointer m_msgRx(%p) or pSockRx_(%p)", (void *)&m_msgRx, pSockRx_);
DBG_SIM_ERR("Cannot Receive data due to uninitialized pointer pSockRx_(%p)", pSockRx_);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_bringup</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>Bringup scripts and configurations for cloisim_ros</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<maintainer email="sungkyu.kang@lge.com">Sungkyu Kang</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_bringup_param/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_bringup_param</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>Bringup scripts and configurations for cloisim_ros</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_camera/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_camera</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>Virtual camera/depth camera/segmentation camera for CLOiSim</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
4 changes: 2 additions & 2 deletions cloisim_ros_elevator_system/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_elevator_system</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>elevator system for simulation</description>
<maintainer email="sungkyu.kang@lge.com">Sungkyu Kang</maintainer>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>elevator_system_msgs</depend>
<build_depend>elevator_system_msgs</build_depend>
<depend>cloisim_ros_bringup_param</depend>
<depend>cloisim_ros_base</depend>

Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_gps/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_gps</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>virtual gps for simulation</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
30 changes: 26 additions & 4 deletions cloisim_ros_ground_truth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,37 @@ ros2 run cloisim_ros_ground_truth standalone
ros2 run cloisim_ros_ground_truth standalone --ros-args -p target_parts_name:=tracking
```

## How to monitor the message of topic.
## How to configure

```shell
ros2 topic echo /ground_truth
if you want to tracking dynamic props, set `enable` attribute in `<props>` element to `true`.

```xml
<plugin name="GroundTruthPlugin" filename="libGroundTruthPlugin.so">
<publish_frequency>5</publish_frequency>
<props enable="true">
<prop class_id="10">box</prop>
<prop class_id="11">cylinder</prop>
<prop class_id="12">sphere</prop>
</props>
<list>
<target tracking_id="1" class_id="101">L9S</target>
<target tracking_id="11" class_id="100">Former1</target>
</list>
</plugin>
```

### samples

You need to configure the ground truth list from [here](https://github.com/lge-ros2/sample_resources/blob/415a700c5280286a28690cf032cd0f4aa826a150/worlds/lg_seocho_with_actors.world#L301).

## Examples of outputs

## How to monitor the message of topic

```shell
ros2 topic echo /ground_truth
```

### Examples of outputs

```shell
---
Expand Down
4 changes: 2 additions & 2 deletions cloisim_ros_ground_truth/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_ground_truth</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>world plugin to retrieve ground truth</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
<author email="hyunseok7.yang@lge.com">Hyunseok Yang</author>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>perception_msgs</depend>
<build_depend>perception_msgs</build_depend>
<depend>cloisim_ros_bringup_param</depend>
<depend>cloisim_ros_base</depend>

Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_imu/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_imu</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>virtual imu for simulation</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_joint_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_joint_control</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>joint_control package for simulator</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_lidar/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_lidar</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>virtual lidar for simulation</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_micom/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_micom</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>micom package for simulator</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_msgs</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>interfaces package for cloisim_ros</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_multicamera/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_multicamera</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>virtual multi-camera for simulator</description>
<maintainer email="sungkyu.kang@lge.com">Sungkyu Kang</maintainer>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_protobuf_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_protobuf_msgs</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>CLOiSim-ROS interafces for communication between simulator and CLOiSim-ROS</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_realsense/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_realsense</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>virtual realsense for simulator</description>
<maintainer email="sungkyu.kang@lge.com">Sungkyu Kang</maintainer>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_sonar/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_sonar</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>virtual sonar for simulation</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_websocket_service/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_websocket_service</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>websocket service for cloisim(simulator) connection port control</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_world/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_world</name>
<version>4.2.1</version>
<version>4.3.0</version>
<description>Utilities to interface with Unity through ROS.</description>
<maintainer email="hyunseok7.yang@lge.com">Hyunseok Yang</maintainer>
<license>MIT</license>
Expand Down