Panda

class panda_gym.envs.robots.panda.Panda(sim: PyBullet, block_gripper: bool = False, base_position: Optional[ndarray] = None, control_type: str = 'ee')

Panda robot in PyBullet.

Parameters
  • sim (PyBullet) – Simulation instance.

  • block_gripper (bool, optional) – Whether the gripper is blocked. Defaults to False.

  • base_position (np.ndarray, optionnal) – Position of the base base of the robot, as (x, y, z). Defaults to (0, 0, 0).

  • control_type (str, optional) – “ee” to control end-effector displacement or “joints” to control joint angles. Defaults to “ee”.

arm_joint_ctrl_to_target_arm_angles(arm_joint_ctrl: ndarray) ndarray

Compute the target arm angles from the arm joint control.

Parameters

arm_joint_ctrl (np.ndarray) – Control of the 7 joints.

Returns

Target arm angles, as the angles of the 7 arm joints.

Return type

np.ndarray

ee_displacement_to_target_arm_angles(ee_displacement: ndarray) ndarray

Compute the target arm angles from the end-effector displacement.

Parameters

ee_displacement (np.ndarray) – End-effector displacement, as (dx, dy, dy).

Returns

Target arm angles, as the angles of the 7 arm joints.

Return type

np.ndarray

get_ee_position() ndarray

Returns the position of the ned-effector as (x, y, z)

get_ee_velocity() ndarray

Returns the velocity of the end-effector as (vx, vy, vz)

get_fingers_width() float

Get the distance between the fingers.

get_obs() ndarray

Return the observation associated to the robot.

Returns

The observation.

Return type

np.ndarray

reset() None

Reset the robot and return the observation.

set_action(action: ndarray) None

Set the action. Must be called just before sim.step().

Parameters

action (np.ndarray) – The action.

set_joint_neutral() None

Set the robot to its neutral pose.