13 using namespace mvsim;
19 setpoint_lin_speed(0),
20 setpoint_ang_speed(0),
56 std::vector<mrpt::math::TPoint2D>
58 m_veh.getWheelsVelocityLocal(
61 ASSERT_(desired_wheel_vels.size() == 4);
65 double vel_fl, vel_fr;
66 double desired_fl_steer_ang, desired_fr_steer_ang;
67 m_veh.computeFrontWheelAngles(
68 co.
steer_ang, desired_fl_steer_ang, desired_fr_steer_ang);
86 double act_vel_fl, act_vel_fr;
88 std::vector<mrpt::math::TPoint2D>
90 m_veh.getWheelsVelocityLocal(
91 odo_wheel_vels,
m_veh.getVelocityLocalOdoEstimate());
92 ASSERT_(odo_wheel_vels.size() == 4);
94 const double actual_fl_steer_ang =
96 const double actual_fr_steer_ang =
104 act_vel_fl = vel_w.
x;
111 act_vel_fr = vel_w.
x;
116 for (
int i = 0; i < 2; i++)
181 "] Teleop keys: w/s=incr/decr lin speed. " 182 "a/d=left/right steering. spacebar=stop.\n";
virtual void control_step(const DynamicsAckermann::TControllerInput &ci, DynamicsAckermann::TControllerOutput &co) override
std::map< std::string, TParamEntry > TParameterDefinitions
void parse_xmlnode_children_as_param(const rapidxml::xml_node< char > &xml_node, const TParameterDefinitions ¶ms, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="")
double max_torque
Maximum abs. value torque (for clamp) [Nm].
void composePoint(double lx, double ly, double &gx, double &gy) const
double setpoint_ang_speed
desired velocities (m/s) and (rad/s)
double KD
PID controller parameters.
virtual void teleop_interface(const TeleopInput &in, TeleopOutput &out) override
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
double setpoint_lin_speed
virtual void teleop_interface(const TeleopInput &in, TeleopOutput &out) override
virtual void load_config(const rapidxml::xml_node< char > &node) override
GLsizei const GLcharARB ** string
double max_out
For clamping (0=no clamp)
double compute(double err, double dt)
double steer_ang
Equivalent ackerman steering angle.
std::string append_gui_lines
static const char * class_name()
ControllerTwistFrontSteerPID(DynamicsAckermann &veh)