23 #ifndef SYSTEMS_SIMPLE_CAR_H_
24 #define SYSTEMS_SIMPLE_CAR_H_
52 class SimpleCarModel :
public BaseRobotSE2
62 SystemDynamicsInterface::Ptr
getInstance()
const override {
return std::make_shared<SimpleCarModel>(); }
72 assert(
x.size() ==
f.size() &&
"SimpleCarModel::dynamics(): x and f are not of the same size, do not forget to pre-allocate f.");
74 f[0] = u[0] * std::cos(x[2]);
75 f[1] = u[0] * std::sin(x[2]);
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;
128 SystemDynamicsInterface::Ptr
getInstance()
const override {
return std::make_shared<SimpleCarFrontWheelDrivingModel>(); }
135 assert(
x.size() ==
f.size() &&
136 "SimpleCarFrontWheelDrivingModel::dynamics(): x and f are not of the same size, do not forget to pre-allocate f.");
138 f[0] = u[0] * std::cos(x[2]);
139 f[1] = u[0] * std::sin(x[2]);
146 #endif // SYSTEMS_SIMPLE_CAR_H_