Scorpi modules
Back to Scorpi
Overview of hardware interface
This overview is focused on the hardware and hardware interface modules used as the basis for controlling the Scorpi system.
The described software module relates to the source code file where the module is implemented.
Processor boards
The Scorpi system has two Raspberry Pi processors (version 4 and 5) and three hardware interface boards (Teensy motor drive boards).
The main functionality for autonomous operation is handled in the ROS2 nodes.
Camera and Lidar interface directly to ROS2 using ROS drivers.
All other sensors and actuators are interfaced through a MQTT-ROS2 node. There is one MQTT broker only.
The hardware abstraction layer (HAL) in a Teensy_interface application generates MQTT messages from the hardware. Both Raspberry Pi processors run a teensy_interface, sending data to the same MQTT message broker.
The messages sent to the MQTT broker are (mostly) text strings. The last word in the MQTT topic is the message keyword. The message payload is coded as text, mostly numerical, and always separated by a space character.
The teensy_interface uses USB to talk to one or two processor boards with a Teensy 4.1 processor. The Teensy software is called motor_drive.
Each board includes four motor drivers, an interface to three angle encoders, two MPUs, and other items.
The board also delivers power to the Raspberry Pi and handles the power on and off.
A subscription service in the motor_driver controls the data rate and selection. The teensy_interface manages the subscriptions as specified in a configuration file called "robot.ini."
Drive control
The forward drive uses four motors, two on each wheel. Two motors give more power and reduce backlash by driving each motor with a different offset voltage.
All motors have rotation encoders and are velocity-controlled from the teensy_interface. When Scorpi is turning (controlled by the front wheels), the velocity of the driving wheels is adjusted to match the curvature.
The following status is available through MQTT:
- Motor velocity: Topic "scorpi/drive/T1/mvel" has a payload "m1 m2 m3 m4", a text string with the estimated velocity in rad/sec of the motor before the gear.
- Motor voltage: Topic "scorpi/drive/T1/motv" has a payload "v1 v2 v3 v4", a text string with the voltage applied to the motors (in Volts).
The MQTT topic levels are:
- The system level, here "scorpi".
- The function division, here "drive", could also be "crane". The "drive" functions control the forward drive motors, the steering and the crane yaw. The "crane" function controls the gripper and the x-y movement (arm and stick).
- The board level, here "T1", could also be "T2". Each board control up to four motors.