15 #include <Eigen/Eigen> 17 #include <solver/interface/Solver.hpp> 31 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
86 void initializeTrajectoryKinematicVariables();
95 void addVariableToModel(
const solver::OptimizationVariable& opt_var, solver::Model& model, std::vector<solver::Var>& vars);
102 void saveSolution(solver::OptimizationVariable& opt_var);
125 Eigen::Vector3d quaternionToRotationVector(
const Eigen::Quaternion<double>& q)
const;
179 std::array<solver::OptimizationVariable, Problem::n_endeffs_>
eef_pos_, eef_vel_, eef_ang_vel_;
180 solver::OptimizationVariable jnt_q_, jnt_qd_, jnt_qdd_, total_qd_, total_qdd_, com_, comd_,
181 lmom_, amom_, base_position_, base_ang_vel_, slack_vars_;
185 solver::OptimizationVariable::OptMatrix mat_guess_, mat_lb_, mat_ub_;
187 std::array<Eigen::Vector3d, Problem::n_endeffs_> desired_eff_velocity_;
188 Eigen::Vector3d desired_com_velocity_, desired_lmom_velocity_, desired_amom_velocity_;
PlannerSetting * planner_setting_
Definition: KinematicsOptimizer.hpp:129
solver::LinExpr lin_cons_
Definition: KinematicsOptimizer.hpp:138
KinematicsInterface * kin_interface_
Definition: KinematicsOptimizer.hpp:170
void initializePostureKinematicVariables()
function to initialize optimization variables: type [continuous or binary], guess value [if any]...
Definition: KinematicsOptimizer.cpp:282
std::array< solver::OptimizationVariable, Problem::n_endeffs_ > eef_pos_
Definition: KinematicsOptimizer.hpp:179
KinematicsState * ini_state_
configuration of the robot, including center of mass position, linear and angular momenta...
Definition: KinematicsOptimizer.hpp:154
char variable_type_
Definition: KinematicsOptimizer.hpp:173
solver::OptimizationVariable::OptVector solution_
Definition: KinematicsOptimizer.hpp:184
This class is a container for all variables required to define a dynamic state: center of mass positi...
Definition: DynamicsState.hpp:29
solver::ExitCode exitcode_
Definition: KinematicsOptimizer.hpp:141
solver::Model model_
class that stores all information about the problem, interfaces between high level definition of the ...
Definition: KinematicsOptimizer.hpp:135
void addVariableToModel(const solver::OptimizationVariable &opt_var, solver::Model &model, std::vector< solver::Var > &vars)
function to add each variable to the Model and assign a unique identifier to it, to be used by the op...
Definition: KinematicsOptimizer.cpp:459
KinematicsSequence & kinematicsSequence()
this function gives access to the optimized motion plan
Definition: KinematicsOptimizer.hpp:59
Definition: KinematicsInterface.hpp:24
Definition: PlannerSetting.hpp:22
This class is a container for a sequence of dynamic states, for all time steps in the optimization...
Definition: DynamicsState.hpp:123
int size_
Definition: KinematicsOptimizer.hpp:176
void displayMotion(const DynamicsSequence &dyn_sequence)
Definition: KinematicsOptimizer.cpp:486
void updateEndeffectorTrajectories(DynamicsSequence &dyn_sequence)
function to update the tracking endeffector trajectories
void optimize(const DynamicsState &ini_state, ContactPlanInterface *contact_plan, DynamicsSequence &dyn_sequence, bool is_first_kinopt)
function to parse equations and objective into optimization problem and attempt to find a solution ...
Definition: KinematicsOptimizer.cpp:39
PlannerSetting & getSetting()
helper function to replay a motion
Definition: KinematicsOptimizer.hpp:78
This class is a container for a sequence of kinematic states.
Definition: KinematicsState.hpp:211
Definition: KinematicsOptimizer.hpp:28
void optimizeTrajectory(const DynamicsState &ini_state, DynamicsSequence &dyn_sequence)
function that implements iterative inverse kinematics to track momentum, end-effector motions...
Definition: KinematicsOptimizer.cpp:87
std::vector< solver::Var > vars_
c++ vector containing all problem variables defined by the user.
Definition: KinematicsOptimizer.hpp:147
KinematicsSequence kin_sequence_
kinematics sequence of kinematics states.
Definition: KinematicsOptimizer.hpp:167
KinematicsOptimizer()
Definition: KinematicsOptimizer.hpp:35
void saveSolution(solver::OptimizationVariable &opt_var)
functions that transfers optimal solution from model to helper class OptimizationVariable, and from helper class OptimizationVariable to dynamics sequence to be accessed by the user
Definition: KinematicsOptimizer.cpp:475
This class is a container for all variables required to define a kinematics state: joint posture...
Definition: KinematicsState.hpp:146
ContactPlanInterface * contact_plan_
helper class to store information about the contact plan, such as surfaces, position and orientation ...
Definition: KinematicsOptimizer.hpp:160
void initialize(PlannerSetting &planner_setting, KinematicsInterface *kin_interface)
function to initialize and configure the optimization
Definition: KinematicsOptimizer.cpp:25