This class controls the velocity of a multidimensional mechanism by commanding its position using the jacobian of the kinematics.
More...
#include <JacobianVelController.h>
template<int outputDim, int inputDim>
class JacobianVelController< outputDim, inputDim >
This class controls the velocity of a multidimensional mechanism by commanding its position using the jacobian of the kinematics.
- Template Parameters
-
outputDim | The dimension of the output vector of the kinematic function. |
inputDim | The dimension of the input vector of the kinematic function. |
- See also
- https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant
◆ JacobianVelController()
template<int outputDim, int inputDim>
Construct a new controller.
- Parameters
-
kinematicsFunc | The kinematics of the mechanism being controlled. This is a function that takes in some input vector (ex: joint angles of an arm) and outputs another vector (ex: the 3d pose of the hand) |
jacobianFunc | The jacobian of the kinematic function. |
◆ getCommand() [1/2]
template<int outputDim, int inputDim>
Get the current target position.
- Parameters
-
currTime | The current timestamp. |
currPos | The current position of the mechanism, in the kinematic input space. |
- Returns
- navtypes::Vectord<inputDim> The target position of the mechanism, in the kinematic input space.
◆ getCommand() [2/2]
template<int outputDim, int inputDim>
Get the current target position.
- Parameters
-
| currTime | The current timestamp. |
| currPos | The current position of the mechanism, in the kinematic input sequence. |
[out] | cosineSim | Output parameter, gives the cosine similarity of the delta to the returned target and the delta to the commanded target. This similarity may be low if the kinematics of the mechanism do not allow it to move in the commanded direction. |
- Returns
- navtypes::Vectord<inputDim> The target position of the mechanism, in the kinematic input space. Returns the current position if no target is set.
◆ hasTarget()
template<int outputDim, int inputDim>
Check if a target velocity has been set.
- Returns
- bool True iff a target has been set.
◆ setTarget()
template<int outputDim, int inputDim>
Set the target velocity.
- Parameters
-
currTime | The current timestamp. |
targetVel | The target velocity, in the output space of the kinematic function. |
The documentation for this class was generated from the following file: