3#include "../navtypes.h"
15template <
unsigned int D,
unsigned int N>
60 virtual navtypes::Matrixd<D, N>
69 virtual navtypes::Vectord<D>
80 const navtypes::Vectord<N>& jointVel)
const {
92 const Eigen::Vector2d& eeVel)
const {
93 navtypes::Matrixd<2, N> jacobian =
getJacobian(jointPos);
94 return jacobian.colPivHouseholderQR().solve(eeVel);
A class that calculates the forward kinematics of an arm.
Definition ForwardArmKinematics.h:16
constexpr unsigned int getNumDimensions() const
Get the number of dimensions of the end effector space.
Definition ForwardArmKinematics.h:34
virtual navtypes::Vectord< N > getSegLens() const =0
Get the segment lengths for this arm.
virtual navtypes::Vectord< D > jointPosToEEPos(const navtypes::Vectord< N > &jointPos) const =0
Given a joint position, calculate the current EE position.
navtypes::Vectord< D > jointVelToEEVel(const navtypes::Vectord< N > &jointPos, const navtypes::Vectord< N > &jointVel) const
Calculate the EE velocity.
Definition ForwardArmKinematics.h:79
virtual navtypes::Matrixd< D, N > getJacobian(const navtypes::Vectord< N > &jointPos) const =0
Get the jacobian matrix for the arm at the given joint angles.
navtypes::Vectord< N > eeVelToJointVel(const navtypes::Vectord< N > &jointPos, const Eigen::Vector2d &eeVel) const
Calculates the joint velocity that yields the desired EE velocity.
Definition ForwardArmKinematics.h:91
virtual bool satisfiesConstraints(const navtypes::Vectord< N > &jointPos) const =0
Check if the given joint configuration is valid.
constexpr unsigned int getNumSegments() const
Get the number of segments in this arm.
Definition ForwardArmKinematics.h:25