Distance task#
The DistanceTask can be used to constrain two points to remain at a given distance.
Creating the task#
You can use the add_distance_task() method
on the solver to create a distance task:
# Create a distance task between the "base" and "effector" frames
distance_task = solver.add_distance_task("point1", "point2", 0.1)
This will constrain point1 and point2 to remain at 0.1m.
Updating the task#
The distance task can be updated by setting the distance
property:
# Update the task distance
distance_task.distance = 0.12