diff --git a/.docker/jazzy.amd64.dockerfile b/.docker/jazzy.amd64.dockerfile index 8ce4615f..5984df5e 100644 --- a/.docker/jazzy.amd64.dockerfile +++ b/.docker/jazzy.amd64.dockerfile @@ -1,6 +1,6 @@ ARG ROS_DISTRO="jazzy" FROM osrf/ros:$ROS_DISTRO-desktop-full -ARG BRANCH="ros2" +ARG BRANCH="dockertest" # Install Utilities # hadolint ignore=DL3008 @@ -39,7 +39,7 @@ RUN adduser --shell /bin/bash --disabled-password --gecos '' $USER \ # Install ROS-Gazebo framework ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\ -extras/ros-jazzy-gz-harmonic-install.sh install.sh +extras/ros-jazzy-binary-gz-harmonic-source-install.sh install.sh RUN bash install.sh # Set up Dave workspace @@ -66,4 +66,5 @@ RUN touch /ros_entrypoint.sh && sed --in-place --expression \ # Set User as user USER $USER -RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc +RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \ + echo "source /opt/gazebo/install/setup.bash" >> ~/.bashrc diff --git a/extras/ros-jazzy-binary-gz-harmonic-source-install.sh b/extras/ros-jazzy-binary-gz-harmonic-source-install.sh index 3f81a1f6..19bcf046 100644 --- a/extras/ros-jazzy-binary-gz-harmonic-source-install.sh +++ b/extras/ros-jazzy-binary-gz-harmonic-source-install.sh @@ -89,7 +89,7 @@ sudo apt update && apt install -y \ echo echo -e "\033[34mSetting up Gazebo source directory...\033[0m" -mkdir -p ~/gazebo/src && cd ~/gazebo/src || exit +mkdir -p /opt/gazebo/src && cd /opt/gazebo/src || exit curl -O https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-harmonic.yaml vcs import < collection-harmonic.yaml @@ -98,7 +98,7 @@ echo -e "\033[34mUpdating package list and installing dependencies...\033[0m" sudo apt -y install $(sort -u $(find . -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt' | grep -v '/\.git/') | sed '/gz\|sdf/d' | tr '\n' ' ') echo -e "\033[34mBuilding the project with colcon...\033[0m" -cd ~/gazebo || exit +cd /opt/gazebo || exit # Build gz-physics with limited cores to avoid memory issues MAKEFLAGS="-j2" colcon build --cmake-args -DBUILD_TESTING=OFF --merge-install --packages-up-to gz-physics # Full build @@ -109,6 +109,6 @@ echo -e "\033[32m============================================================\03 echo -e "\033[32mROS-Gazebo Framework Installation completed. Awesome! 🤘🚀 \033[0m" echo -e "Following command will set-up ROS-Gazebo environment variables to run it" echo -e "\033[95msource /opt/ros/jazzy/setup.bash\033[0m" -echo -e "\033[95msource ~/gazebo/install/setup.bash\033[0m" +echo -e "\033[95msource /opt/gazebo/install/setup.bash\033[0m" echo -e "You may check ROS, and Gazebo version installed with \033[33mprintenv ROS_DISTRO\033[0m and \033[33mecho \$GZ_VERSION\033[0m" echo