From 6c71e6ec5eec96eb73d06b2756d13eb52b1eb6eb Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Sat, 27 Jan 2024 20:19:19 +0000 Subject: [PATCH 1/3] attempt to build ddsrouter --- .devcontainer/Dockerfile | 14 +++++++++++++- .devcontainer/dds.repos | 29 +++++++++++++++++++++++++++++ .devcontainer/install.sh | 22 ++++++++++++++++++++++ .github/workflows/docker-build.yml | 2 +- 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/dds.repos create mode 100644 .devcontainer/install.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f2dc2b72..c2c0c6f3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -44,7 +44,15 @@ RUN apt-get update \ libgflags-dev \ nlohmann-json3-dev \ ros-humble-image-* \ + python3 \ + cmake g++ pip \ + libasio-dev \ + libtinyxml2-dev \ + libssl-dev \ + python3-sphinx \ + libyaml-cpp-dev \ && rm -rf /var/lib/apt/lists/* + RUN git clone https://github.com/YDLIDAR/YDLidar-SDK.git &&\ mkdir -p YDLidar-SDK/build && \ cd YDLidar-SDK/build &&\ @@ -80,6 +88,10 @@ RUN git clone https://github.com/libuvc/libuvc.git &&\ ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute -ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp +#ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp + +COPY *repos *.sh /tmp/.devcontainer/ +RUN bash /tmp/.devcontainer/install.sh + RUN echo "source /opt/ros/humble/setup.bash" >> /etc/bash.bashrc \ No newline at end of file diff --git a/.devcontainer/dds.repos b/.devcontainer/dds.repos new file mode 100644 index 00000000..c697510a --- /dev/null +++ b/.devcontainer/dds.repos @@ -0,0 +1,29 @@ +repositories: + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: v1.3.1 + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: v1.1.0 + fastdds: + type: git + url: https://github.com/eProsima/Fast-DDS.git + version: v2.11.2 + dev-utils: + type: git + url: https://github.com/eProsima/dev-utils.git + version: v0.4.0 + ddspipe: + type: git + url: https://github.com/eProsima/DDS-Pipe.git + version: v0.2.0 + ddsrouter: + type: git + url: https://github.com/eProsima/DDS-Router.git + version: v2.0.0 + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.devcontainer/install.sh b/.devcontainer/install.sh new file mode 100644 index 00000000..d0c06ddd --- /dev/null +++ b/.devcontainer/install.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +source /opt/ros/humble/setup.bash +#apt update +#rosdep --rosdistro=humble update +pip install -U argcomplete + +rm -rf /opt/ros/lcas +mkdir -p /opt/ros/lcas/src +cd /opt/ros/lcas/src +vcs import < /tmp/.devcontainer/dds.repos +#rosdep install --from-paths . -r -i -y +cd /opt/ros/lcas +colcon build + + +#cd /home/lcas/ws +#colcon build +echo "source /opt/ros/lcas/install/setup.bash" >> ~/.bashrc + diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 8c6fd156..a8c5e3b1 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -70,7 +70,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Build and push limo_ros2 for arm64 # only build for arm if not PR to speed things up - if: ${{ github.event_name != 'pull_request' }} + #if: ${{ github.event_name != 'pull_request' }} uses: docker/build-push-action@v5 with: context: .devcontainer From 972962d933b81e868e9823799d902fddfbe92570 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Sat, 27 Jan 2024 21:41:27 +0000 Subject: [PATCH 2/3] added first dds server, not working yet --- src/dds/ddsrouter-server.yaml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/dds/ddsrouter-server.yaml diff --git a/src/dds/ddsrouter-server.yaml b/src/dds/ddsrouter-server.yaml new file mode 100644 index 00000000..293c17b0 --- /dev/null +++ b/src/dds/ddsrouter-server.yaml @@ -0,0 +1,46 @@ +################################## +# CONFIGURATION VERSION +version: v3.0 # 0 + +################################## +# ALLOWED TOPICS +# Allowing ROS2 HelloWorld demo_nodes topic + +#allowlist: +# - name: rt/chatter # 1 +# type: std_msgs::msg::dds_::String_ # 1 + +################################## +# PARTICIPANTS +participants: + +################################## +# SIMPLE PARTICIPANT +# This participant will subscribe to topics in allowlist in domain 0 and listen every message published there + + - name: EchoParticipant # 6 + kind: echo # 7 + discovery: true # 8 + data: false # 9 + #verbose: true # 10 + +################################## +# ROS DISCOVERY SERVER +# This participant will subscribe to topics in allowlist using Discovery Server protocol as Server + + - name: ServerROS2 # 5 + kind: local-discovery-server # 6 + discovery-server-guid: + ros-discovery-server: true # 7 + id: 1 # 8 + listening-addresses: # 9 + - domain: localhost # 10 + port: 11888 # 11 + + - name: WANServer # 6 + kind: wan # 7 + listening-addresses: # 8 + - port: 11667 # 10 + external-port: 11666 + ip: "0.0.0.0" + transport: tcp # 11 \ No newline at end of file From e6f225e5ed72e50f69b55166b10f9e9741e6114a Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Tue, 30 Jan 2024 13:24:55 +0000 Subject: [PATCH 3/3] revert RWM_IMPLEMENTATION for now --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c2c0c6f3..f1bfc1aa 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -88,7 +88,7 @@ RUN git clone https://github.com/libuvc/libuvc.git &&\ ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute -#ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp +ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp COPY *repos *.sh /tmp/.devcontainer/ RUN bash /tmp/.devcontainer/install.sh