Use Pika Spark for controlling a camera sensor head’s pan and tilt

Pika Spark is an Arduino Portenta X8 based micro robot control system combining an unprecedented amount of computing power and interfaces within an extremely small form factor. The Pika Spark has two (2) galvanically isolated RS485 interfaces which can be used for communication with external devices. Galvanic isolation prevents ground-loops and increases overall system resilience and is an important feature in industrial-grade control systems.

'Dragonbeard' is the unofficial name for open-software/open-hardware camera sensor head which contains both color and thermal imaging sensors from OpenMV. Those sensors are mounted on a Robotis Dynamixel MX-28AR actuated pan/tilt mechanic that allows the camera head to swivel from left to right as well as from up to down (and vice versa).

Note: The complete 3D design of the 'Dragonbeard' colour/thermal imaging head was developed and prototyped by Scott Dixon.


'Dragonbeard' color/thermal imaging sensor head mounted on a pan/tilt mechanism actuated by Dynamixel MX-28AR servo motors and controlled by a Pika Spark


Underneath the imaging head's pan axis a hardware stack consisting of a Raspberry Pi Zero in combination with a Waveshare PoE Ethernet / USB Hub HAT are mounted in a neatly designed 3D printed case - vaguely resembling a 'beard' and thus giving the unofficial name to the complete system.


The 'beard'-like control unit consisting of Rasperry Pi Zero and Waveshare PoE Ethernet / USB Hub HAT


Upon power-up the Raspberry Pi Zero is starting a software configuring the OpenMV cameras and streaming captured imaging data via ROS2 topics. The complete Docker-ized software stack is available here. The software is largely based on the OpenMV ROS driver maintained here.

Note: The OpenMV ROS driver as well as the Docker-ized applicaton running on the Raspberry Pi Zero were developed by Jonas Wühr.


Great attention to detail by Scott Dixon - the Dragonbeard 'beard' enclosure for the Raspberry Pi Zero even contains a hexapod miniature!


As demonstrated in the tutorial 'How-to control Robotis Dynamixel via Pika Spark’s RS485 interface' a Pika Spark can be used for controlling the Dynamixel MX-28AR actuators embedded in the 'Dragonbeard' imaging sensor head. A complete Docker-ized ROS application that is subscribing to a ROS geometry_msgs/Twist and controlling the pan/tilt actuators accordingly is available here. In order to execute it on the Pika Spark the following steps need to be done:

git clone https://github.com/pika-spark/pika-spark-containers
cd pika-spark-containers/ros-l3xz-head-demo
./docker-build.sh
sudo ./docker-run.sh

On your PC you need to connect a PS3 joystick via USB and execute the following steps:

cd my_colcon_ws/src
git clone https://github.com/107-systems/l3xz_joy
git clone https://github.com/107-systems/l3xz_teleop

cd my_colcon_ws
source /opt/ros/humble/setup.bash
colcon build --packages-select l3xz_joy l3xz_teleop

. install/setup.bash
ros2 launch l3xz_joy joy.py
ros2 launch l3xz_teleop teleop.py

You are now able to control the sensor head via command messages streamed from your PC to the Pika Spark who's controlling the pan/tilt axis actuators!