concepts.dm.crowhat.impl.pybullet.pybullet_manipulator_interface.PyBulletSingleArmMotionPlanningInterface#
- class PyBulletSingleArmMotionPlanningInterface[source]#
Bases:
SingleArmMotionPlanningInterface
Methods
add_attachment
(body[, link, self_link, ...])calc_differential_ik_qpos_diff
(current_qpos, ...)Use the differential IK to compute the joint difference for the given pose difference.
Get the end-effector pose given the desired pose of the attached object.
calc_ee_quat_from_vectors
([u, v])Compute the quaternion from two directions (the "down" direction for the end effector and the "forward" direction for the end effector).
check_collision
([qpos, ...])Check if the current configuration is in collision.
coriolis
(qpos, qvel)fk
(qpos)gen_ik
(pos[, quat, qpos, max_distance, ...])get_configuration_space
([max_stepdiff])Get the default maximum step difference for the configuration space.
Get the default end-effector quaternion.
get_qpos
()ik
(pos[, quat, qpos, max_distance])jacobian
(qpos)mass
(qpos)remove_attachment
(body[, link, self_link])rrt_collision_free
(qpos1[, qpos2, ...])RRT-based collision-free path planning.
set_planning_world
(planning_world)set_qpos
(qpos)Attributes
- __init__(robot, planning_world)[source]#
- Parameters:
robot (BulletArmRobotBase)
planning_world (PlanningWorldInterface | None)
- __new__(**kwargs)#
- add_attachment(body, link=None, self_link=None, ee_to_object=None)#
- calc_differential_ik_qpos_diff(current_qpos, current_pose, next_pose)#
Use the differential IK to compute the joint difference for the given pose difference.
- calc_ee_pose_from_single_attached_object_pose(pos, quat)#
Get the end-effector pose given the desired pose of the attached object.
- calc_ee_quat_from_vectors(u=(-1., 0., 0.), v=(1., 0., 0.))#
Compute the quaternion from two directions (the “down” direction for the end effector and the “forward” direction for the end effector).
- check_collision(qpos=None, ignore_self_collision=True, ignored_collision_bodies=None, checkpoint_world_state=None, return_list=False)#
Check if the current configuration is in collision.
- Parameters:
qpos (Tuple[float, ...] | List[float] | ndarray | None) – the configuration to check. If None, it will use the current configuration.
ignore_self_collision (bool) – whether to ignore the collision between the robot and itself (including the attached objects).
ignored_collision_bodies (List[str | int] | None) – a list of identifiers of the bodies to ignore.
checkpoint_world_state (bool | None) – whether to checkpoint the world state before checking collision. If None, we will checkpoint the world state if qpos is not None.
return_list (bool) – whether to return the list of collision bodies.
- Returns:
True if the configuration is in collision, False otherwise.
- Return type:
- coriolis(qpos, qvel)#
- fk(qpos)#
- gen_ik(pos, quat=None, qpos=None, max_distance=None, max_returns=5)#
- Parameters:
- Return type:
- get_attached_objects()#
- Return type:
- get_collision_free_problem_space(ignored_collision_bodies=None, max_stepdiff=None)#
- Parameters:
- Return type:
- get_default_configuration_space_max_stepdiff()#
Get the default maximum step difference for the configuration space. Default is 0.02 rad.
- Return type:
- get_ee_default_quat()[source]#
Get the default end-effector quaternion. This is defined by the quaternion of the EE when
the robot base is at the origin,
the “down” direction is (0, 0, -1), and
the “forward” direction is (1, 0, 0).
- Returns:
The default end-effector quaternion.
- Return type:
Vec4f
- get_ee_pose()#
- ik(pos, quat=None, qpos=None, max_distance=None)#
- Parameters:
- Return type:
ndarray | None
- remove_attachment(body, link=None, self_link=None)#
- rrt_collision_free(qpos1, qpos2=None, ignored_collision_bodies=None, smooth_fine_path=False, ignore_rendering=True, **kwargs)[source]#
RRT-based collision-free path planning.
- Parameters:
qpos1 (ndarray) – Start position.
qpos2 (ndarray | None) – End position. If None, the current position is used.
ignored_collision_bodies (List[str | int] | None) – IDs of the objects to ignore in collision checking. Defaults to None.
smooth_fine_path (bool) – Whether to smooth the path. Defaults to False.
kwargs – Additional arguments.
ignore_rendering (bool)
- Returns:
True if the path is collision-free. List[np.ndarray]: Joint configuration trajectory.
- Return type:
- set_planning_world(planning_world)#
- Parameters:
planning_world (PlanningWorldInterface | None)
- property planning_world: PlanningWorldInterface | None#