18 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR =
double>
22 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
30 typedef Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>
VectorXs;
31 typedef Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic>
MatrixXs;
36 std::function<
void(
const state_vector_t&, Vector3s&)> getPosition,
37 std::function<
void(
const state_vector_t&, Eigen::Matrix<SCALAR, 3, STATE_DIM>&)> getJacobian);
47 virtual Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>
evaluate(
const state_vector_t&
x,
48 const control_vector_t&
u,
51 virtual MatrixXs
jacobianState(
const state_vector_t&
x,
const control_vector_t&
u,
const SCALAR t)
override;
53 virtual MatrixXs
jacobianInput(
const state_vector_t&
x,
const control_vector_t&
u,
const SCALAR t)
override;
56 std::shared_ptr<ct::core::tpl::Ellipsoid<SCALAR>> obstacle_;
58 std::function<void(const core::StateVector<STATE_DIM, SCALAR>&, Vector3s&)> xFun_;
59 std::function<void(const core::StateVector<STATE_DIM, SCALAR>&, Eigen::Matrix<SCALAR, 3, STATE_DIM>&)> dXFun_;
62 Eigen::Matrix<SCALAR, 1, STATE_DIM> jac_;
Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > VectorXs
Definition: ObstacleConstraint.h:30
ct::core::ControlVector< control_dim > u
Definition: LoadFromFileTest.cpp:21
virtual MatrixXs jacobianState(const state_vector_t &x, const control_vector_t &u, const SCALAR t) override
Returns the constraint jacobian wrt state.
Definition: ObstacleConstraint-impl.h:63
Class for obstacle constraint.
Definition: ObstacleConstraint.h:19
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
core::ControlVector< CONTROL_DIM, SCALAR > control_vector_t
Definition: ObstacleConstraint.h:28
CppAD::AD< CppAD::cg::CG< double > > SCALAR
virtual ~ObstacleConstraint()
Definition: ObstacleConstraint-impl.h:27
core::StateVector< STATE_DIM, SCALAR > state_vector_t
Definition: ObstacleConstraint.h:27
ct::core::StateVector< state_dim > x
Definition: LoadFromFileTest.cpp:20
virtual Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > evaluate(const state_vector_t &x, const control_vector_t &u, const SCALAR t) override
The evaluation of the constraint violation. Note this method is SCALAR typed.
Definition: ObstacleConstraint-impl.h:50
ObstacleConstraint(std::shared_ptr< ct::core::tpl::Ellipsoid< SCALAR >> obstacle, std::function< void(const state_vector_t &, Vector3s &)> getPosition, std::function< void(const state_vector_t &, Eigen::Matrix< SCALAR, 3, STATE_DIM > &)> getJacobian)
Definition: ObstacleConstraint-impl.h:14
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef ct::core::tpl::TraitSelector< SCALAR >::Trait Trait
Definition: ObstacleConstraint.h:24
virtual MatrixXs jacobianInput(const state_vector_t &x, const control_vector_t &u, const SCALAR t) override
Returns the constraint jacobian wrt input.
Definition: ObstacleConstraint-impl.h:79
Eigen::Matrix< SCALAR, 3, 1 > Vector3s
Definition: ObstacleConstraint.h:33
virtual size_t getConstraintSize() const override
The evaluate method used for jit compilation in constraint container ad.
Definition: ObstacleConstraint-impl.h:44
ConstraintBase< STATE_DIM, CONTROL_DIM, SCALAR > Base
Definition: ObstacleConstraint.h:25
virtual ObstacleConstraint< STATE_DIM, CONTROL_DIM, SCALAR > * clone() const override
Creates a new instance of the object with same properties than original.
Definition: ObstacleConstraint-impl.h:32
Base class for the constraints used in this toolbox.
Definition: ConstraintBase.h:21
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > MatrixXs
Definition: ObstacleConstraint.h:31