Skip to content
Open
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
21 changes: 21 additions & 0 deletions src/drivers/4d_radar/4d_radar.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ros:foxy

## Revert to snapshot once GPG key error is resolved
RUN rm /etc/apt/sources.list.d/ros2-snapshots.list
RUN apt-get update && apt-get install curl -y
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

RUN apt-get update && apt-get install -y \
iputils-ping \
python3 \
python3-pip \
ros-foxy-point-cloud-msg-wrapper \
ros-foxy-rviz2 \
ros-foxy-rviz-common \
ros-foxy-rviz-default-plugins \
ros-foxy-rviz-rendering \
wget

RUN git clone https://github.com/smartmicro/smartmicro_ros2_radars.git /code
WORKDIR /code
33 changes: 33 additions & 0 deletions src/drivers/4d_radar/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

echo "🐢 Sourcing ROS2 Foxy..."
source /opt/ros/foxy/setup.bash
source /radar/install/setup.bash

echo "👍 Finished environment setup."
echo ""

echo "🥫 Don't forget to set up the network interfaces (on the host system)!"
echo " For Ethernet interface:"
echo " sudo ifconfig <interface_name> 192.168.11.17 netmask 255.255.255.0"
echo " For CAN interface:"
echo " sudo ip link set up can0 type can bitrate 500000"
echo " sudo ip link set up can0"

echo ""
echo "====================================================================="
echo "🚀 To launch the Smartmicro radar node: "
echo " ros2 launch umrr_ros2_driver radar.launch.py"
echo ""
echo "💻 To launch rviz: "
echo " rviz2 -d smart_rviz_plugin/config/rviz/recorder.rviz"
echo ""
echo "📄 Note: Ensure the sensor parameters are correctly set in the YAML files."
echo "====================================================================="
echo ""

if [ -z ${@+x} ]; then
exec bash
else
exec bash -c "$@"
fi