23 #ifndef SYSTEMS_KINEMATIC_BICYCLE_MODEL_H_ 24 #define SYSTEMS_KINEMATIC_BICYCLE_MODEL_H_ 59 SystemDynamicsInterface::Ptr
getInstance()
const override {
return std::make_shared<KinematicBicycleModelVelocityInput>(); }
69 assert(x.size() == f.size() &&
70 "KinematicBicycleModelVelocityInput::dynamics(): x and f are not of the same size, do not forget to pre-allocate f.");
72 double beta = std::atan(
_lr / (
_lf +
_lr) * std::tan(u[1]));
74 f[0] = u[0] * std::cos(x[2] + beta);
75 f[1] = u[0] * std::sin(x[2] + beta);
76 f[2] = u[0] * std::sin(beta) /
_lr;
83 twist.linear.x = u[0];
84 twist.linear.y = twist.linear.z = 0;
86 twist.angular.z = u[1];
87 twist.angular.x = twist.angular.y = 0;
110 #endif // SYSTEMS_KINEMATIC_BICYCLE_MODEL_H_
Specialization of RobotDynamicsInterface for mobile robots operating in SE2.
int getStateDimension() const override