concepts.simulator.ikfast.ikfast_common.IKFastWrapperBase#

class IKFastWrapperBase[source]#

Bases: object

Methods

fk(qpos)

gen_ik(pos, quat, last_qpos[, max_attempts, ...])

get_current_free_joint_positions()

get_current_joint_positions()

ik_internal(pos, quat[, sampled, body_pos, ...])

__init__(module, joint_ids, free_joint_ids, joints_lower, joints_upper, use_xyzw=True, max_attempts=1000, fix_free_joint_positions=False, shuffle_solutions=False, sort_closest_solution=False, current_joint_position_getter=None)[source]#

IKFast wrapper base class.

Parameters:
  • module – the IKFast module.

  • joint_ids (List[int]) – the joint ids of the robot.

  • free_joint_ids (List[int]) – the free joint ids of the robot.

  • joints_lower (ndarray) – the lower limits of the joints.

  • joints_upper (ndarray) – the upper limits of the joints.

  • use_xyzw (bool) – whether to use xyzw for quaternion representation.

  • max_attempts (int) – the maximum number of attempts for IK.

  • fix_free_joint_positions (bool) – whether to fix the free joint positions.

  • shuffle_solutions (bool) – whether to shuffle the solutions.

  • sort_closest_solution (bool) – whether to sort the solutions by the closest one.

  • current_joint_position_getter (Callable[[], ndarray] | None) – the getter for the current joint positions.

__new__(**kwargs)#
fk(qpos)[source]#
Parameters:

qpos (ndarray)

Return type:

Tuple[ndarray, ndarray]

gen_ik(pos, quat, last_qpos, max_attempts=None, max_distance=float('inf'), body_pos=None, body_quat=None, verbose=False)[source]#
Parameters:
Return type:

Iterable[ndarray]

get_current_free_joint_positions()[source]#
Return type:

ndarray

get_current_joint_positions()[source]#
Return type:

ndarray

ik_internal(pos, quat, sampled=None, body_pos=None, body_quat=None)[source]#
Parameters:
Return type:

List[ndarray]