6 from trac_ik_python.trac_ik_wrap
import TRAC_IK
12 timeout=0.005, epsilon=1e-5, solve_type="Speed",
15 Create a TRAC_IK instance and keep track of it.
17 :param str base_link: Starting link of the chain.
18 :param str tip_link: Last link of the chain.
19 :param float timeout: Timeout in seconds for the IK calls.
20 :param float epsilon: Error epsilon.
21 :param solve_type str: Type of solver, can be:
22 Speed (default), Distance, Manipulation1, Manipulation2
23 :param urdf_string str: Optional arg, if not given URDF is taken from
24 the param server at /robot_description.
26 if urdf_string
is None:
27 urdf_string = rospy.get_param(
'/robot_description')
48 bx=1e-5, by=1e-5, bz=1e-5,
49 brx=1e-3, bry=1e-3, brz=1e-3):
53 :param list of float qinit: Initial status of the joints as seed.
54 :param float x: X coordinates in base_frame.
55 :param float y: Y coordinates in base_frame.
56 :param float z: Z coordinates in base_frame.
57 :param float rx: X quaternion coordinate.
58 :param float ry: Y quaternion coordinate.
59 :param float rz: Z quaternion coordinate.
60 :param float rw: W quaternion coordinate.
61 :param float bx: X allowed bound.
62 :param float by: Y allowed bound.
63 :param float bz: Z allowed bound.
64 :param float brx: rotation over X allowed bound.
65 :param float bry: rotation over Y allowed bound.
66 :param float brz: rotation over Z allowed bound.
68 :return: joint values or None if no solution found.
69 :rtype: tuple of float.
72 raise Exception(
"qinit has length %i and it should have length %i" % (
86 Return lower bound limits and upper bound limits for all the joints
87 in the order of the joint names.
95 Set joint limits for all the joints.
97 :arg list lower_bounds: List of float of the lower bound limits for
99 :arg list upper_bounds: List of float of the upper bound limits for
103 raise Exception(
"lower_bounds array size mismatch, it's size %i, should be %i" % (
108 raise Exception(
"upper_bounds array size mismatch, it's size %i, should be %i" % (
111 self.
_ik_solver.setKDLLimits(lower_bounds, upper_bounds)