Drake
IKTrajectoryHelper Class Reference

This class is a helper for backend implementations of inverse kinematics trajectory planning. More...

#include <drake/multibody/ik_trajectory_helper.h>

Public Member Functions

 IKTrajectoryHelper (int nq, int nT, const double *t, int num_qfree, int num_qdotfree, const IKoptions &ikoptions, const double *dt, const double *dt_ratio)
 
double CalculateCost (const Eigen::MatrixXd &q, const Eigen::MatrixXd &q_nom, int qstart_idx, const Eigen::VectorXd &qdot0, const Eigen::VectorXd &qdotf, bool fix_initial_state, Eigen::MatrixXd *dJ_vec) const
 Calculate the cost given the current q, qdot0, and qdotf. More...
 
int nq () const
 
int nT () const
 
const doublet () const
 
int num_qfree () const
 
int num_qdotfree () const
 
const Eigen::MatrixXd & Q () const
 
const Eigen::MatrixXd & Qa () const
 
const Eigen::MatrixXd & Qv () const
 
const Eigen::MatrixXd & velocity_mat () const
 
const Eigen::MatrixXd & velocity_mat_qd0 () const
 
const Eigen::MatrixXd & velocity_mat_qdf () const
 
const Eigen::MatrixXd & accel_mat () const
 
const Eigen::MatrixXd & accel_mat_qd0 () const
 
const Eigen::MatrixXd & accel_mat_qdf () const
 
const std::vector< Eigen::VectorXd > & t_inbetween () const
 
const std::vector< double > & t_samples () const
 
const std::vector< Eigen::MatrixXd > & dq_inbetween_dqknot () const
 
const std::vector< Eigen::MatrixXd > & dq_inbetween_dqd0 () const
 
const std::vector< Eigen::MatrixXd > & dq_inbetween_dqdf () const
 

Detailed Description

This class is a helper for backend implementations of inverse kinematics trajectory planning.

It holds some general data about the problem being computed and is able to calculate some of the interesting parts of the optimization. It is intended to only hold/calculate data which is independent of the solver being used.

Constructor & Destructor Documentation

IKTrajectoryHelper ( int  nq,
int  nT,
const double t,
int  num_qfree,
int  num_qdotfree,
const IKoptions ikoptions,
const double dt,
const double dt_ratio 
)
Parameters
nq– number of positions of the body
nT– number of timesteps being planned
t– array of timestep values (of length nT)
num_qfree– number of timesteps for which position variables are free to change during optimization.
num_qdotfree– number of qdot states which are free to change during optimization (in practice, this will be 1 (final only) when the initial state is fixed, and 2 (initial and final) otherwise.
ikoptions– options passed to inverseKinTraj
dt– array of deltas between timestamps (length nT - 1)
dt_ratio– ratio of consecutive values in dt (length nT - 2)

Here is the call graph for this function:

Member Function Documentation

const Eigen::MatrixXd& accel_mat ( ) const
inline
const Eigen::MatrixXd& accel_mat_qd0 ( ) const
inline
const Eigen::MatrixXd& accel_mat_qdf ( ) const
inline
double CalculateCost ( const Eigen::MatrixXd &  q,
const Eigen::MatrixXd &  q_nom,
int  qstart_idx,
const Eigen::VectorXd &  qdot0,
const Eigen::VectorXd &  qdotf,
bool  fix_initial_state,
Eigen::MatrixXd *  dJ_vec 
) const

Calculate the cost given the current q, qdot0, and qdotf.

Returns
cost
Parameters
q– Current position estimates
q_nom– Estimates for nominal postures
qstart_idx– offset into q to start considering in cost calculations (usually 0 if the initial state is free, and 1 otherwise)
qdot0– current estimate of qdot at timestep 0
qdotf– current estimate of qdot at final timestep
fix_initial_state– true if the initial state is fixed
[out]dJ_vecMatrix to be filled in with the current gradients.
const std::vector<Eigen::MatrixXd>& dq_inbetween_dqd0 ( ) const
inline
const std::vector<Eigen::MatrixXd>& dq_inbetween_dqdf ( ) const
inline
const std::vector<Eigen::MatrixXd>& dq_inbetween_dqknot ( ) const
inline
int nq ( ) const
inline

Here is the caller graph for this function:

int nT ( ) const
inline
int num_qdotfree ( ) const
inline
int num_qfree ( ) const
inline
const Eigen::MatrixXd& Q ( ) const
inline
const Eigen::MatrixXd& Qa ( ) const
inline
const Eigen::MatrixXd& Qv ( ) const
inline
const double* t ( ) const
inline
const std::vector<Eigen::VectorXd>& t_inbetween ( ) const
inline
const std::vector<double>& t_samples ( ) const
inline
const Eigen::MatrixXd& velocity_mat ( ) const
inline
const Eigen::MatrixXd& velocity_mat_qd0 ( ) const
inline
const Eigen::MatrixXd& velocity_mat_qdf ( ) const
inline

The documentation for this class was generated from the following files: