MechanismRoot2d
- class wpilib.MechanismRoot2d
Bases:
pybind11_object
Root Mechanism2d node.
A root is the anchor point of other nodes (such as ligaments).
Do not create objects of this class directly! Obtain pointers from the Mechanism2d.GetRoot() factory method.
Append other nodes by using Append().
- appendLigament(name: str, length: float, angle: wpimath.units.degrees, lineWidth: float = 6, color: wpilib._wpilib.Color8Bit = Color8Bit(red=235, green=137, blue=52)) wpilib._wpilib.MechanismLigament2d
Append a ligament node
- getName() str
- setPosition(x: float, y: float) None
Set the root’s position.
- Parameters:
x – new x coordinate
y – new y coordinate