Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 1.96 KB

README.md

File metadata and controls

59 lines (39 loc) · 1.96 KB

PiBot Motor Driver

This package contains the motor driver for my pibot. It is made for the CamJam EduKit 3. To control the motors the Raspberry Pi Gpio python packge is being used. ROS2 as middleware is being used to communicate with the robot.

Install

The package can be installed as snap:

snap install ros2-pibot-motor-fabolhak

Usage

Snaps need interfaces in order to access ressources from outside. The following interfaces are mounted automatically:

$ snap connections
Interface            Plug                                           Slot                  Notes
network              ros2-pibot-motor-fabolhak:network              :network              -
network-bind         ros2-pibot-motor-fabolhak:network-bind         :network-bind         -

Both network and network-bind are required to communicate via the ROS2 (DDS) middleware with other software parts.

This package needs two additional connections in order to access the hardware GPIO. These must be manually connected via the following commands:

snap connect ros2-pibot-motor-fabolhak:hardware-observe :hardware-observe
snap connect ros2-pibot-motor-fabolhak:gpio-memory-control :gpio-memory-control

To start the ROS2 node run the following command:

sudo ros2-pibot-motor-fabolhak.run

You now can trigger the robot from an external computer within the same network:

ros2 service call /triggerMotor std_srvs/Trigger

Build

Use snapcraft to build a new image. Make sure to have at least snapcraft version 4.2 and then run:

cd ros2_pibot_motor
snapcraft --enable-experimental-extensions