Skip to content

Commit

Permalink
change default dds to cyclone
Browse files Browse the repository at this point in the history
  • Loading branch information
grassjelly committed Feb 20, 2024
1 parent 27d293e commit f326bfb
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
18 changes: 18 additions & 0 deletions docker/.cyclonedds.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
<Domain id="any">
<General>
<Interfaces>
<NetworkInterface name="lo"/>
</Interfaces>
<AllowMulticast>false</AllowMulticast>
</General>
<Discovery>
<ParticipantIndex>auto</ParticipantIndex>
<Peers>
<Peer Address="127.0.0.1"/>
</Peers>
<MaxAutoParticipantIndex>120</MaxAutoParticipantIndex>
</Discovery>
</Domain>
</CycloneDDS>
8 changes: 7 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ ENV QT_X11_NO_MITSHM=1
from ros2${RUNTIME} as common
SHELL ["/bin/bash", "-c"]

RUN wget -O /root/.shm_off.xml https://raw.githubusercontent.com/eProsima/Fast-DDS/107ea8d64942102696840cd7d3e4cf93fa7a143e/examples/cpp/dds/AdvancedConfigurationExample/shm_off.xml
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
&& rm -rf /var/lib/apt/lists/*

COPY docker/.cyclonedds.xml /root
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ENV CYCLONEDDS_URI=/root/.cyclonedds.xml

RUN mkdir -p /root/linorobot2_ws/src/linorobot2
RUN mkdir -p /root/preinstall/base \
Expand Down
18 changes: 18 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,31 @@ services:
ros2 launch linorobot2_navigation slam.launch.py
rviz:=false
slam-sim:
container_name: slam-sim
extends: dev
command: >
ros2 launch linorobot2_navigation slam.launch.py
rviz:=true
sim:=true
navigate:
container_name: navigate
extends: dev
command: >
ros2 launch linorobot2_navigation navigation.launch.py
map:=/root/linorobot2_ws/src/linorobot2/linorobot2_navigation/maps/playground.yaml
rviz:=false
sim:=false
navigate-sim:
container_name: navigate-sim
extends: dev
command: >
ros2 launch linorobot2_navigation navigation.launch.py
map:=/root/linorobot2_ws/src/linorobot2/linorobot2_navigation/maps/playground.yaml
rviz:=true
sim:=true
save-map:
container_name: save-map
Expand Down
1 change: 0 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

source /opt/ros/rosdistro/setup.bash
source /root/linorobot2_ws/install/setup.bash
export FASTRTPS_DEFAULT_PROFILES_FILE=/root/.shm_off.xml

$@

0 comments on commit f326bfb

Please sign in to comment.