Motor Node
The MotorNode is a simple I2CNode output node for controlling the robot's motor drives.
This controls the direction of the robot in compass bearings (forwards, backwards, left, right and diagonals), rotation left and right of the robot and stopping the robot motors:
motornode.py
loading...
This node subscribes to 10 events, each event responsible for one of the robot motions:
- motor-forwards
- motor-backwards
- motor-pan-left
- motor-pan-right
- motor-translate-forward-left
- motor-translate-forward-right
- motor-translate-back-left
- motor-translate-back-right
- motor-rotate-left
- motor-rotate-right
Each of these events contains two parameters:
- the speed of the motor as defined in the shared data class
- the duration of the motion in seconds
In addition to the above, there is a single event to command all motor motion to stop:
- motor-stop