14 if (curr_vel - prev_vel > limit)
16 const double scale = (limit - prev_vel) / curr_vel;
23 else if (curr_vel - prev_vel < -limit)
25 const double scale = (-limit + prev_vel) / prev_vel;
45 const double sint = sin(turret_pos);
46 const double cost = cos(turret_pos);
54 const double output_m1 = (true_command.
lin_x_vel * (-b_sin - a_cos) + true_command.
lin_y_vel * (b_cos - a_sin)) * wheel_distance_inv;
55 const double output_m2 = (true_command.
lin_x_vel * (-b_sin + a_cos) + true_command.
lin_y_vel * (b_cos + a_sin)) * wheel_distance_inv;
58 const double output_mt = (-true_command.
lin_x_vel * cost - true_command.
lin_y_vel * sint) * wheel_distance_inv - true_command.
ang_z_vel;
79 .motor_left_vel = scale * output_m1 / params.
wheel_radius,
80 .motor_right_vel = scale * output_m2 / params.
wheel_radius,
81 .motor_turret_vel = scale * output_mt,
87 return o <<
"HolonomicParams {" << std::endl
88 <<
" wheel_distance: " << v.
wheel_distance <<
" meters" << std::endl
89 <<
" wheel_radius: " << v.
wheel_radius <<
" meters" << std::endl
98 return o <<
"HolonomicCommand {" << std::endl
99 <<
" Linear X: " << v.
lin_x_vel <<
" m/s" << std::endl
100 <<
" Linear Y: " << v.
lin_y_vel <<
" m/s" << std::endl
101 <<
" Angular Z: " << v.
ang_z_vel <<
" rad/s" << std::endl
107 return o <<
"DiffDriveCommand {" << std::endl