diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1ae2b9f..a789576 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,9 +3,8 @@ Please remove the appropriate section. For example, if this is a new feature, remove all sections except for the "New feature" section If this is your first time opening a PR, be sure to check the contribution guide: -https://github.com/Ekumen-OS/andino_gz/blob/humble/CONTRIBUTING.md +https://github.com/Ekumen-OS/andino_gz/blob/jazzy/CONTRIBUTING.md --> - # 🦟 Bug fix diff --git a/README.md b/README.md index 9548ae2..217d15a 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ Also, consider using looking at the translation entries under `andino_gz/config/ ros2 launch andino_gz slam_toolbox_online_async.launch.py ``` - Configuration can be forwarded to the `slam_toolbox_node`. By default, the configuration parameters are obtained from [andino's configuration file](https://github.com/Ekumen-OS/andino/blob/humble/andino_slam/config/slam_toolbox_online_async.yaml). In case a custom file is wanted to be passed, simply use the launch file argument for indicating the path to a new file. + Configuration can be forwarded to the `slam_toolbox_node`. By default, the configuration parameters are obtained from [andino's configuration file](https://github.com/Ekumen-OS/andino/blob/jazzy/andino_slam/config/slam_toolbox_online_async.yaml). In case a custom file is wanted to be passed, simply use the launch file argument for indicating the path to a new file. ``` ros2 launch andino_gz slam_toolbox_online_async.launch.py slams_param_file:= diff --git a/docker/README.md b/docker/README.md index 5e67131..2975a77 100644 --- a/docker/README.md +++ b/docker/README.md @@ -47,19 +47,8 @@ You can also try to set specific image and container names: ./docker/run.sh --use_nvidia -i my_fancy_image_name -c my_fancy_container_name ``` -- Inside the container, install dependencies via `rosdep`: +With this, you can just source the workspace and start testing it out, as the dependencies and the workspace have been already installed during the building process: - ```sh - rosdep install -i -y --rosdistro jazzy --from-paths src - ``` - -Note that the repository is mounted into a workspace. That is convenient if you -are working in a single repository project. Note that for multi-repository -workspace you should use another tool like vcs-tool to control via a `.repos` -file the repositories in your workspace. - -- To build: - - ```sh - colcon build - ``` +```sh +source ./install/setup.bash +``` diff --git a/docker/build.sh b/docker/build.sh index 4d5c4b0..b0ff04c 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -57,15 +57,13 @@ while [[ "$#" -gt 0 ]]; do done # Update the arguments to default values if needed. -OS_VERSION="focal" +OS_VERSION="noble" IMAGE_NAME=${IMAGE_NAME:-ros2_jazzy_andino_gz} DOCKERFILE_PATH=$SCRIPT_FOLDER_PATH/Dockerfile -USERID=$(id -u) -USER=$(whoami) +USER=ubuntu sudo docker build -t $IMAGE_NAME \ --file $DOCKERFILE_PATH \ - --build-arg USERID=$USERID \ --build-arg USER=$USER \ $CONTEXT_FOLDER_PATH diff --git a/docker/dockerfile b/docker/dockerfile index 9fd657b..81e37d0 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -13,6 +13,23 @@ COPY docker/requirements.txt . RUN apt-get update && apt-get install --no-install-recommends -y $(cat requirements.txt) RUN rm requirements.txt +##################################### +# ROS2 dependencies built from source +##################################### + +# Prepare worksapce for ros2 packages built in the container +RUN mkdir -p /home/$USER/ros_deps_ws/src +WORKDIR /home/$USER/ros_deps_ws/src +# Clone andino main repo +RUN git clone https://github.com/Ekumen-OS/andino.git -b jazzy +WORKDIR /home/$USER/ros_deps_ws +# Rosdep install +RUN . /opt/ros/jazzy/setup.sh && rosdep install -y -i --from-paths src +# Build +RUN . /opt/ros/jazzy/setup.sh && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release +# Adds overlay to the bashrc +RUN echo "source /home/$USER/ros_deps_ws/install/setup.bash" >> /home/$USER/.bashrc + # Add the Gazebo repository and install Gazebo Harmonic RUN sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list' && \ wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \ diff --git a/docker/requirements.txt b/docker/requirements.txt index 5c8c5d4..605a7cc 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -19,11 +19,6 @@ openssh-server python3 python3-pip python3-setuptools -# TODO change this packages when jazzy debains are ready -ros-humble-andino-description -ros-humble-andino-slam -ros-humble-nav2-bringup -ros-humble-nav2-common software-properties-common sudo tmux diff --git a/docker/run.sh b/docker/run.sh index 867424a..9ac662a 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -82,9 +82,11 @@ done IMAGE_NAME=${IMAGE_NAME:-ros2_jazzy_andino_gz} CONTAINER_NAME=${CONTAINER_NAME:-ros2_jazzy_andino_gz_container} +USER=ubuntu + SSH_PATH=/home/$USER/.ssh -WORKSPACE_SRC_CONTAINER=/home/$(whoami)/ws/src/$REPOSITORY_FOLDER_NAME -WORKSPACE_ROOT_CONTAINER=/home/$(whoami)/ws +WORKSPACE_SRC_CONTAINER=/home/$USER/ws/src/$REPOSITORY_FOLDER_NAME +WORKSPACE_ROOT_CONTAINER=/home/$USER/ws SSH_AUTH_SOCK_USER=$SSH_AUTH_SOCK # Create cache folders to store colcon build files @@ -92,8 +94,8 @@ mkdir -p ${REPOSITORY_FOLDER_PATH}/.build mkdir -p ${REPOSITORY_FOLDER_PATH}/.install # Transfer the ownership to the user -chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.build -chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.install +# chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.build +# chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.install # Check if name container is already taken. if sudo -g docker docker container ls -a | grep "${CONTAINER_NAME}$" -c &> /dev/null; then