Gear task#
A GearTask
can be used to create a relation between two degrees of freedom.
It can be used to simulate the behaviour of a gear (with a given ratio) or a timing belt, but also of any other situation where a degree of freedom is mimicking the behaviour of another one.
Creating the task#
The gear task can be created by calling add_gear_task()
on
the solver:
# Creating the gear task
gear_task = solver.add_gear_task()
gear_task.configure("gear", "hard")
Setting up the relations#
Relations can then be set by calling set_gear()
on the task:
# Setting up the relations
gear_task.set_gear("joint1", "joint2", 2.0)
The first two arguments are the names of the degrees of freedom that are linked together. The third argument is the ratio between the two degrees of freedom.
Example#
In the following example, the planar 2 DoF robot is being used with an additional gear task on its two joints
with a relation of -1.0
. One of the degrees of freedom is then moved with a joints task, leading to the other
one moving in the opposite direction.
Planar 2 DoF (gear relation)