Tolerances on a path

The software includes algorithms to solve path following problems. The end-effector pose is given as discrete points along a path in Cartesian space. In addition we can add a tolerance to the position and orientation of these poses. The tools to do this are explained here.

Toleranced numbers

One of the main techniques to add tolerences is to use a TolerancedNumber where you would normally use a Python float.

[3]:
from acrobotics.path import TolerancedNumber, TrajectoryPt

# position and orientation in euler angles
x, y, z = 1.0, 2.0, 3.0
rx, ry, rz = 0.0, 0.0, 1.57

# a fixed end-effector pose along the path
# given a position [x, y, z, and orientation as euler angles rx, ry, rz]
tp_fixed = TrajectoryPt([x, y, z, rx, ry, rz])

# the same point except the x-position may vary between 0.5 and 1.5 (nominal value = 1.0)
xt = TolerancedNumber(1.0, 0.5, 1.5)
tp_tol = TrajectoryPt([xt, y, z, rx, ry, rz])

Build in special cases

There are different types of toleranced for wich we have default functions.

[7]:
from pyquaternion import Quaternion
from acrobotics.path import FreeOrientationPt, TolOrientationPt

# Only position specified, orientation is free
tp_pos = FreeOrientationPt([x, y, z])

q1 = Quaternion()
# Orientation given as a quaternion
# TrajectoryPt([x, y, z], quat = q1)

# Tolerance on orientation given as a quaternion and max distance
tp_quat_tol = TolOrientationPt([x, y, z], q1)
[ ]: