Usage
Input
actuator
expects a decision
stream (see example below), which is usually sent by the controller
.
actuatorOutput.Write(
&pb_outputs.SensorOutput{
SensorId: 2,
Timestamp: uint64(time.Now().UnixMilli()),
SensorOutput: &pb_outputs.SensorOutput_ControllerOutput{
ControllerOutput: &pb_outputs.ControllerOutput{
SteeringAngle: float32(steerValue),
LeftThrottle: float32(speed),
RightThrottle: float32(speed),
FrontLights: false,
},
},
},
)
SensorOutput_ControllerOutput
contains a ControllerOutput
object, composed of the following fields:
SteeringAngle
, afloat32
value between -1 (left) and 1 (right)LeftThrottle
, afloat32
value between -1 (full reverse) and 1 (full forward)RightThrottle
, afloat32
value between -1 (full reverse) and 1 (full forward)FrontLights
, aboolean
value previously used to turn on the front lights in the dark, currently not used
Configuration values
- itwoc-bus - the number of the I2C bus, reserved entirely for the motors, as well as the servo. More details
- electronic-diff - takes a boolean value to decide whether or not to slow down the inner wheel while taking a turn. This essentially creates an illusion of a differential.
- track-width - currently unused parameter, previously used for development and setting up the correct values in the locking-diff, should not be altered.
- servo-scaler - increases or decreases the total movement range of the servo. Takes a value as a percentage,
1
is100%
of a standard range. If you wish to increase the range to e.x.150%
, you would set the value to1.5
; to decrease to e.x.90%
, choose value of0.9
- servo-trim - used to calibrate the neutral position of the front wheels. Positive values will make the servo steer towards the right in the neutral position, negative - to the left.
- fan-cap - legacy value, currently not used.