diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2c82bcaa..58a29785 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,7 +3,7 @@ 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/blob/humble/CONTRIBUTING.md +https://github.com/Ekumen-OS/andino/blob/jazzy/CONTRIBUTING.md --> # 🦟 Bug fix diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3a25848..dc9d197f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,14 +3,14 @@ name: colcon build & test on: push: branches: - - humble + - jazzy pull_request: branches: - - humble + - jazzy workflow_dispatch: env: - ROS_DISTRO: humble + ROS_DISTRO: jazzy # Cancel previously running PR jobs concurrency: @@ -22,7 +22,7 @@ jobs: name: Compile and test runs-on: ubuntu-latest container: - image: ubuntu:22.04 + image: ubuntu:24.04 steps: - uses: actions/checkout@v3 - uses: ros-tooling/setup-ros@v0.7 diff --git a/README.md b/README.md index 9b1ad18e..5b72a06a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ +[**UNSTABLE BRANCH**] + Andino is a fully open-source diff drive robot designed for educational purposes and low-cost applications. It is fully integrated with ROS 2 and it is a great base platform to improve skills over the robotics field. With its open-source design, anyone can modify and customize the robot to suit their specific needs. @@ -55,16 +57,16 @@ Visit [`andino_hardware`](./andino_hardware/) for assembly instructions. ### Platforms -- ROS 2: Humble Hawksbill +- ROS 2: Jazzy Jalisco - OS: - - Ubuntu 22.04 Jammy Jellyfish - - Ubuntu Mate 22.04 (On real robot (e.g: Raspberry Pi 4B)) + - Ubuntu 24.04 Noble Numbat + - Ubuntu Server 24.04.1 (WIP) (On real robot (e.g: Raspberry Pi 4B)) ### Build from Source #### Dependencies -1. Install [ROS 2](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html) +1. Install [ROS 2](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html) 2. Install [colcon](https://colcon.readthedocs.io/en/released/user/installation.html) #### colcon workspace diff --git a/andino_hardware/README.md b/andino_hardware/README.md index cae26831..50e4a2e5 100644 --- a/andino_hardware/README.md +++ b/andino_hardware/README.md @@ -99,12 +99,12 @@ For uploading the microcontroller firmware please refer to [`andino_firmware`](. The SBC used in this project is a Raspberry Pi 4b so the guidelines here will refer particularly to this family of on-board computers, however extending its use to other families is possible as well. -### Operative System +### Operative System [WIP] -Ubuntu Mate 22.04 ARM64 is the recommended operative system for this project. This OS provides good capabilities for a educational platform as well as good performance. +Ubuntu Server 24.04.1 is the recommended operative system for this project if you want to use the `jazzy` distro, since Ubuntu Mate 24 is not yet released. For installing this OS in the Raspberry: -1. Download the image from here: [ubuntu mate download](https://ubuntu-mate.org/download/arm64/) +1. Download the image from here: [download Ubuntu 24 for Raspberry](https://ubuntu.com/download/raspberry-pi) 2. Install OS to a microSD card using [Raspberry Pi Imager](https://www.raspberrypi.com/software/). @@ -182,13 +182,6 @@ Configure it properly: sudo usermod -a -G plugdev $USER ``` Note you will need a reboot after this to be effective. -2. Remove `brltty` from the system - ``` - sudo apt remove brltty - ``` - In Ubuntu 22.04 seems to be an issue with some chip drivers and the `brltty` daemon. To avoid this conflict we remove `brltty` as suggested. See [this stackoverflow post](https://stackoverflow.com/questions/70123431/why-would-ch341-uart-is-disconnected-from-ttyusb) for further information. - - #### Raspberry Camera Module V2 @@ -359,6 +352,8 @@ export ROS_DISTRO=humble ``` And then proceed to install the workspace dependencies: ``` +sudo apt install python3-rosdep +sudo rosdep init rosdep install --from-paths src -i -y -r ``` Note that option `-r` has been added. For ARM based processors, there are missing packages, e.g. those related to simulation. We would not try to run the simulation in the compute platform of andino, however for convenience it is added here. diff --git a/docker/Dockerfile b/docker/Dockerfile index 3d8988ab..8bd18e4b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,12 +1,11 @@ -FROM osrf/ros:humble-desktop-full +FROM osrf/ros:jazzy-desktop-full # Arguments for building -ARG USERID -ARG USER +ARG USER=ubuntu # Setup environment -ENV TERM linux -ENV DEBIAN_FRONTEND noninteractive +ENV TERM=linux +ENV DEBIAN_FRONTEND=noninteractive RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections # Copy requirement files and install dependencies @@ -15,11 +14,15 @@ RUN apt-get update && apt-get install --no-install-recommends -y $(cat requireme RUN rm requirements.txt # Create a user with passwordless sudo -RUN adduser --uid $USERID --gecos "ekumen developer" --disabled-password $USER -RUN adduser $USER sudo RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN echo "export QT_X11_NO_MITSHM=1" >> /home/$USER/.bashrc -USER $USER + +# Install fixuid and configure it +RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \ + chown root:root /usr/local/bin/fixuid && \ + chmod 4755 /usr/local/bin/fixuid && \ + mkdir -p /etc/fixuid && \ + printf "user: $USER\ngroup: $USER\n" > /etc/fixuid/config.yml # Adds USER to dialout and plugdev group. # This is needed to access the serial ports, for further references check @@ -27,20 +30,21 @@ USER $USER RUN sudo usermod -a -G dialout $USER RUN sudo usermod -a -G plugdev $USER +USER $USER + # Creates the src folder of the workspace. RUN mkdir -p /home/$USER/ws/src -# Adds to bashrc the ros humble overlay sourcing. -RUN echo "source /opt/ros/humble/setup.bash" >> /home/$USER/.bashrc -# Adds colcon autocomplete -RUN echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> /home/$USER/.bashrc -# Adds gazebo sourcing. -RUN echo "source /usr/share/gazebo/setup.bash" >> /home/$USER/.bashrc +# Adds to bashrc the ros jazzy overlay sourcing. +RUN echo "source /opt/ros/jazzy/setup.bash" >> /home/$USER/.bashrc # Updates -RUN sudo apt upgrade -y && sudo apt update && rosdep update +RUN sudo apt update && sudo apt upgrade -y && rosdep update # Defines a workspace folder. WORKDIR /home/$USER/ws +# Use fixuid as the entrypoint in quiet mode +ENTRYPOINT ["fixuid", "-q"] + CMD ["/bin/bash"] diff --git a/docker/README.md b/docker/README.md index c48e21e8..c886ccda 100644 --- a/docker/README.md +++ b/docker/README.md @@ -17,7 +17,7 @@ For NVIDIA GPU support, `nvidia-container-toolkit` should be installed. *Skip th #### Building image and running container -- Build the docker image whose default name is `ros2_humble_andino`: +- Build the docker image whose default name is `ros2_jazzy_andino`: ```sh ./docker/build.sh @@ -29,7 +29,7 @@ You can also try to set a specific image name: ./docker/build.sh -i my_fancy_image_name ``` -- Run a docker container from `ros2_humble_andino` called `ros2_humble_andino_container`: +- Run a docker container from `ros2_jazzy_andino` called `ros2_jazzy_andino_container`: ```sh ./docker/run.sh @@ -50,7 +50,7 @@ You can also try to set specific image and container names: - Inside the container, install dependencies via `rosdep`: ```sh - rosdep install -i -y --rosdistro humble --from-paths src + rosdep install -i -y --rosdistro jazzy --from-paths src ``` Note that the repository is mounted into a workspace. That is convenient if you diff --git a/docker/build.sh b/docker/build.sh index 5d57273b..bcd7feac 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2023, Ekumen Inc. +# Copyright (c) 2024, Ekumen Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -36,12 +36,12 @@ set -e function show_help() { echo $'\nUsage:\t build.sh [OPTIONS] \n Options:\n - \t-i --image_name\t\t Name of the image to be built (default ros2_humble_andino).\n + \t-i --image_name\t\t Name of the image to be built (default ros2_jazzy_andino).\n Example:\n \tbuild.sh --image_name custom_image_name\n' } -echo "Building the docker image for ros2 humble andino development." +echo "Building the docker image for ros2 jazzy andino development." SCRIPT_FOLDER_PATH="$(cd "$(dirname "$0")"; pwd)" CONTEXT_FOLDER_PATH="$(cd "$(dirname "$0")"; cd .. ; pwd)" @@ -57,15 +57,13 @@ while [[ "$#" -gt 0 ]]; do done # Update the arguments to default values if needed. -OS_VERSION="focal" -IMAGE_NAME=${IMAGE_NAME:-ros2_humble_andino} +OS_VERSION="noble" +IMAGE_NAME=${IMAGE_NAME:-ros2_jazzy_andino} 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/requirements.txt b/docker/requirements.txt index 40a197a7..605a7cc5 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -22,4 +22,5 @@ python3-setuptools software-properties-common sudo tmux +wget xterm diff --git a/docker/run.sh b/docker/run.sh index 3687ddb6..43ca385c 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2023, Ekumen Inc. +# Copyright (c) 2024, Ekumen Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -36,8 +36,8 @@ set +e function show_help() { echo $'\nUsage:\t run.sh [OPTIONS] \n Options:\n - \t-i --image_name\t\t Name of the image to be run (default ros2_humble_andino).\n - \t-c --container_name\t Name of the container(default ros2_humble_andino_container).\n + \t-i --image_name\t\t Name of the image to be run (default ros2_jazzy_andino).\n + \t-c --container_name\t Name of the container(default ros2_jazzy_andino_container).\n \t--use_nvidia\t\t Use nvidia runtime.\n Examples:\n \trun.sh\n @@ -79,22 +79,20 @@ done # Update the arguments to default values if needed. -IMAGE_NAME=${IMAGE_NAME:-ros2_humble_andino} -CONTAINER_NAME=${CONTAINER_NAME:-ros2_humble_andino_container} +IMAGE_NAME=${IMAGE_NAME:-ros2_jazzy_andino} +CONTAINER_NAME=${CONTAINER_NAME:-ros2_jazzy_andino_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 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 - # Check if name container is already taken. if sudo -g docker docker container ls -a | grep "${CONTAINER_NAME}$" -c &> /dev/null; then printf "Error: Docker container called $CONTAINER_NAME is already opened. \ @@ -113,6 +111,7 @@ sudo docker run --privileged --net=host -it $NVIDIA_FLAGS \ -v ${REPOSITORY_FOLDER_PATH}/.build:$WORKSPACE_ROOT_CONTAINER/build:rw \ -v ${REPOSITORY_FOLDER_PATH}/.install:$WORKSPACE_ROOT_CONTAINER/install:rw \ -v $SSH_PATH:$SSH_PATH \ + -u 1000:1000 \ --name $CONTAINER_NAME $IMAGE_NAME xhost -