MechanismLigament2d
- class wpilib.MechanismLigament2d
Bases:
MechanismObject2dLigament node on a Mechanism2d.
A ligament can have its length changed (like an elevator) or angle changed, like an arm.
@see Mechanism2d
- get_angle() float
Get the ligament’s angle relative to its parent.
- Returns:
the angle
- get_color() wpiutil._wpiutil.Color8Bit
Get the ligament color.
- Returns:
the color of the line
- get_length() float
Get the ligament length.
- Returns:
the line length
- get_line_weight() float
Get the line thickness.
- Returns:
the line thickness
- set_angle(angle: wpimath.units.degrees) None
Set the ligament’s angle relative to its parent.
- Parameters:
angle – the angle
- set_color(color: wpiutil._wpiutil.Color8Bit) None
Set the ligament color.
- Parameters:
color – the color of the line
- set_length(length: SupportsFloat | SupportsIndex) None
Set the ligament’s length.
- Parameters:
length – the line length
- set_line_weight(line_width: SupportsFloat | SupportsIndex) None
Set the line thickness.
- Parameters:
line_width – the line thickness