Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker development environment and install script for A25 #10

Open
wants to merge 3 commits into
base: ros2
Choose a base branch
from

Conversation

MarcOlivierFecteau
Copy link

@MarcOlivierFecteau MarcOlivierFecteau commented Jan 19, 2025

This commit completes the Dockerfile started in A24 for installation pipeline validation, and updates the target to ROS2-Jazzy / Ubuntu 24.04 (in order to be compatible with the RPi5 for A25). The Docker image has been built and run successfully on Windows 11 (23H2) on amd64 architecture, and the baseline codebase (including ROS package dependencies) has been built succesfully inside the container. Note that the "test" program (ros2 launch racecar_bringup teleop.launch.py) has NOT been tested. Therefore, the baseline codebase SHOULD be tested with the proper hardware setup (i.e. racecar with RPi5 w/ Ubuntu24.04) BEFORE accepting this PR.

This commit also adds utility scripts for building and running the Docker image on Windows, for ROS environment setup on entering the Docker container, and for building the ROS packages with colcon.

NOTES:

  • The permissions for accessing the joystick controller and the TTY devices have NOT been given, and SHOULD be given BEFORE testing the baseline codebase (the devices MUST be plugged in in order to add permissions);
  • The Dockerfile COULD (probably) be optimized to reduce the size of the image.

This commit completes the Dockerfile started in A24 for installation
pipeline validation, and updates the target to ROS2-Jazzy / Ubuntu
24.04 (in order to be compatible with the RPi5 for A25). The Docker
image has been built and run successfully on Windows 11 (23H2) on amd64
architecture, and the baseline codebase (including ROS package
dependencies) has been built succesfully inside the container. Note that
the "test" program (`ros2 launch racecar_bringup teleop.launch.py`) has
NOT been tested. Therefore, the baseline codebase SHOULD be tested with
the proper hardware setup (i.e. racecar with RPi5 w/ Ubuntu24.04) BEFORE
accepting this PR.

This commit also adds utility scripts for building and running the Docker
image on Windows, for ROS environment setup on entering the Docker container,
and for building the ROS packages with `colcon`.

NOTES:

- The permissions for accessing the joystick controller and the TTY
  devices have NOT been given, and SHOULD be given BEFORE testing the
  baseline codebase;
- The Dockerfile COULD (probably) be optimized to reduce the size of the
  image.
@MarcOlivierFecteau
Copy link
Author

MarcOlivierFecteau commented Jan 19, 2025

I would gladly test the baseline codebase on the hardware if you could provide me with a (known-good) racecar. I can provide my own RPi5 (and Arduino Mega2560), but it has 8GB of RAM, and I think the racecar SHOULD be able to run on a RPi5 with 4GB RAM, so if you (SherbyRobotics, or the "Robotics department" of UdeS) could provide me with a 4GB model, it would be ideal.

@MarcOlivierFecteau MarcOlivierFecteau changed the title Add Docker development environment for A25 Add Docker development environment and installation script for A25 Jan 22, 2025
The requirements for this feature state that the install script
SHOULD be the same for both the Docker image and the direct installation
on a RaspberryPi 5. Therefore, a more 'barebone' base Docker image is
used, and the installation of the package dependencies was moved into
the `ros_entrypoint.sh`.

NOTES:

- The install script was tested inside a Docker container running the
  `Ubuntu 24.04 amd64` base image from Windows 11 amd64. The
  install script SHOULD be tested (and validated) on a RaspberryPi 5 with a
  fresh install of Ubuntu 24.04 arm64 BEFORE merging the PR.
- I tested the install script inside a Docker container running the
  `Ubuntu 24.04 arm64` bsae image from Windows 11 amd64, but I
  encountered the following issues:
  - The install script took more than 1 hour to run;
  - There were errors when trying to find certain packages or files.
@MarcOlivierFecteau MarcOlivierFecteau changed the title Add Docker development environment and installation script for A25 Add Docker development environment and install script for A25 Jan 22, 2025
This commit adds (temporary) Band-Aids to make the install script not crash:

- `rosdep init` error due to existing list file;
- hard-coded username for chown in `/` workaround;
- add `--cmake-clean-cache` to `colcon build` and links it to `source` to
  avoid skipping build;

The install script has been tested on an RPi5 8GB with an Ethernet
connection. The install script took ~20 minutes to complete. However, the
"test" ROS2 program (`racecar_teleop/teleop.launch.py`) is yet to be tested
on a racecar.

NOTES:

- The install script can easily take 30+ minutes to complete on a RPi5 4GB
with no heatsink/fan;
- The "temporary" Band-Aids SHOULD be replaced before A25 for a more elegant
  solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant