Petoi Doc Center
Ask or search…
Comment on page


ROS Interface
There's also a ROS wrapper for developpers to easily connect to the ROS environment. It is recommended to use ROS with Raspberry Pi.

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 -o
sudo sh
sudo usermod -aG docker pi
# test installation
docker run hello-world
  • prepare workspace
mkdir -p workspace/src
cd workspace/src
git clone
cd ros_opencat
git submodule init && git submodule update
cd ../../..
  • run the container
docker run -v path/to/workspace:/workspace \
-it --rm --privileged --network host --name ros ros:noetic-robot
  • source files and build inside the container
cd /workspace
source /opt/ros/noetic/setup.bash
source devel/setup.bash
rosrun opencat_examples opencat_examples_serial

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)
# launch server
  • run service node on Raspberry Pi
export ROS_MASTER_URI=http://<Host_IP>:11311/
rosrun opencat_server opencat_service_node
  • send command from host
rosrun opencat_examples opencat_examples_client_cpp


  • using serial library
rosrun opencat_examples opencat_examples_serial
  • using ROS service
# start core
# start service server
rosrun opencat_server opencat_service_node
# examples using oppencat ros service in C++
rosrun opencat_examples opencat_examples_client_cpp
# examples using opencat ros service in python
rosrun opencat_examples opencat_examples_client_py