Go to the documentation of this file.
34 #include <sys/types.h>
39 #endif // HAVE_CONFIG_H
66 double d, q, r, ang, rad;
70 ang = atan2((odm->
y -
spur->y), (odm->
x -
spur->x));
74 d = fabs(
spur->radius) - r;
77 if (r < fabs(
spur->radius))
114 if (wref > fabs(w_max))
116 else if (wref < -fabs(w_max))
124 w =
spur->wref_smooth -
140 theta = odm->
theta +
spur->wref_smooth * dt;
159 theta = odm->
theta +
spur->wref_smooth * dt;
191 x = odm->
x +
spur->vref_smooth * cos(odm->
theta) * dt;
192 y = odm->
y +
spur->vref_smooth * sin(odm->
theta) * dt;
235 v = sqrt(2 * acc * fabs(_err));
238 vel_ref_next = -
SIGN(_err) * fabs(vel_max);
242 vel_ref_next = -
SIGN(_err) * v;
261 v = sqrt(vel_end * vel_end + 2 * acc * fabs(_err));
263 if (fabs(vel_max) < fabs(vel_end))
265 if (fabs(err) < (vel_end * vel_end - vel_max * vel_max) / (2.0 * acc))
266 _vel_max = fabs(vel_end);
double timeoptimal_servo(double err, double vel_max, double vel, double acc)
double circle_follow(OdometryPtr odm, SpurUserParamsPtr spur)
double trans_q(double theta)
double dist_pos(OdometryPtr odm, SpurUserParamsPtr spur)
double line_follow(OdometryPtr odm, SpurUserParamsPtr spur)
int stop_line(OdometryPtr odm, SpurUserParamsPtr spur)
double spin(OdometryPtr odm, SpurUserParamsPtr spur)
double regurator(double d, double q, double r, double v_max, double w_max, SpurUserParamsPtr spur)
double timeoptimal_servo2(double err, double vel_max, double vel, double acc, double vel_end)
double p(YPSpur_param id, enum motor_id motor)
double orient(OdometryPtr odm, SpurUserParamsPtr spur)
yp-spur
Author(s):
autogenerated on Fri Oct 20 2023 03:02:42