XRPServo

class xrp.XRPServo(deviceNum: SupportsInt)

Bases: pybind11_object

XRPServo.

A SimDevice based servo

Constructs an XRPServo.

Parameters:

deviceNum – the servo channel

getAngle() wpimath.units.radians

Get the servo angle.

Returns:

Current servo angle in radians

getPosition() float

Get the servo position.

Deprecated:

Use GetAngle() instead

Returns:

Current servo position

setAngle(angle: wpimath.units.radians) None

Set the servo angle.

Parameters:

angle – Desired angle in radians

setPosition(position: SupportsFloat) None

Set the servo position.

Deprecated:

Use SetAngle() instead

Parameters:

position – Desired position (Between 0.0 and 1.0)