Class MultiJacobianGenerator#
Defined in File JacobianGenerator.h
Inheritance Relationships#
Base Type#
public Karana::Core::LockingBase(Class LockingBase)
Class Documentation#
-
class MultiJacobianGenerator : public Karana::Core::LockingBase#
Class for the Jacobian generator for a list of Karana::Frame::FrameToFrame related frame pairs for a list of CoordData.
This class builds on the FrameToFrameJacobianGenerator class to support multiple Karana::Frame::FrameToFrame instances. This class is used by the ConstraintKinematicsSolver to compute Jacobians needed for the iterative constraint kinematics algorithms. See the
Jacobians section for more discussion on Jacobians.
CAUTION: When using the “analytical” computation approach (recommended), an important assumption is that the f2f paths contains only regular edges, i.e. one whose transform values that depend on coordinate values do so via regular subhinges and body coordinates, and not in come non-standard way (e.g., subtree CM frames, ephemeris frames). Since this Jacobian generator will not know about these non-standard dependencies, it will not be able to take them into account when computing the Jacobians, so use the “numerical” approach for these situations.
Public Functions
-
MultiJacobianGenerator(std::string_view name, const std::vector<kc::ks_ptr<kf::FrameToFrame>> &f2fs, kc::ks_ptr<CoordData> coord_data)#
Constructor.
- Parameters:
name – the name for the new object.
f2fs – the list of FrameToFrame’s for the Jacobian generator
coord_data – the CoordDatas to use for the Jacobian columns
-
~MultiJacobianGenerator()#
Destructor.
-
km::Mat jacobian(bool analytical)#
Return the Jacobian matrix.
Return the Jacobian matrix map from the free U velocity coordinate to the f2fs relative velocity.
- Parameters:
analytical – If true, use the analytical method, else numerical differencing
- Returns:
the Jacobian matrix
-
km::Mat jacobianDot()#
Method to compute the time derivative of the Jacobian matrix.
- Returns:
the time derivative of the Jacobian matrix
-
km::Mat poseGradient(bool analytical)#
Return the pose gradient matrix.
Return the gradient matrix map from the free Q configuration coordinates to the f2fs relative pose
- Parameters:
analytical – If true, use the analytical method, else numerical differencing
- Returns:
the pose gradient matrix
Public Static Functions
-
static kc::ks_ptr<MultiJacobianGenerator> create(std::string_view name, const std::vector<kc::ks_ptr<kf::FrameToFrame>> &f2fs, kc::ks_ptr<CoordData> coord_data)#
Factory method for creating a new MultiJacobianGenerator instance.
- Parameters:
name – the name for the new object.
f2fs – the list of FrameToFrame’s for the Jacobian generator
coord_data – the CoordDatas to use for the Jacobian columns
- Returns:
a new MultiJacobianGenerator instance
Protected Functions
-
void _discard(kc::ks_ptr<Base> &base) override#
Discard the provided MultiJacobianGenerator.
- Parameters:
base – - Base pointer to the MultiJacobianGenerator to discard.
Protected Attributes
-
std::vector<kc::ks_ptr<kf::FrameToFrame>> _f2fs#
the frame to frame instances for this multi-jacobian generator
-
std::unordered_map<kc::ks_ptr<kf::FrameToFrame>, kc::ks_ptr<FrameToFrameJacobianGenerator>> _jac_gen_map#
map of Jacobian generators for each frame to frame instance
-
MultiJacobianGenerator(std::string_view name, const std::vector<kc::ks_ptr<kf::FrameToFrame>> &f2fs, kc::ks_ptr<CoordData> coord_data)#