The Abdomen module v2 has 3 degrees of freedom, for articulation of the torso:
The actual position of the module can be accessed using controls.
Controls are accessed with the notation :
my_control = system.control(Control_name, Namespace, acquire = Parameters)
Below is an example of finding the position of the torso pitch and then making the robot lean forwards.
#get access to the control
torso_pitch_control = system.control(
"Torso Pitch", "Mesmer Torso 1", acquire=["demand","position"]
)
class Activity:
def on_start(self):
#find the torso pitch
current_torso_pitch = torso_pitch_control.position
print(current_torso_pitch)
#make the body lean forward
torso_pitch_control.demand = 10
The on_tick method can be used for more powerful, time varying demands.
A more complete tutorial on controls is given here.
| Control name | Namespace | Avaliable parameters |
|---|---|---|
"Torso Pitch" |
"Mesmer Torso 1" |
["demand","position","min","max"] |
"Torso Roll" |
"Mesmer Torso 1" |
["demand","position","min","max"] |
"Torso Yaw" |
"Mesmer Torso 1" |
["demand","position","min","max"] |
The control_name, namespace and avaliable parameters for each control is given in the control section of the scripts page in Tritium UI, this gives more information about datatypes and access rights.