robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
switching_constraint_data.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_SWITCHING_CONSTRAINT_DATA_HPP_
2#define ROBOTOC_SWITCHING_CONSTRAINT_DATA_HPP_
3
5
6
7namespace robotoc {
8
14public:
20
25
30
35
40
45
49 SwitchingConstraintData& operator=(SwitchingConstraintData&&) noexcept = default;
50
55 void setDimension(const int dims) {
56 assert(dims >= 0);
57 dims_ = dims;
58 }
59
60 Eigen::VectorXd q;
61
62 Eigen::VectorXd dq;
63
64 Eigen::VectorXd PqT_xi;
65
71 Eigen::Block<Eigen::MatrixXd> Pq() {
72 return Pq_full_.topLeftCorner(dims_, dimv_);
73 }
74
78 const Eigen::Block<const Eigen::MatrixXd> Pq() const {
79 return Pq_full_.topLeftCorner(dims_, dimv_);
80 }
81
86 int dims() const { return dims_; }
87
88private:
89 Eigen::MatrixXd Pq_full_;
90 int dimv_, dims_;
91};
92
93} // namespace robotoc
94
95#endif // ROBOTOC_SWITCHING_CONSTRAINT_DATA_HPP_
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
Data for the switching constraint.
Definition: switching_constraint_data.hpp:13
Eigen::VectorXd PqT_xi
Definition: switching_constraint_data.hpp:64
void setDimension(const int dims)
Sets the dimension of the switching constraint.
Definition: switching_constraint_data.hpp:55
Eigen::VectorXd q
Definition: switching_constraint_data.hpp:60
SwitchingConstraintData & operator=(const SwitchingConstraintData &)=default
Default copy assign operator.
int dims() const
Returns the dimension of the switching constraint.
Definition: switching_constraint_data.hpp:86
Eigen::Block< Eigen::MatrixXd > Pq()
Jacobian of the original contact position constraint w.r.t. q.
Definition: switching_constraint_data.hpp:71
Eigen::VectorXd dq
Definition: switching_constraint_data.hpp:62
SwitchingConstraintData(SwitchingConstraintData &&) noexcept=default
Default move constructor.
const Eigen::Block< const Eigen::MatrixXd > Pq() const
const version of SwitchingConstraintJacobian::Pq().
Definition: switching_constraint_data.hpp:78
~SwitchingConstraintData()=default
Default destructor.
SwitchingConstraintData()
Default constructor.
SwitchingConstraintData(const Robot &robot)
Constructs a switching constraint.
SwitchingConstraintData(const SwitchingConstraintData &)=default
Default copy constructor.
Definition: constraint_component_base.hpp:17