concepts.simulator.pybullet.components.robot_base.BulletRobotBase#

class BulletRobotBase[source]#

Bases: BulletComponent

Methods

do(action_name, *args, **kwargs)

Execute an action primitive.

get_body_id()

Get the pybullet body ID of the robot.

get_body_pose()

Get the pose of the robot body.

get_dof()

Get the total degrees of freedom of the robot.

get_home_qpos()

Get the home joint configuration.

get_joint_ids()

Get the pybullet joint IDs of the robot.

get_joint_limits()

Get the joint limits.

get_qpos()

Get the current joint configuration.

get_qvel()

Get the current joint velocity.

register_action(name, func[, interface])

Register an action primitive.

reset_home_qpos()

Reset the home joint configuration.

set_ik_method(ik_method)

set_qpos(qpos)

Set the joint configuration.

set_qpos_with_holding(qpos)

Set the joint configuration with the gripper holding the object.

set_suppress_warnings([value])

suppress_warnings()

Attributes

__init__(client, body_name=None, gripper_objects=None, current_interface='pybullet', ik_method='pybullet')[source]#
Parameters:
__new__(**kwargs)#
do(action_name, *args, **kwargs)[source]#

Execute an action primitive.

Parameters:

action_name (str) – Name of the action primitive.

Returns:

True if the action primitive is successful.

Return type:

bool

get_body_id()[source]#

Get the pybullet body ID of the robot.

Returns:

Body ID of the robot.

Return type:

int

get_body_pose()[source]#

Get the pose of the robot body.

Returns:

3D position and 4D quaternion of the robot body.

Return type:

Tuple[np.ndarray, np.ndarray]

get_dof()[source]#

Get the total degrees of freedom of the robot.

Returns:

Total degrees of freedom.

Return type:

int

get_home_qpos()[source]#

Get the home joint configuration.

Return type:

ndarray

get_joint_ids()[source]#

Get the pybullet joint IDs of the robot.

Returns:

Joint IDs of the robot.

Return type:

Sequence[int]

get_joint_limits()[source]#

Get the joint limits.

Returns:

Lower and upper joint limits.

Return type:

Tuple[np.ndarray, np.ndarray]

get_qpos()[source]#

Get the current joint configuration.

Returns:

Current joint configuration.

Return type:

np.ndarray

get_qvel()[source]#

Get the current joint velocity.

Returns:

Current joint velocity.

Return type:

np.ndarray

register_action(name, func, interface=None)[source]#

Register an action primitive.

Parameters:
  • name (str) – name of the action primitive.

  • func (Callable) – function that implements the action primitive.

  • interface (str | None) – interface of the action primitive. Defaults to None. If None, the action primitive is registered for the current interface.

Raises:

ValueError – If the action primitive is already registered.

Return type:

None

reset_home_qpos()[source]#

Reset the home joint configuration.

set_ik_method(ik_method)[source]#
Parameters:

ik_method (str | IKMethod)

set_qpos(qpos)[source]#

Set the joint configuration.

Parameters:

qpos (ndarray) – Joint configuration.

Return type:

None

set_qpos_with_holding(qpos)[source]#

Set the joint configuration with the gripper holding the object.

Parameters:

qpos (ndarray) – Joint configuration.

Return type:

None

set_suppress_warnings(value=True)[source]#
Parameters:

value (bool)

suppress_warnings()[source]#
property p#
property w#
property world#