Skip to content

Commit

Permalink
Merge pull request #81 from gstavrinos/rust-integration
Browse files Browse the repository at this point in the history
Rust integration
  • Loading branch information
gstavrinos authored Nov 4, 2024
2 parents 7e1fbb1 + 6d149b4 commit 667fbc3
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 88 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,6 @@ TODO
- Introduced a the `kill-container` or `kc` flag to forcefully kill the `rosez*` container.
- Now sharing `/media` between host and container.
- Fixed a bug that occured when the output of the build command was too long.
- [For versions >= `v2.4.0`] Added support for ROS2 Jazzy. **NOTE**: The `ros2ez` command has now been disabled, since currently two ROS2 LTS versions are supported. ROS2 Humble can now been used with the `ros2ezh` command, following the typical `rosez*`/`ros2ez*` scheme. **WARNING**: This versions breaks humble installations. In order to migrate, your best bet is to rename `ros2ez-volume*` volumes to their equivalent `ros2ezh-volume*`.
- Accidentally, a new bug for ROS1 was introduced in this release. It is fixed in `v2.5.0`.
- [For versions >= `v2.4.0`] Added support for ROS2 Jazzy. **NOTE**: The `ros2ez` command has now been disabled, since currently two ROS2 LTS versions are supported. ROS2 Humble can now been used with the `ros2ezh` command, following the typical `rosez*`/`ros2ez*` scheme. **WARNING**: This versions breaks humble installations. In order to migrate, your best bet is to rename `ros2ez-volume*` volumes to their equivalent `ros2ezh-volume*`. Accidentally, a new bug for ROS1 was introduced in this release. It is fixed in `v2.5.0`.
- [For versions >= `v2.5.0`] Added rust support for all ROS distributions. Also, fixed bug #79 that was introduced in `v2.3.0`.
5 changes: 3 additions & 2 deletions internal/entrypoint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if [ "$rosversion" != "unknown" ]; then
intermediate_error_handler $?
else
if [ $skip_compilation -ne 1 ]; then
script --flush --quiet --return /tmp/rosez-build-output.txt --command "catkin_make"
script --flush --quiet --return /tmp/rosez-build-output.txt --command "catkin_make" | tee /dev/fd/2
intermediate_error_handler $?
fi
. /opt/ros/$bl/devel/setup.bash
Expand All @@ -69,4 +69,5 @@ if [ "$rosversion" != "unknown" ]; then
exec "$@"
trap - $signal_list
fi
# . "$HOME/.cargo/env"
export PATH=/home/rosez_user/.local/bin:$PATH
. "$HOME/.cargo/env"
34 changes: 17 additions & 17 deletions internal/ros2_foxy_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ FROM osrf/ros:foxy-ros1-bridge

LABEL maintainer="George Stavrinos <gstavrinos@protonmail.com>"

VOLUME /opt/ros/foxy\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var

RUN apt-get update --allow-insecure-repositories && apt-get install -y curl && curl http://repo.ros2.org/repos.key | apt-key add - && apt-get update && apt-get full-upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
gdb \
Expand Down Expand Up @@ -56,20 +72,4 @@ ARG GROUP_ID=16661
RUN addgroup --gid $GROUP_ID rosez_user && adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID rosez_user && usermod -aG sudo rosez_user && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && touch /home/rosez_user/.sudo_as_admin_successful

USER rosez_user
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit

VOLUME /opt/ros/foxy\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
35 changes: 18 additions & 17 deletions internal/ros2_humble_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,27 @@ FROM osrf/ros:humble-desktop-full

LABEL maintainer="George Stavrinos <gstavrinos@protonmail.com>"

VOLUME /opt/ros/humble\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var

RUN mkdir -p /opt/ros/ros2_ws/src && apt-get update && apt-get full-upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
gdb \
vim \
curl \
xterm \
valgrind \
pulseaudio \
Expand Down Expand Up @@ -54,20 +71,4 @@ ARG GROUP_ID=16661
RUN addgroup --gid $GROUP_ID rosez_user && adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID rosez_user && usermod -aG sudo rosez_user && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && touch /home/rosez_user/.sudo_as_admin_successful

USER rosez_user
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit

VOLUME /opt/ros/humble\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
35 changes: 18 additions & 17 deletions internal/ros2_jazzy_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,27 @@ FROM osrf/ros:jazzy-desktop-full

LABEL maintainer="George Stavrinos <gstavrinos@protonmail.com>"

VOLUME /opt/ros/jazzy\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var

RUN mkdir -p /opt/ros/ros2_ws/src && apt-get update && apt-get full-upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
gdb \
vim \
curl \
xterm \
libgl1 \
valgrind \
Expand Down Expand Up @@ -57,20 +74,4 @@ ARG GROUP_ID=16661
RUN getent group $GROUP_ID | cut -d: -f1 | xargs -r groupdel >/dev/null 2>&1 && getent passwd $USER_ID | cut -d: -f1 | xargs -r userdel -r >/dev/null 2>&1 && addgroup --gid $GROUP_ID rosez_user && useradd --create-home --password '' --comment '' --uid $USER_ID --gid $GROUP_ID rosez_user && usermod -aG sudo rosez_user && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && touch /home/rosez_user/.sudo_as_admin_successful

USER rosez_user
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install bloom --break-system-packages

VOLUME /opt/ros/jazzy\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install -U bloom --break-system-packages && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
35 changes: 18 additions & 17 deletions internal/ros_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,27 @@ FROM osrf/ros:noetic-desktop-full

LABEL maintainer="George Stavrinos <gstavrinos@protonmail.com>"

VOLUME /opt/ros/noetic\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var

RUN mkdir -p /opt/ros/catkin_ws/src && apt-get update && apt-get full-upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
gdb \
vim \
curl \
xterm \
valgrind \
pulseaudio \
Expand Down Expand Up @@ -53,20 +70,4 @@ ARG GROUP_ID=16661
RUN addgroup --gid $GROUP_ID rosez_user && adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID rosez_user && usermod -aG sudo rosez_user && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && touch /home/rosez_user/.sudo_as_admin_successful

USER rosez_user
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit

VOLUME /opt/ros/noetic\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
35 changes: 18 additions & 17 deletions internal/ros_melodic_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,27 @@ ENV NVIDIA_VISIBLE_DEVICES=all NVIDIA_DRIVER_CAPABILITIES=all

LABEL maintainer="George Stavrinos <gstavrinos@protonmail.com>"

VOLUME /opt/ros/melodic\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var

RUN mkdir -p /opt/ros/catkin_ws/src && apt-get update && apt-get full-upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
gdb \
vim \
curl \
xterm \
valgrind \
python-pip \
Expand Down Expand Up @@ -51,20 +68,4 @@ ARG GROUP_ID=16661
RUN addgroup --gid $GROUP_ID rosez_user && adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID rosez_user && usermod -aG sudo rosez_user && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && touch /home/rosez_user/.sudo_as_admin_successful

USER rosez_user
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit

VOLUME /opt/ros/melodic\
/bin\
/etc\
/home\
/lib\
/lib64\
/mnt\
/opt\
/root\
/run\
/sbin\
/srv\
/sys\
/usr\
/var
RUN sudo chown -R rosez_user:rosez_user /home/rosez_user && rosdep update && pip3 install pre-commit && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

0 comments on commit 667fbc3

Please sign in to comment.