reachy.reachy
¶
Reachy main module entry point.
Module Contents¶
Classes¶
Class representing the connection with the hardware robot. |
Attributes¶
- reachy.reachy.logger¶
- class reachy.reachy.Reachy(left_arm=None, right_arm=None, head=None)¶
Bases:
object
Class representing the connection with the hardware robot.
- Parameters
left_arm (reachy.parts.LeftArm) – left arm part if present or None if absent
right_arm (reachy.parts.RightArm) – right arm part if present or None if absent
head (reachy.parts.Head) – hrad part if present or None if absent
Connect and synchronize with the hardware robot.
It can be used to monitor real time robot state and to send commands. Mainly a container to hold the different parts of Reachy together.
- __repr__(self)¶
Reachy representation.
- close(self)¶
Close all communication with each attached parts.
- property parts(self)¶
List of all attached parts.
- property motors(self)¶
List of all motors in the attached parts.
- goto(self, goal_positions, duration, starting_point='present_position', wait=False, interpolation_mode='linear')¶
Goto specified goal positions.
- Parameters
goal_positions (dict) – desired target position (in the form {‘full_motor_name’: target_position})
duration (float) – move duration (in sec.)
starting_point (str) – register to use to retrieve the starting point (e.g. ‘present_postion’ or ‘goal_position’)
wait (bool) – whether or not to wait for the end motion before returning
interpolation_mode (str) – interpolation used for computing the trajectory (e.g. ‘linear’ or ‘minjerk’)
- Returns
list of reachy.trajectory.TrajectoryPlayer (one for each controlled motor)
- Return type
- need_cooldown(self, temperature_limit=50)¶
Check if Reachy needs to cool down.
- wait_for_cooldown(self, rest_position, goto_rest_duration=5, lower_temperature=45)¶
Wait for the robot to lower its temperature.
The robot will first go to the specified rest position and then, it will turn all motors compliant. Finally, it will wait until the temperature of each motor goes below the lower_temperature parameters.
- Parameters
Note
The robot will stay compliant at the end of the function call. It is up to you, to put it back in the desired position.