Skip to content
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
16 changes: 0 additions & 16 deletions .mergify.yml

This file was deleted.

22 changes: 5 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
FROM ros:humble-ros-base-jammy AS base

# Switch to much faster mirror for apt processes
ENV OLD_MIRROR archive.ubuntu.com
ENV SEC_MIRROR security.ubuntu.com
ENV NEW_MIRROR mirror.bytemark.co.uk

RUN sed -i "s/$OLD_MIRROR\|$SEC_MIRROR/$NEW_MIRROR/g" /etc/apt/sources.list

# Install basic dev tools (And clean apt cache afterwards)
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get -y --quiet --no-install-recommends install \
# Install Lord IMU driver pkg
ros-"$ROS_DISTRO"-microstrain-inertial-driver \
# Install Cyclone DDS ROS RMW
ros-"$ROS_DISTRO"-rmw-cyclonedds-cpp \
# Install Zenoh ROS2 RMW
ros-"$ROS_DISTRO"-rmw-zenoh-cpp \
&& rm -rf /var/lib/apt/lists/*

# Setup ROS workspace folder
ENV ROS_WS /opt/ros_ws
ENV ROS_WS=/opt/ros_ws
WORKDIR $ROS_WS

# Set cyclone DDS ROS RMW
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

COPY ./cyclone_dds.xml $ROS_WS/

# Configure Cyclone cfg file
ENV CYCLONEDDS_URI=file://${ROS_WS}/cyclone_dds.xml
# Setup Zenoh ROS2 RMW
ENV RMW_IMPLEMENTATION=rmw_zenoh_cpp

# Enable ROS log colorised output
ENV RCUTILS_COLORIZED_OUTPUT=1
Expand Down
14 changes: 0 additions & 14 deletions cyclone_dds.xml

This file was deleted.

27 changes: 1 addition & 26 deletions dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,15 @@
# Build docker dev stage and add local code for live development
# ----------------------------------------------------------------

CYCLONE_VOL=""
BASH_CMD=""

# Default cyclone_dds.xml path
CYCLONE_DIR=/home/$USER/cyclone_dds.xml

# Function to print usage
usage() {
echo "
Usage: dev.sh [-b|bash] [-l|--local] [-h|--help]
Usage: dev.sh [-b|bash] [-h|--help]

Where:
-b | bash Open bash in docker container (Default in dev.sh)
-l | --local Use default local cyclone_dds.xml config
-l | --local Optionally point to absolute -l /path/to/cyclone_dds.xml
-h | --help Show this help message
"
exit 1
Expand All @@ -29,16 +23,6 @@ while [[ "$#" -gt 0 ]]; do
-b|bash)
BASH_CMD=bash
;;
-l|--local)
# Avoid getting confused if bash is written where path should be
if [ -n "$2" ]; then
if [ ! $2 = "bash" ]; then
CYCLONE_DIR="$2"
shift
fi
fi
CYCLONE_VOL="-v $CYCLONE_DIR:/opt/ros_ws/cyclone_dds.xml"
;;
-h|--help)
usage
;;
Expand All @@ -50,14 +34,6 @@ while [[ "$#" -gt 0 ]]; do
shift
done

# Verify CYCLONE_DIR exists
if [ -n "$CYCLONE_VOL" ]; then
if [ ! -f "$CYCLONE_DIR" ]; then
echo "$CYCLONE_DIR does not exist! Please provide a valid path to cyclone_dds.xml"
exit 1
fi
fi

# Build docker image up to dev stage
DOCKER_BUILDKIT=1 docker build \
-t av_imu:latest-dev \
Expand All @@ -69,5 +45,4 @@ docker run -it --rm --net host --privileged \
-v /tmp:/tmp \
-v /etc/localtime:/etc/localtime:ro \
-v ./av_imu_launch:/opt/ros_ws/src/av_imu_launch \
$CYCLONE_VOL \
av_imu:latest-dev
27 changes: 1 addition & 26 deletions runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,15 @@
# Build docker image and run ROS code for runtime or interactively with bash
# ---------------------------------------------------------------------------

CYCLONE_VOL=""
BASH_CMD=""

# Default cyclone_dds.xml path
CYCLONE_DIR=/home/$USER/cyclone_dds.xml

# Function to print usage
usage() {
echo "
Usage: dev.sh [-b|bash] [-l|--local] [-h|--help]
Usage: dev.sh [-b|bash] [-h|--help]

Where:
-b | bash Open bash in docker container (Default in dev.sh)
-l | --local Use default local cyclone_dds.xml config
-l | --local Optionally point to absolute -l /path/to/cyclone_dds.xml
-h | --help Show this help message
"
exit 1
Expand All @@ -29,16 +23,6 @@ while [[ "$#" -gt 0 ]]; do
-b|bash)
BASH_CMD=bash
;;
-l|--local)
# Avoid getting confused if bash is written where path should be
if [ -n "$2" ]; then
if [ ! $2 = "bash" ]; then
CYCLONE_DIR="$2"
shift
fi
fi
CYCLONE_VOL="-v $CYCLONE_DIR:/opt/ros_ws/cyclone_dds.xml"
;;
-h|--help)
usage
;;
Expand All @@ -50,14 +34,6 @@ while [[ "$#" -gt 0 ]]; do
shift
done

# Verify CYCLONE_DIR exists
if [ -n "$CYCLONE_VOL" ]; then
if [ ! -f "$CYCLONE_DIR" ]; then
echo "$CYCLONE_DIR does not exist! Please provide a valid path to cyclone_dds.xml"
exit 1
fi
fi

# Build docker image only up to base stage
DOCKER_BUILDKIT=1 docker build \
-t av_imu:latest \
Expand All @@ -68,5 +44,4 @@ docker run -it --rm --net host --privileged \
-v /dev:/dev \
-v /tmp:/tmp \
-v /etc/localtime:/etc/localtime:ro \
$CYCLONE_VOL \
av_imu:latest $CMD
Loading