8 #ifndef PROJECT_DYNAMICSSIMULATOR_H 9 #define PROJECT_DYNAMICSSIMULATOR_H 21 #include <eigen3/Eigen/Dense> 26 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
42 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
45 bool useSpringDamper =
false);
46 void step(T dt,
const DVec<T>& tau, T kp,
63 _model.setState(state);
88 _model._externalForces = forces;
99 _contact_constr->AddCollision(
105 const Vec3<T>& left_corner_loc,
107 _contact_constr->AddCollision(
115 return _contact_constr->getGCForce(idx);
121 void updateCollisions(T dt, T kp, T kd);
133 #endif // PROJECT_DYNAMICSSIMULATOR_H vector< CollisionPlane< T > > _collisionPlanes
void forwardKinematics()
Do forward kinematics for feet.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Vec3< T > position
typename Eigen::Matrix< T, 3, 3 > Mat3
typename Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > DMat
typename Eigen::Matrix< T, 3, 1 > Vec3
FBModelStateDerivative< T > _dstate
const Vec3< T > & getContactForce(size_t idx)
void setState(const FBModelState< T > &state)
Collision logic for a box.
typename Eigen::Matrix< T, 6, 1 > SVec
void addCollisionMesh(T mu, T rest, T grid_size, const Vec3< T > &left_corner_loc, const DMat< T > &height_map)
const size_t & getTotalNumGC()
void setAllExternalForces(const vectorAligned< SVec< T >> &forces)
void setHoming(const RobotHomingInfo< T > &homing)
RobotHomingInfo< T > _homing
Collision logic for an infinite plane.
ContactConstraint< T > * _contact_constr
void runABA(const DVec< T > &tau)
Simulate forward one step.
const FBModelState< T > & getState() const
void addCollisionPlane(T mu, T rest, T height)
typename std::vector< T, Eigen::aligned_allocator< T >> vectorAligned
SVec< T > _lastBodyVelocity
const FBModelStateDerivative< T > & getDState() const
Collision logic for a mesh.
typename Eigen::Matrix< T, Eigen::Dynamic, 1 > DVec
FloatingBaseModel< T > & _model
FBModelState< T > _state
Update ground collision list.
const FloatingBaseModel< T > & getModel()
Implementation of Rigid Body Floating Base model data structure.
void addCollisionBox(T mu, T rest, T depth, T width, T height, const Vec3< T > &pos, const Mat3< T > &ori)
Utility functions for manipulating spatial quantities.