Each Humerus module has 2 degrees of freedom:
This module connects to the Forearm module to give the 5 degrees of fredom in the arm.
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)
As there are two humeri (left and right) this is represented in the notation.
Below is an example of finding the pitch of the right shoulder and then making it put its hand up.
#get access to the control
right_shoulder_pitch_control = system.control(
"Shoulder Pitch Right", "Mesmer Arms 1", acquire=["demand","position"]
)
class Activity:
def on_start(self):
#find the shoulder pitch
current_shoulder_pitch = right_shoulder_pitch_control.position
print(current_shoulder_pitch)
#put the arm up
right_shoulder_pitch_control.demand = 100
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 |
|---|---|---|
"Shoulder Pitch Left" |
"Mesmer Arms 1" |
["demand","position","min","max"] |
"Shoulder Pitch Right" |
"Mesmer Arms 1" |
["demand","position","min","max"] |
"Elbow Pitch Left" |
"Mesmer Arms 1" |
["demand","position","min","max"] |
"Elbow Pitch Right" |
"Mesmer Arms 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.