Control robots powered by OpenCat using ROS.
opencat_serial
- serial library for OpenCat implemented in C++opencat_server
- ROS interface for controlling OpenCatopencat_examples
- demo programs on how to use the project-
opencat_description
- mesh and model files
NOTE: due to multi-threading in make process, catkin_make
may fail, in that case just rerun the command multiple times.
Make sure you have installed ROS and can run catkin_make
. In src
directory, run
git clone https://github.com/TomCC7/ros_opencat
cd ros_opencat
# clone serial lib
git submodule init
git submodule update
cd ../..
catkin_make
source ./devel/setup.sh
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-world
- prepare workspace
mkdir -p workspace/src
cd workspace/src
git clone https://github.com/TomCC7/ros_opencat
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
catkin_make
source devel/setup.bash
- run examples (see Examples more more)
rosrun opencat_examples opencat_examples_serial
Multiple Machines (ref)
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
roscore
- 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
roscore
# 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
- serial - a C++ serial library compatible with ROS