reachy.reachy

Reachy main module entry point.

Module Contents

Classes

Reachy

Class representing the connection with the hardware robot.

Attributes

logger

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

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

list

need_cooldown(self, temperature_limit=50)

Check if Reachy needs to cool down.

Parameters

temperature_limit (int) – Temperature limit (in °C) for each motor.

Returns

Whether or not you should let the robot cool down

Return type

bool

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
  • rest_position (dict) – the desired rest position for the robot

  • goto_rest_duration (float) – time in seconds to reach the rest position

  • lower_temeprature (int) – lower temperature threshold (in °C) to be reached by all motors before the end of cool down

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.