-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from gstavrinos/road-to-jazzy
Road to jazzy
- Loading branch information
Showing
11 changed files
with
138 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/home/$USER/ros2_ws/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,60 @@ | ||
#!/bin/bash | ||
original_dir=$(pwd) | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
source $SCRIPT_DIR/internal/helpers.bash | ||
image_name="" | ||
dockerfile="" | ||
executable_folder_name="" | ||
get_supported_versions | ||
selected_version=$1 | ||
if [[ -z "$1" ]] || [ "$1" == "--interactive" ]; then | ||
if ! type "dialog" > /dev/null 2>&1; then | ||
echo "'dialog' (https://linux.die.net/man/1/dialog) is not installed, please install it and run the script again!" | ||
echo "You can alternatively use the non-interactive version by running the installer with one of the following parameters depending on the ROS version you need:" | ||
for i in $(seq 0 $(( ${#distros[@]}-1 )) ); do | ||
echo "${rosezv[$i]} for ${distros[$i]}" | ||
done | ||
exit -1 | ||
else | ||
echo "going interactive" | ||
for i in $(seq 0 $(( ${#distros[@]}-1 )) ); do | ||
choices="$choices\"${rosezv[$i]}\" \"${distros[$i]}\" \"on\" " | ||
done | ||
run_dialog_command "--radiolist" "Select a rosez version to install" ${#distros[@]} "$choices" | ||
clear | ||
selected_version=$choice | ||
fi | ||
if ! type "dialog" >/dev/null 2>&1; then | ||
echo "'dialog' (https://linux.die.net/man/1/dialog) is not installed, please install it and run the script again!" | ||
echo "You can alternatively use the non-interactive version by running the installer with one of the following parameters depending on the ROS version you need:" | ||
for i in $(seq 0 $((${#distros[@]} - 1))); do | ||
echo "${rosezv[$i]} for ${distros[$i]}" | ||
done | ||
exit 123 | ||
else | ||
echo "going interactive" | ||
for i in $(seq 0 $((${#distros[@]} - 1))); do | ||
choices="$choices\"${rosezv[$i]}\" \"${distros[$i]}\" \"on\" " | ||
done | ||
run_dialog_command "--radiolist" "Select a rosez version to install" ${#distros[@]} "$choices" | ||
clear | ||
selected_version=$choice | ||
fi | ||
fi | ||
for i in $(seq 0 $(( ${#distros[@]}-1 )) ); do | ||
if [ "$selected_version" == "${rosezv[$i]}" ]; then | ||
image_name="${image_names[$i]}" | ||
dockerfile="${dockerfiles[$i]}" | ||
executable_folder_name="${executable_folder_names[$i]}" | ||
break | ||
fi | ||
for i in $(seq 0 $((${#distros[@]} - 1))); do | ||
if [ "$selected_version" == "${rosezv[$i]}" ]; then | ||
image_name="${image_names[$i]}" | ||
dockerfile="${dockerfiles[$i]}" | ||
executable_folder_name="${executable_folder_names[$i]}" | ||
break | ||
fi | ||
done | ||
if [[ -z "$image_name" ]]; then | ||
echo "Invalid argument passed. You can run the interactive version by using the --interactive flag (or no flags at all)." | ||
echo "You can alternatively use the non-interactive version by running the installer with one of the following parameters depending on the ROS version you need:" | ||
for i in $(seq 0 $(( ${#distros[@]}-1 )) ); do | ||
echo "${rosezv[$i]} for ${distros[$i]}" | ||
done | ||
exit -1 | ||
echo "Invalid argument passed. You can run the interactive version by using the --interactive flag (or no flags at all)." | ||
echo "You can alternatively use the non-interactive version by running the installer with one of the following parameters depending on the ROS version you need:" | ||
for i in $(seq 0 $((${#distros[@]} - 1))); do | ||
echo "${rosezv[$i]} for ${distros[$i]}" | ||
done | ||
exit 234 | ||
fi | ||
cd $SCRIPT_DIR | ||
need_rr=0 | ||
if ! id -nGz "$USER" | grep -qzxF "docker" | ||
then | ||
sudo usermod -aG docker $USER | ||
need_rr=1 | ||
if ! id -nGz "$USER" | grep -qzxF "docker"; then | ||
sudo usermod -aG docker $USER | ||
need_rr=1 | ||
fi | ||
sudo docker build --no-cache --pull -t $image_name -f $SCRIPT_DIR/internal/$dockerfile . --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) | ||
string_for_bashrc='export PATH="$PATH:'$SCRIPT_DIR/internal/"${executable_folder_name}"'"' | ||
|
||
if ! $( grep -Fx "$string_for_bashrc" ~/.bashrc ) | ||
then | ||
echo $string_for_bashrc >> ~/.bashrc | ||
. ~/.bashrc | ||
if ! $(grep -Fx "$string_for_bashrc" ~/.bashrc); then | ||
echo $string_for_bashrc >>~/.bashrc | ||
. ~/.bashrc | ||
fi | ||
if [[ $need_rr -gt 0 ]] | ||
then | ||
echo "Please reboot your system, and then try using ros-ez!" | ||
if [[ $need_rr -gt 0 ]]; then | ||
echo "Please reboot your system, and then try using ros-ez!" | ||
fi | ||
cd $original_dir | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
$SCRIPT_DIR/../rosez_exec.bash "5" $* |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
FROM nvidia/opengl:1.2-glvnd-devel-ubuntu24.04 AS nvidia | ||
|
||
FROM osrf/ros:jazzy-desktop-full | ||
|
||
COPY --from=nvidia /usr/local /usr/local | ||
|
||
ENV NVIDIA_VISIBLE_DEVICES=all NVIDIA_DRIVER_CAPABILITIES=all | ||
|
||
FROM osrf/ros:jazzy-desktop-full | ||
|
||
LABEL maintainer="George Stavrinos <[email protected]>" | ||
|
||
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 \ | ||
xterm \ | ||
libgl1 \ | ||
valgrind \ | ||
pre-commit \ | ||
pulseaudio \ | ||
mesa-utils \ | ||
libuvc-dev \ | ||
clang-tidy \ | ||
catkin-lint \ | ||
python3-pip \ | ||
libglx-mesa0 \ | ||
openssh-client \ | ||
clang-format-14 \ | ||
clang-format-18 \ | ||
ros-jazzy-ros-gz \ | ||
python3-catkin-pkg \ | ||
ros-jazzy-navigation2 \ | ||
ros-jazzy-nav2-bringup \ | ||
ros-jazzy-ros2-control \ | ||
ros-jazzy-slam-toolbox \ | ||
ros-jazzy-ros2controlcli \ | ||
ros-jazzy-gz-ros2-control \ | ||
ros-jazzy-control-toolbox \ | ||
ros-jazzy-gz-utils-vendor \ | ||
ros-jazzy-gz-plugin-vendor \ | ||
ros-jazzy-ros2-controllers \ | ||
ros-jazzy-gz-physics-vendor \ | ||
ros-jazzy-rmw-cyclonedds-cpp \ | ||
ros-jazzy-controller-manager \ | ||
ros-jazzy-effort-controllers \ | ||
ros-jazzy-robot-localization \ | ||
ros-jazzy-velocity-controllers \ | ||
ros-jazzy-position-controllers \ | ||
ros-jazzy-joint-state-publisher \ | ||
ros-jazzy-transmission-interface \ | ||
ros-jazzy-joint-state-publisher-gui | ||
|
||
ARG USER_ID=16661 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// command, workspace file, volume, ros distro, image name, executable folder name, dockerfile | ||
rosez,ros_ws.txt,rosez-volume,noetic,ros_ez,ros-ez,ros_Dockerfile | ||
ros2ez,ros2_ws.txt,ros2ez-volume,humble,ros2_ez,ros2-ez,ros2_Dockerfile | ||
ros2ezh,ros2h_ws.txt,ros2ezh-volume,humble,ros2_ezh,ros2-ezh,ros2_humble_Dockerfile | ||
rosezm,rosm_ws.txt,rosezm-volume,melodic,ros_ezm,ros-ezm,ros_melodic_Dockerfile | ||
ros2ezf,ros2f_ws.txt,ros2ezf-volume,foxy,ros2_ezf,ros2-ezf,ros2_foxy_Dockerfile | ||
ros2ezj,ros2j_ws.txt,ros2ezj-volume,jazzy,ros2_ezj,ros2-ezj,ros2_jazzy_Dockerfile |