3 #include "sco/modeling.hpp"
5 #include "sco/sco_fwd.hpp"
7 #include "trajopt/common.hpp"
8 #include <openrave/openrave.h>
12 typedef BasicArray<Var> VarArray;
15 void makeTrajVariablesAndBounds(
int n_steps,
const RobotAndDOF& manip,
OptProb& prob_out, VarArray& vars_out);
19 virtual OpenRAVE::Transform operator()(
const VectorXd& x)
const = 0;
23 class FKPositionJacobian {
25 virtual Eigen::MatrixXd operator()(
const VectorXd& x)
const = 0;
26 virtual ~FKPositionJacobian() {}
32 OR::Transform pose_inv_;
33 ConfigurationPtr manip_;
34 OR::KinBody::LinkPtr link_;
36 pose_inv_(pose.inverse()),
39 VectorXd operator()(
const VectorXd& dof_vals)
const;
43 boost::shared_ptr<void> m_calc;
45 CartPoseErrorPlotter(boost::shared_ptr<void> calc,
const VarVector& vars) : m_calc(calc), m_vars(vars) {}
46 void Plot(
const DblVec& x, OR::EnvironmentBase& env, std::vector<OR::GraphHandlePtr>& handles);
51 ConfigurationPtr manip_;
52 KinBody::LinkPtr link_;
55 manip_(manip), link_(link), limit_(limit) {}
57 MatrixXd operator()(
const VectorXd& dof_vals)
const;
61 ConfigurationPtr manip_;
62 KinBody::LinkPtr link_;
65 manip_(manip), link_(link), limit_(limit) {}
67 VectorXd operator()(
const VectorXd& dof_vals)
const;
73 CartPoseCost(
const VarVector& vars,
const OR::Transform& pose, RobotAndDOFPtr manip, KinBody::LinkPtr link,
const VectorXd& coeffs);
78 CartPoseConstraint(
const VarVector& vars,
const OR::Transform& pose, RobotAndDOFPtr manip, KinBody::LinkPtr link,
const VectorXd& coeffs);
83 CartVelConstraint(
const VarVector& step0vars,
const VarVector& step1vars, RobotAndDOFPtr manip, KinBody::LinkPtr link,
double distlimit);