reachy_sdk.head
¶
Reachy Head module.
Handles all specific method to an Head: - the inverse kinematics - look_at function
- class reachy_sdk.head.Head(config, joints, grpc_channel)¶
Head class.
It exposes the neck orbita actuator at the base of the head. It provides look_at utility function to directly orient the head so it looks at a cartesian point expressed in Reachy’s coordinate system.
- forward_kinematics(joints_position=None)¶
Compute the forward kinematics of the head.
It will return the quaternion (x, y, z, w). You can either specify a given joints position, otherwise it will use the current robot position.
- inverse_kinematics(target, q0=None)¶
Compute the inverse kinematics of the arm.
Given a goal quaternion (x, y, z, w) it will try to compute a joint solution to reach this target (or get close).
It will raise a ValueError if no solution is found.
You can also specify a basic joint configuration as a prior for the solution.
- look_at(x, y, z, duration, starting_positions=None, sampling_freq=100, interpolation_mode=<function linear>)¶
Compute and send neck rpy position to look at the (x, y, z) point in Reachy cartesian space (torso frame).
X is forward, Y is left and Z is upward. They all expressed in meters.
This function will block until the movement is over. See look_at_async for an asynchronous version.
- async look_at_async(x, y, z, duration, starting_positions=None, sampling_freq=100, interpolation_mode=<function linear>)¶
Compute and send neck rpy position to look at the (x, y, z) point in Reachy cartesian space (torso frame).
X is forward, Y is left and Z is upward. They all expressed in meters.
This function is asynchronous and will return a Coroutine. This can be used to easily combined multiple goto/look_at. See look_at for an blocking version.
- property neck_orbita_joints¶
Get the 3 joints composing the Orbita neck.