Skip to content

zenith-polymtl/dockerfile-raspberrypi5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dockerfile-raspberrypi5 (DEPRECATED)

How to use:

1. Install docker & other requirements

sudo apt update
sudo apt upgrade -y
sudo apt install -y docker.io
sudo apt-get install -y raspberrypi-kernel-headers
sudo modprobe ch341
sudo systemctl enable --now docker
sudo usermod -aG docker $USER

Please restart the pi after the install

2. Install docker compose:

# Download Docker Compose binary
sudo curl -L "https://github.com/docker/compose/releases/download/v2.23.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# Make it executable
sudo chmod +x /usr/local/bin/docker-compose
# Create a symbolic link
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
# Verify installation
docker-compose --version

2. Clone repos:

git clone https://github.com/zenith-polymtl/dockerfile-raspberrypi5.git
cd dockerfile-raspberrypi5
git clone https://github.com/zenith-polymtl/ros2-mission-2.git ros2_ws

2. Build docker contrainer

docker-compose build ros2-mission

3. Start the docker containter

docker-compose up -d

4. Connect to the docker container

docker-compose exec ros2-mission bash

You can verify the USB port with this command and change it in docker-compose.yaml

ls -l /dev/ttyUSB*

5. Verify that ch341 driver is working:

ls -l /sys/class/tty/ttyUSB0/device/driver

You should see something like this:

/sys/class/tty/ttyUSB0/device/driver -> ../../../../../../../../../../bus/usb-serial/drivers/ch341-uart

6. Start the code!

Inside the container:

cd /ros2_ws
colcon build --packages-up-to mission
source install/setup.bash
ros2 run mission (insert package here)

Fix permissions from outside the docker:

sudo chown -R $(whoami):$(whoami) ros2_ws

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages