This repository contains documentation for installing ROS2 on a Mango Pi running Ubuntu 22.04. As of February 2022, ROS2 is not distributed as an apt package or docker container for RISC-v, so must either be cross compiled or built natively. This repository contains a base image of ROS2 build using docker buildx, which has been published to a public container repo. Feel free to use this as a base image for your own docker containers.
- Mango Pi 1Gig
- USB-C Hub with Ethernet
- Ubuntu 22.04 RISC-V image for Mango Pi
- Wireless Driver manual install
- Git
- Docker.io
- Docker-Compose
NOTE: Visual Studio Code Remoting is not supported on RISC-V as of February 22 2022; might be better to develop on a different system and deploy to the Mango Pi.
-
Flash a Ubuntu 22.04 image to an SD Card using Balena Etcher
-
Boot the Mango Pi with a Mini-HDMI Cable and USB-C Hub with keyboard.
-
Install some software:
sudo apt install git sudo apt install docker.io sudo apt install docker-compose
-
After setup, setup Wifi:
mkdir ~/ext cd ~/ext git clone https://github.com/lwfinger/rtl8723ds cd rtl8723ds make sudo make install sudo modprobe -v 8723ds
-
Configure your Wifi
ls /sys/class/net sudo nano /etc/netplan/50-cloud-init.yaml
network: ... wifis: <from the class/net>: optional: true access-points: "your ssid": password: "wifi password" dhcp4: true
-
Configure docker to not require sudo (optional)
sudo gpasswd -a $USER docker
This method allows you to use the demo applications to validate your install; however deriving your own container from the released version is recommended.
docker run --network host -i -t polyhobbyist/ros:humble /bin/bash
Create a dockerfile for your image (example below):
FROM polyhobbyist/ros:humble
RUN apt-get update && \
apt install \
libopencv-dev \
python3-opencv \
python-is-python3 \
libboost-all-dev \
openssl \
git \
gdb \
i2c-tools \
libcurl4-openssl-dev \
libssl-dev \
curl \
libi2c-dev
ENTRYPOINT ["./ros_entrypoint.sh"]
CMD [ "bash" ]
I recommend using a Docker-Compose file, so that you don't have to remember the docker command line to launch your containers.
version: '3.4'
services:
mangopi:
image: mangopiws
network_mode: "host"
privileged: true
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
devices:
- /dev:/dev
build:
context: .
dockerfile: ./Dockerfile
command: /bin/sh -c "while sleep 1000; do :; done"
you can then use the command line:
docker-compose up
then
docker exec -ti <ros container> /bin/bash