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

WIP: config for DDS trials for remote access to robots #40

Merged
merged 7 commits into from
Feb 12, 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
15 changes: 14 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM lcas.lincoln.ac.uk/lcas/ros:humble

RUN echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | tee -a /etc/apt/sources.list

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y upgrade \
&& apt-get -y install --no-install-recommends ros-humble-desktop ros-humble-turtlebot3-gazebo ros-humble-turtlebot3-navigation2 \
Expand Down Expand Up @@ -50,7 +52,10 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
libtinyxml2-dev \
libssl-dev \
python3-sphinx \
libyaml-cpp-dev
libyaml-cpp-dev \
ros-humble-cyclonedds \
ros-humble-zenoh-bridge-dds \
llvm-dev libclang-dev

RUN useradd -rm -d /home/lcas -s /bin/bash -g root -G sudo -u 1001 lcas
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
Expand Down Expand Up @@ -97,5 +102,13 @@ RUN git clone https://github.com/libuvc/libuvc.git &&\
COPY *repos *.sh /tmp/.devcontainer/
RUN bash /tmp/.devcontainer/install.sh

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN git clone https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds.git
WORKDIR /opt/lcas/extensions/zenoh-plugin-ros2dds
RUN bash -c "source '$HOME/.cargo/env'; cargo build --release -p zenoh-bridge-ros2dds"
RUN install target/release/zenoh-bridge-ros2dds /usr/local/bin/

RUN cat /tmp/.devcontainer/setup-router.sh >> /home/lcas/.bashrc

RUN mkdir -p /home/lcas/ws/src && ln -s /workspaces /home/lcas/ws/src/workspaces
WORKDIR /home/lcas/ws
5 changes: 2 additions & 3 deletions .devcontainer/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -e
source /opt/ros/humble/setup.bash
apt update
rosdep --rosdistro=humble update

# fix tab completion
pip install -U argcomplete

rm -rf /opt/ros/lcas
Expand All @@ -16,8 +18,5 @@ 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

29 changes: 1 addition & 28 deletions .devcontainer/lcas.repos
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,4 @@ repositories:
type: git
url: https://github.com/LCAS/limo_ros2.git
version: humble
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

19 changes: 7 additions & 12 deletions .devcontainer/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@ source /opt/ros/lcas/install/setup.bash
sudo apt update
rosdep --rosdistro=humble update


# sudo rm -rf /opt/ros/lcas
# sudo mkdir -p /opt/ros/lcas/src
# sudo chown -R lcas /opt/ros/lcas
# cd /opt/ros/lcas/src
# vcs import < $WORKSPACE/.devcontainer/lcas.repos
# rosdep install --from-paths . -i -y
# cd /opt/ros/lcas
# colcon build


cd /home/lcas/ws
colcon build --symlink-install
echo "source /home/lcas/ws/install/setup.bash" >> ~/.bashrc

if ! grep -q "source /opt/ros/lcas/install/setup.bash" ~/.bashrc; then
echo "source /opt/ros/lcas/install/setup.bash" >> ~/.bashrc
fi

if ! grep -q "source /home/lcas/ws/install/setup.bash" ~/.bashrc; then
echo "source /home/lcas/ws/install/setup.bash" >> ~/.bashrc
fi
40 changes: 40 additions & 0 deletions .devcontainer/setup-router.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
unset RMW_IMPLEMENTATION
unset ROS_LOCALHOST_ONLY
#export FASTRTPS_DEFAULT_PROFILES_FILE=/workspaces/teaching/uol_tidybot/param/super_client_configuration_file.xml
#export ROS_DISCOVERY_SERVER=localhost:11888

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

read -r -d '' CYCLONEDDS_URI << EOM
<?xml version="1.0" encoding="UTF-8" ?>
<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="0">
<General>
<AllowMulticast>false</AllowMulticast>
<MaxMessageSize>65500B</MaxMessageSize>
<FragmentSize>4000B</FragmentSize>
<Transport>udp</Transport>
</General>
<Discovery>
<Peers>
<Peer address="localhost"/>
<Peer address="`hostname`"/>
<!--<Peer address="[IPV6-address]"/>-->
</Peers>
<ParticipantIndex>auto</ParticipantIndex>
</Discovery>
<Internal>
<Watermarks>
<WhcHigh>500kB</WhcHigh>
</Watermarks>
</Internal>
<Tracing>
<Verbosity>info</Verbosity>
<OutputFile>stdout</OutputFile>
</Tracing>
</Domain>
</CycloneDDS>
EOM

export CYCLONEDDS_URI

46 changes: 0 additions & 46 deletions uol_tidybot/param/ddsrouter-client.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions uol_tidybot/param/ddsrouter-server.yaml

This file was deleted.

Loading