2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Revision : $Id: trajectory_manager.c,v 1.4.4.17 2009-05-18 12:28:36 zer0 Exp $
22 /* Trajectory Manager v3 - zer0 - for Eurobot 2010 */
29 #include <aversive/error.h>
30 #include <scheduler.h>
33 #include <position_manager.h>
34 #include <robot_system.h>
35 #include <control_system_manager.h>
38 #include <trajectory_manager.h>
39 #include "trajectory_manager_utils.h"
40 #include "trajectory_manager_core.h"
42 /************ SIMPLE TRAJS, NO EVENT */
49 static uint8_t evt_debug_cpt = 0;
50 #define EVT_DEBUG(args...) do { \
51 if (((evt_debug_cpt ++) & 0x07) == 0) { \
58 * update angle and/or distance
59 * this function is not called directly by the user
60 * traj : pointer to the trajectory structure
61 * d_mm : distance in mm
62 * a_rad : angle in radian
63 * flags : what to update (UPDATE_A, UPDATE_D)
65 void __trajectory_goto_d_a_rel(struct trajectory *traj, double d_mm,
66 double a_rad, uint8_t state, uint8_t flags)
68 int32_t a_consign, d_consign;
70 DEBUG(E_TRAJECTORY, "Goto DA/RS rel to d=%f a_rad=%f", d_mm, a_rad);
73 if (flags & UPDATE_A) {
74 if (flags & RESET_A) {
78 a_consign = (int32_t)(a_rad * (traj->position->phys.distance_imp_per_mm) *
79 (traj->position->phys.track_mm) / 2);
81 a_consign += rs_get_angle(traj->robot);
82 traj->target.pol.angle = a_consign;
83 cs_set_consign(traj->csm_angle, a_consign);
85 if (flags & UPDATE_D) {
86 if (flags & RESET_D) {
90 d_consign = (int32_t)((d_mm) * (traj->position->phys.distance_imp_per_mm));
92 d_consign += rs_get_distance(traj->robot);
93 traj->target.pol.distance = d_consign;
94 cs_set_consign(traj->csm_distance, d_consign);
98 /** go straight forward (d is in mm) */
99 void trajectory_d_rel(struct trajectory *traj, double d_mm)
101 __trajectory_goto_d_a_rel(traj, d_mm, 0, RUNNING_D,
102 UPDATE_D | UPDATE_A | RESET_A);
105 /** update distance consign without changing angle consign */
106 void trajectory_only_d_rel(struct trajectory *traj, double d_mm)
108 __trajectory_goto_d_a_rel(traj, d_mm, 0, RUNNING_D, UPDATE_D);
111 /** turn by 'a' degrees */
112 void trajectory_a_rel(struct trajectory *traj, double a_deg_rel)
114 __trajectory_goto_d_a_rel(traj, 0, RAD(a_deg_rel), RUNNING_A,
115 UPDATE_A | UPDATE_D | RESET_D);
118 /** turn by 'a' degrees */
119 void trajectory_a_abs(struct trajectory *traj, double a_deg_abs)
121 double posa = position_get_a_rad_double(traj->position);
124 a = RAD(a_deg_abs) - posa;
126 __trajectory_goto_d_a_rel(traj, 0, a, RUNNING_A,
127 UPDATE_A | UPDATE_D | RESET_D);
130 /** turn the robot until the point x,y is in front of us */
131 void trajectory_turnto_xy(struct trajectory *traj, double x_abs_mm, double y_abs_mm)
133 double posx = position_get_x_double(traj->position);
134 double posy = position_get_y_double(traj->position);
135 double posa = position_get_a_rad_double(traj->position);
137 DEBUG(E_TRAJECTORY, "Goto Turn To xy %f %f", x_abs_mm, y_abs_mm);
138 __trajectory_goto_d_a_rel(traj, 0,
139 simple_modulo_2pi(atan2(y_abs_mm - posy, x_abs_mm - posx) - posa),
141 UPDATE_A | UPDATE_D | RESET_D);
144 /** turn the robot until the point x,y is behind us */
145 void trajectory_turnto_xy_behind(struct trajectory *traj, double x_abs_mm, double y_abs_mm)
147 double posx = position_get_x_double(traj->position);
148 double posy = position_get_y_double(traj->position);
149 double posa = position_get_a_rad_double(traj->position);
151 DEBUG(E_TRAJECTORY, "Goto Turn To xy %f %f", x_abs_mm, y_abs_mm);
152 __trajectory_goto_d_a_rel(traj, 0,
153 modulo_2pi(atan2(y_abs_mm - posy, x_abs_mm - posx) - posa + M_PI),
155 UPDATE_A | UPDATE_D | RESET_D);
158 /** update angle consign without changing distance consign */
159 void trajectory_only_a_rel(struct trajectory *traj, double a_deg)
161 __trajectory_goto_d_a_rel(traj, 0, RAD(a_deg), RUNNING_A,
165 /** update angle consign without changing distance consign */
166 void trajectory_only_a_abs(struct trajectory *traj, double a_deg_abs)
168 double posa = position_get_a_rad_double(traj->position);
171 a = RAD(a_deg_abs) - posa;
173 __trajectory_goto_d_a_rel(traj, 0, a, RUNNING_A, UPDATE_A);
176 /** turn by 'a' degrees */
177 void trajectory_d_a_rel(struct trajectory *traj, double d_mm, double a_deg)
179 __trajectory_goto_d_a_rel(traj, d_mm, RAD(a_deg),
180 RUNNING_AD, UPDATE_A | UPDATE_D);
183 /** set relative angle and distance consign to 0 */
184 void trajectory_stop(struct trajectory *traj)
186 __trajectory_goto_d_a_rel(traj, 0, 0, READY,
187 UPDATE_A | UPDATE_D | RESET_D | RESET_A);
190 /** set relative angle and distance consign to 0, and break any
191 * deceleration ramp in quadramp filter */
192 void trajectory_hardstop(struct trajectory *traj)
194 struct quadramp_filter *q_d, *q_a;
196 q_d = traj->csm_distance->consign_filter_params;
197 q_a = traj->csm_angle->consign_filter_params;
198 __trajectory_goto_d_a_rel(traj, 0, 0, READY,
199 UPDATE_A | UPDATE_D | RESET_D | RESET_A);
201 q_d->previous_var = 0;
202 q_d->previous_out = rs_get_distance(traj->robot);
203 q_a->previous_var = 0;
204 q_a->previous_out = rs_get_angle(traj->robot);
208 /************ GOTO XY, USE EVENTS */
210 /** goto a x,y point, using a trajectory event */
211 void trajectory_goto_xy_abs(struct trajectory *traj, double x, double y)
213 DEBUG(E_TRAJECTORY, "Goto XY");
215 traj->target.cart.x = x;
216 traj->target.cart.y = y;
217 traj->state = RUNNING_XY_START;
218 trajectory_manager_event(traj);
219 schedule_event(traj);
222 /** go forward to a x,y point, using a trajectory event */
223 void trajectory_goto_forward_xy_abs(struct trajectory *traj, double x, double y)
225 DEBUG(E_TRAJECTORY, "Goto XY_F");
227 traj->target.cart.x = x;
228 traj->target.cart.y = y;
229 traj->state = RUNNING_XY_F_START;
230 trajectory_manager_event(traj);
231 schedule_event(traj);
234 /** go backward to a x,y point, using a trajectory event */
235 void trajectory_goto_backward_xy_abs(struct trajectory *traj, double x, double y)
237 DEBUG(E_TRAJECTORY, "Goto XY_B");
239 traj->target.cart.x = x;
240 traj->target.cart.y = y;
241 traj->state = RUNNING_XY_B_START;
242 trajectory_manager_event(traj);
243 schedule_event(traj);
246 /** go forward to a d,a point, using a trajectory event */
247 void trajectory_goto_d_a_rel(struct trajectory *traj, double d, double a)
250 double x = position_get_x_double(traj->position);
251 double y = position_get_y_double(traj->position);
253 DEBUG(E_TRAJECTORY, "Goto DA rel");
257 p.theta = RAD(a) + position_get_a_rad_double(traj->position);
258 vect2_pol2cart(&p, &traj->target.cart);
259 traj->target.cart.x += x;
260 traj->target.cart.y += y;
262 traj->state = RUNNING_XY_START;
263 trajectory_manager_event(traj);
264 schedule_event(traj);
267 /** go forward to a x,y relative point, using a trajectory event */
268 void trajectory_goto_xy_rel(struct trajectory *traj, double x_rel_mm, double y_rel_mm)
272 double x = position_get_x_double(traj->position);
273 double y = position_get_y_double(traj->position);
275 DEBUG(E_TRAJECTORY, "Goto XY rel");
281 vect2_cart2pol(&c, &p);
282 p.theta += position_get_a_rad_double(traj->position);;
283 vect2_pol2cart(&p, &traj->target.cart);
285 traj->target.cart.x += x;
286 traj->target.cart.y += y;
288 traj->state = RUNNING_XY_START;
289 trajectory_manager_event(traj);
290 schedule_event(traj);
293 /************ FUNCS FOR GETTING TRAJ STATE */
295 /** return true if the position consign is equal to the filtered
296 * position consign (after quadramp filter), for angle and
298 uint8_t trajectory_finished(struct trajectory *traj)
300 return cs_get_consign(traj->csm_angle) == cs_get_filtered_consign(traj->csm_angle) &&
301 cs_get_consign(traj->csm_distance) == cs_get_filtered_consign(traj->csm_distance) ;
304 /** return true if traj is nearly finished */
305 uint8_t trajectory_in_window(struct trajectory *traj, double d_win, double a_win_rad)
307 switch(traj->state) {
309 case RUNNING_XY_ANGLE_OK:
310 case RUNNING_XY_F_ANGLE_OK:
311 case RUNNING_XY_B_ANGLE_OK:
312 /* if robot coordinates are near the x,y target */
313 return is_robot_in_xy_window(traj, d_win);
316 return is_robot_in_angle_window(traj, a_win_rad);
319 return is_robot_in_dist_window(traj, d_win);
322 return is_robot_in_dist_window(traj, d_win) &&
323 is_robot_in_angle_window(traj, a_win_rad);
325 case RUNNING_XY_START:
326 case RUNNING_XY_F_START:
327 case RUNNING_XY_B_START:
328 case RUNNING_XY_ANGLE:
329 case RUNNING_XY_F_ANGLE:
330 case RUNNING_XY_B_ANGLE:
336 /*********** *TRAJECTORY EVENT FUNC */
338 /** event called for xy trajectories */
339 void trajectory_manager_xy_event(struct trajectory *traj)
342 double x = position_get_x_double(traj->position);
343 double y = position_get_y_double(traj->position);
344 double a = position_get_a_rad_double(traj->position);
345 int32_t d_consign=0, a_consign=0;
347 /* These vectors contain target position of the robot in
348 * its own coordinates */
349 vect2_cart v2cart_pos;
350 vect2_pol v2pol_target;
352 /* step 1 : process new commands to quadramps */
354 switch (traj->state) {
355 case RUNNING_XY_START:
356 case RUNNING_XY_ANGLE:
357 case RUNNING_XY_ANGLE_OK:
358 case RUNNING_XY_F_START:
359 case RUNNING_XY_F_ANGLE:
360 case RUNNING_XY_F_ANGLE_OK:
361 case RUNNING_XY_B_START:
362 case RUNNING_XY_B_ANGLE:
363 case RUNNING_XY_B_ANGLE_OK:
365 /* process the command vector from current position to
366 * absolute target. */
367 v2cart_pos.x = traj->target.cart.x - x;
368 v2cart_pos.y = traj->target.cart.y - y;
369 vect2_cart2pol(&v2cart_pos, &v2pol_target);
370 v2pol_target.theta = simple_modulo_2pi(v2pol_target.theta - a);
372 /* asked to go backwards */
373 if (traj->state >= RUNNING_XY_B_START &&
374 traj->state <= RUNNING_XY_B_ANGLE_OK ) {
375 v2pol_target.r = -v2pol_target.r;
376 v2pol_target.theta = simple_modulo_2pi(v2pol_target.theta + M_PI);
379 /* if we don't need to go forward */
380 if (traj->state >= RUNNING_XY_START &&
381 traj->state <= RUNNING_XY_ANGLE_OK ) {
382 /* If the target is behind the robot, we need to go
383 * backwards. 0.52 instead of 0.5 because we prefer to
385 if ((v2pol_target.theta > 0.52*M_PI) ||
386 (v2pol_target.theta < -0.52*M_PI ) ) {
387 v2pol_target.r = -v2pol_target.r;
388 v2pol_target.theta = simple_modulo_2pi(v2pol_target.theta + M_PI);
394 /* If the robot is correctly oriented to start moving in distance */
395 /* here limit dist speed depending on v2pol_target.theta */
396 if (ABS(v2pol_target.theta) > traj->a_start_rad) // || ABS(v2pol_target.r) < traj->d_win)
397 set_quadramp_speed(traj, 0, traj->a_speed);
399 coef = (traj->a_start_rad - ABS(v2pol_target.theta)) / traj->a_start_rad;
400 set_quadramp_speed(traj, traj->d_speed * coef, traj->a_speed);
403 d_consign = (int32_t)(v2pol_target.r * (traj->position->phys.distance_imp_per_mm));
404 d_consign += rs_get_distance(traj->robot);
407 /* XXX here we specify 2.2 instead of 2.0 to avoid oscillations */
408 a_consign = (int32_t)(v2pol_target.theta *
409 (traj->position->phys.distance_imp_per_mm) *
410 (traj->position->phys.track_mm) / 2.2);
411 a_consign += rs_get_angle(traj->robot);
416 /* hmmm quite odd, delete the event */
417 DEBUG(E_TRAJECTORY, "GNI ???");
423 /* step 2 : update state, or delete event if we reached the
426 /* XXX if target is our pos !! */
428 switch (traj->state) {
429 case RUNNING_XY_START:
430 case RUNNING_XY_F_START:
431 case RUNNING_XY_B_START:
433 DEBUG(E_TRAJECTORY, "-> ANGLE");
437 case RUNNING_XY_ANGLE:
438 case RUNNING_XY_F_ANGLE:
439 case RUNNING_XY_B_ANGLE: {
440 struct quadramp_filter *q_a;
441 q_a = traj->csm_angle->consign_filter_params;
442 /* if d_speed is not 0, we are in start_angle_win */
443 if (get_quadramp_distance_speed(traj)) {
444 if (is_robot_in_xy_window(traj, traj->d_win)) {
447 /* ANGLE -> ANGLE_OK */
449 DEBUG(E_TRAJECTORY, "-> ANGLE_OK");
454 case RUNNING_XY_ANGLE_OK:
455 case RUNNING_XY_F_ANGLE_OK:
456 case RUNNING_XY_B_ANGLE_OK:
457 /* If we reached the destination */
458 if (is_robot_in_xy_window(traj, traj->d_win)) {
467 /* step 3 : send the processed commands to cs */
469 EVT_DEBUG(E_TRAJECTORY,"EVENT XY d_cur=%" PRIi32 ", d_consign=%" PRIi32 ", d_speed=%" PRIi32 ", "
470 "a_cur=%" PRIi32 ", a_consign=%" PRIi32 ", a_speed=%" PRIi32,
471 rs_get_distance(traj->robot), d_consign, get_quadramp_distance_speed(traj),
472 rs_get_angle(traj->robot), a_consign, get_quadramp_angle_speed(traj));
474 cs_set_consign(traj->csm_angle, a_consign);
475 cs_set_consign(traj->csm_distance, d_consign);
478 /* trajectory event for circles */
480 void trajectory_manager_circle_event(struct trajectory *traj)
483 double x = position_get_x_double(traj->position);
484 double y = position_get_y_double(traj->position);
485 double a = position_get_a_rad_double(traj->position);
486 int32_t d_consign = 0, a_consign = 0;
487 double angle_to_center_rad;
488 static int32_t d_prev, a_prev;
489 int32_t d_speed, a_speed;
490 int32_t d_pos, a_pos;
492 d_pos = rs_get_distance(traj->robot);
493 a_pos = rs_get_angle(traj->robot);
494 d_speed = d_pos - d_prev;
495 a_speed = a_pos - a_prev;
499 /* These vectors contain target position of the robot in
500 * its own coordinates */
501 vect2_cart v2cart_pos;
502 vect2_pol v2pol_target;
504 int32_t delta_d, delta_a;
505 double coef_deriv = traj->circle_coef;
508 struct quadramp_filter * q_d, * q_a;
510 q_d = traj->csm_distance->consign_filter_params;
511 q_a = traj->csm_angle->consign_filter_params;
513 delta_a = a_speed;//q_a->previous_var;
514 delta_d = d_speed;//q_d->previous_var;
516 delta_a = q_a->previous_var;
517 delta_d = q_d->previous_var;
519 /* step 1 : process new commands to quadramps */
521 /* process the command vector from current position to the
522 * center of the circle. */
523 v2cart_pos.x = traj->target.circle.center.x - x;
524 v2cart_pos.y = traj->target.circle.center.y - y;
525 vect2_cart2pol(&v2cart_pos, &v2pol_target);
526 v2pol_target.theta = simple_modulo_2pi(v2pol_target.theta - a);
529 /* pas trop mal, mais oscille */
530 //new_radius = traj->target.circle.radius - delta_a * delta_d * coef_deriv;
531 if (v2pol_target.r > traj->target.circle.radius/2)
532 new_radius = traj->target.circle.radius - delta_a * delta_d * coef_deriv * traj->target.circle.radius / v2pol_target.r;
534 new_radius = traj->target.circle.radius - delta_a * delta_d * coef_deriv ;
537 //new_radius = traj->target.circle.radius - traj->target.circle.radius * delta_a * delta_a * coef_deriv;
540 //new_radius = traj->target.circle.radius - traj->target.circle.radius * delta_a * coef_deriv;
543 /* wanted direction of center of circle:
544 * if we are far, go in the center direction,
545 * if we are at radius, we want to see the center at 90°
546 * if we are nearer than radius, angle to center is > 90° */
547 if (v2pol_target.r > new_radius) {
548 angle_to_center_rad = new_radius / v2pol_target.r;
549 angle_to_center_rad *= (M_PI / 2);
552 angle_to_center_rad = 1. - (v2pol_target.r /
554 angle_to_center_rad *= M_PI;
557 /* XXX check flags */
558 v2pol_target.theta -= angle_to_center_rad;
560 /* If the robot is correctly oriented to start moving in distance */
561 /* here limit dist speed depending on v2pol_target.theta */
562 if (ABS(v2pol_target.theta) > traj->a_start_rad)
563 set_quadramp_speed(traj, 0, traj->a_speed);
565 coef = (traj->a_start_rad - ABS(v2pol_target.theta)) / traj->a_start_rad;
566 set_quadramp_speed(traj, traj->d_speed * coef, traj->a_speed);
569 /* XXX check flags */
570 d_consign = 40000 + rs_get_distance(traj->robot);
573 a_consign = (int32_t)(v2pol_target.theta *
574 (traj->position->phys.distance_imp_per_mm) *
575 (traj->position->phys.track_mm) / 2.0);
576 a_consign += rs_get_angle(traj->robot);
581 if (d_speed > v2pol_target.r)
582 d_speed = v2pol_target.r/2;
584 d_speed = v2pol_target.r/2;
585 new_angle = (d_speed * d_speed);
586 new_angle += (v2pol_target.r * v2pol_target.r);
587 new_angle -= (traj->target.circle.radius * traj->target.circle.radius);
588 new_angle /= 2 * d_speed * v2pol_target.r;
590 printf("robot %f %f dspeed %d polr %f pola %f cnewa %f\n",
593 v2pol_target.r, v2pol_target.theta * 180 / M_PI,
603 new_angle = acos(new_angle);
604 printf("new_a: %f\n", new_angle*180/M_PI);
606 new_angle = v2pol_target.theta - new_angle;
607 a_consign = (int32_t)(new_angle *
608 (traj->position->phys.distance_imp_per_mm) *
609 (traj->position->phys.track_mm) / 2.0);
610 a_consign += rs_get_angle(traj->robot);
613 /* XXX check flags */
614 d_consign = 40000 + rs_get_distance(traj->robot);
625 /* step 2 : update state, or delete event if we reached the
628 /* output angle -> delete event */
629 if (a_consign >= traj->target.circle.dest_angle) {
630 a_consign = traj->target.circle.dest_angle;
634 /* step 3 : send the processed commands to cs */
636 EVT_DEBUG(E_TRAJECTORY,"EVENT CIRCLE d_cur=%" PRIi32 ", d_consign=%" PRIi32
637 ", d_speed=%" PRIi32 ", a_cur=%" PRIi32 ", a_consign=%" PRIi32
638 ", a_speed=%" PRIi32 "radius = %f",
639 rs_get_distance(traj->robot), d_consign, get_quadramp_distance_speed(traj),
640 rs_get_angle(traj->robot), a_consign, get_quadramp_angle_speed(traj),
643 cs_set_consign(traj->csm_angle, a_consign);
644 cs_set_consign(traj->csm_distance, d_consign);
647 /* trajectory event */
648 void trajectory_manager_event(void * param)
650 struct trajectory *traj = (struct trajectory *)param;
652 switch (traj->state) {
653 case RUNNING_XY_START:
654 case RUNNING_XY_ANGLE:
655 case RUNNING_XY_ANGLE_OK:
656 case RUNNING_XY_F_START:
657 case RUNNING_XY_F_ANGLE:
658 case RUNNING_XY_F_ANGLE_OK:
659 case RUNNING_XY_B_START:
660 case RUNNING_XY_B_ANGLE:
661 case RUNNING_XY_B_ANGLE_OK:
662 trajectory_manager_xy_event(traj);
666 trajectory_manager_circle_event(traj);
674 /*********** *CIRCLE */
676 /* make the robot orbiting around (x,y) on a circle whose radius is
677 * radius_mm, and exit when relative destination angle is reached. The
678 * flags set if we go forward or backwards, and CW/CCW. */
679 void trajectory_circle_rel(struct trajectory *traj,
689 traj->target.circle.center.x = x;
690 traj->target.circle.center.y = y;
691 traj->target.circle.radius = radius_mm;
692 traj->target.circle.flags = flags;
694 /* convert in steps */
695 dst_angle = RAD(rel_a_deg) *
696 (traj->position->phys.distance_imp_per_mm) *
697 (traj->position->phys.track_mm) / 2.0;
699 traj->target.circle.dest_angle = rs_get_angle(traj->robot);
700 traj->target.circle.dest_angle += dst_angle;
702 DEBUG(E_TRAJECTORY, "Circle rel (x,y)=%2.2f,%2.2f r=%2.2f flags=%x dst_angle=%"PRIi32"",
703 x, y, radius_mm, flags, traj->target.circle.dest_angle);
705 traj->state = RUNNING_CIRCLE;
706 trajectory_manager_event(traj);
707 schedule_event(traj);
711 * Compute the fastest distance and angle speeds matching the radius
712 * from current traj_speed
714 /* static */void circle_get_da_speed_from_radius(struct trajectory *traj,
719 /* speed_d = coef * speed_a */
721 double speed_d2, speed_a2;
723 coef = 2. * radius_mm / traj->position->phys.track_mm;
725 speed_d2 = traj->a_speed * coef;
726 if (speed_d2 < traj->d_speed) {
728 *speed_a = traj->a_speed;
731 speed_a2 = traj->d_speed / coef;
732 *speed_d = traj->d_speed;
737 /* return the distance in millimeters that corresponds to an angle in
738 * degree and a radius in mm */
739 /* static */double circle_get_dist_from_degrees(double radius_mm, double a_deg)
741 double a_rad = RAD(a_deg);
742 return a_rad * radius_mm;
746 * Start a circle of specified radius around the specified center
747 * (relative with d,a). The distance is specified in mm.
749 void trajectory_circle(struct trajectory *traj,
750 double center_d_mm, double center_a_rad,
751 double radius_mm, double dist_mm)
755 /* DEBUG(E_TRAJECTORY, "CIRCLE to d=%f a_rad=%f", center_d_mm, */
757 /* delete_event(traj); */
758 /* traj->state = RUNNING_CIRCLE; */
764 * Start a circle of specified radius around the specified center
765 * (absolute). The distance is specified in mm.
767 void trajectory_circle_abs_dist_mm(struct trajectory *traj,
768 double x_rel_mm, double y_rel_mm,
769 double radius_mm, double dist_mm)
774 * Start a circle of specified radius around the specified center
775 * (absolute). The distance is specified in degrees.
777 void trajectory_circle_abs_dist_deg(struct trajectory *traj,
778 double x_rel_mm, double y_rel_mm,
779 double radius_mm, double dist_degrees)