🤖ROS and ROS2
ROS Interface
There's also a ROS wrapper for developpers to easily connect to the ROS environment. This ROS wrapper contains two branches: ROS1 and ROS2. It is recommended to use ROS with Raspberry Pi.
Note:
ROS1 and ROS2 are not directly compatible, but you can achieve limited interoperability through the following methods:
System Coexistence: Both ROS1 and ROS2 can be installed on the same device, but they are used by switching environment variables and cannot be activated at the same time.
Communication Bridge: Communication between the two requires the
ros1_bridgetool to bridge messages. Note that this only supports a limited number of standard message types.Development Differences: ROS1 code cannot be reused directly. Adjustments are required for ROS2 syntax (such as message types starting with a capital letter) and APIs.
Using ROS on Raspberry Pi
Currently, it's recommended to install ROS using docker.
install docker on Raspberry Pi (ref)
sudo apt-get update && sudo apt-get upgrade
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker pi
# test installation
docker run hello-worldprepare workspace
mkdir -p workspace/src
cd workspace/src
git clone https://github.com/PetoiCamp/ros_opencat
cd ros_opencat
git submodule init && git submodule update
cd ../../..run the container
source files and build inside the container
run examples (see Examples for more)
Using ROS for remote control
Ros is designed with distributed computing in mind. Here's a simple example on how to run nodes on different machines.
on host machine (usually more powerful than Raspberry Pi)
run service node on Raspberry Pi
send command from host
Examples
using serial library
using ROS service
Projects
There are some great projects with ROS2 from the users who contributed:
Note:
Last updated
Was this helpful?