diff --git a/src/drivers/4d_radar/4d_radar.dockerfile b/src/drivers/4d_radar/4d_radar.dockerfile new file mode 100644 index 0000000..23cb120 --- /dev/null +++ b/src/drivers/4d_radar/4d_radar.dockerfile @@ -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 \ No newline at end of file diff --git a/src/drivers/4d_radar/docker/entrypoint.sh b/src/drivers/4d_radar/docker/entrypoint.sh new file mode 100644 index 0000000..c2b5215 --- /dev/null +++ b/src/drivers/4d_radar/docker/entrypoint.sh @@ -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 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 \ No newline at end of file