/Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/Clothoids/Dubins3p.hxx Source File

Clothoids: /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/Clothoids/Dubins3p.hxx Source File
Clothoids
Dubins3p.hxx
1/*--------------------------------------------------------------------------*\
2 | |
3 | Copyright (C) 2017 |
4 | |
5 | , __ , __ |
6 | /|/ \ /|/ \ |
7 | | __/ _ ,_ | __/ _ ,_ |
8 | | \|/ / | | | | \|/ / | | | |
9 | |(__/|__/ |_/ \_/|/|(__/|__/ |_/ \_/|/ |
10 | /| /| |
11 | \| \| |
12 | |
13 | Enrico Bertolazzi |
14 | Dipartimento di Ingegneria Industriale |
15 | Universita` degli Studi di Trento |
16 | email: enrico.bertolazzi@unitn.it |
17 | |
18\*--------------------------------------------------------------------------*/
19
23
24namespace G2lib {
25
26 /*
27 // ____ _ _ _____
28 // | _ \ _ _| |__ (_)_ __ ___|___ / _ __
29 // | | | | | | | '_ \| | '_ \/ __| |_ \| '_ \
30 // | |_| | |_| | |_) | | | | \__ \___) | |_) |
31 // |____/ \__,_|_.__/|_|_| |_|___/____/| .__/
32 // |_|
33 */
34
60 SAMPLE_ONE_DEGREE,
61 PATTERN_SEARCH,
62 PATTERN_TRICHOTOMY,
63 PATTERN_SEARCH_WITH_ALGO748,
64 PATTERN_TRICHOTOMY_WITH_ALGO748,
65 ELLIPSE,
66 POLYNOMIAL_SYSTEM
67 };
68
74
78 class Dubins3p : public BaseCurve {
79 private:
80
81 Dubins m_Dubins0{"Dubins0"};
82 Dubins m_Dubins1{"Dubins1"};
83
84 real_type m_tolerance{Utils::m_pi/180}; // one degree
85 real_type m_sample_angle{10*Utils::m_pi/180}; // ten degree
86 real_type m_sample_points{360};
87 integer m_max_evaluation{1000};
88 integer m_evaluation;
89
90 bool
91 build_sample(
92 real_type xi,
93 real_type yi,
94 real_type thetai,
95 real_type xm,
96 real_type ym,
97 real_type xf,
98 real_type yf,
99 real_type thetaf,
100 real_type k_max
101 );
102
103 bool
104 build_pattern_search(
105 real_type xi,
106 real_type yi,
107 real_type thetai,
108 real_type xm,
109 real_type ym,
110 real_type xf,
111 real_type yf,
112 real_type thetaf,
113 real_type k_max,
114 real_type tolerance = 1e-8,
115 bool use_trichotomy = true,
116 bool use_748 = true
117 );
118
119 bool
120 build_poly_system(
121 real_type xi,
122 real_type yi,
123 real_type thetai,
124 real_type xm,
125 real_type ym,
126 real_type xf,
127 real_type yf,
128 real_type thetaf,
129 real_type k_max
130 );
131
132 bool
133 build_ellipse(
134 real_type xi,
135 real_type yi,
136 real_type thetai,
137 real_type xm,
138 real_type ym,
139 real_type xf,
140 real_type yf,
141 real_type thetaf,
142 real_type k_max
143 );
144
145 public:
146
150 Dubins3p() = delete;
151 Dubins3p( string const & name ) : BaseCurve( name ) {};
152
153 void setup( GenericContainer const & gc ) override;
154
158 Dubins3p( Dubins3p const & s ) : BaseCurve( s.name() )
159 { this->copy(s); }
160
176 explicit
178 real_type xi,
179 real_type yi,
180 real_type thetai,
181 real_type xm,
182 real_type ym,
183 real_type xf,
184 real_type yf,
185 real_type thetaf,
186 real_type k_max,
187 Dubins3pBuildType method,
188 string const & name
189 ) : BaseCurve( name ) {
190 this->build( xi, yi, thetai, xm, ym, xf, yf, thetaf, k_max, method );
191 }
192
196 void
197 copy( Dubins3p const & d3p ) {
198 m_Dubins0.copy( d3p.m_Dubins0 );
199 m_Dubins1.copy( d3p.m_Dubins1 );
200 }
201
216 bool
217 build(
218 real_type xi,
219 real_type yi,
220 real_type thetai,
221 real_type xm,
222 real_type ym,
223 real_type xf,
224 real_type yf,
225 real_type thetaf,
226 real_type k_max,
227 Dubins3pBuildType method
228 );
229
230 void set_tolerance( real_type tol );
231 void set_sample_angle( real_type ang );
232 void set_max_evaluation( integer max_eval );
233 void set_sample_points( integer npts );
234
235 real_type tolerance() const { return m_tolerance; }
236 real_type sample_angle() const { return m_sample_angle; }
237 DubinsType solution_type0() const { return m_Dubins0.solution_type(); }
238 DubinsType solution_type1() const { return m_Dubins1.solution_type(); }
239 integer icode() const { return m_Dubins0.icode()+16*m_Dubins1.icode(); }
240 integer icode0() const { return m_Dubins0.icode(); }
241 integer icode1() const { return m_Dubins1.icode(); }
242 integer num_evaluation() const { return m_evaluation; }
243 integer max_num_evaluation() const { return m_max_evaluation; }
244
245 string solution_type_string() const;
246 string solution_type_string_short() const;
247
248 void build( LineSegment const & L );
249 void build( CircleArc const & C );
250 void build( ClothoidCurve const & );
251 void build( Biarc const & );
252 void build( BiarcList const & );
253 void build( PolyLine const & );
254 void build( ClothoidList const & );
255 void build( Dubins const & );
256 void build( Dubins3p const & );
257
273 integer
275 real_type xi,
276 real_type yi,
277 real_type thetai,
278 real_type xm,
279 real_type ym,
280 real_type xf,
281 real_type yf,
282 real_type thetaf,
283 real_type k_max,
284 real_type angles[]
285 ) const;
286
302 void
304 real_type xi,
305 real_type yi,
306 real_type thetai,
307 real_type xm,
308 real_type ym,
309 real_type xf,
310 real_type yf,
311 real_type thetaf,
312 real_type k_max,
313 real_type tolerance,
314 vector<real_type> & angles
315 ) const;
316
317 void
318 bbox(
319 real_type & xmin,
320 real_type & ymin,
321 real_type & xmax,
322 real_type & ymax
323 ) const override;
324
325 void
326 bbox_ISO(
327 real_type offs,
328 real_type & xmin,
329 real_type & ymin,
330 real_type & xmax,
331 real_type & ymax
332 ) const override;
333
335 CircleArc const & C0() const { return m_Dubins0.m_C0; }
337 CircleArc const & C1() const { return m_Dubins0.m_C1; }
339 CircleArc const & C2() const { return m_Dubins0.m_C2; }
341 CircleArc const & C3() const { return m_Dubins1.m_C0; }
343 CircleArc const & C4() const { return m_Dubins1.m_C1; }
345 CircleArc const & C5() const { return m_Dubins1.m_C2; }
346
347 void
348 get_solution( ClothoidList & CL ) const {
349 CL.init();
350 CL.reserve(6);
351 CL.push_back( m_Dubins0.m_C0 );
352 CL.push_back( m_Dubins0.m_C1 );
353 CL.push_back( m_Dubins0.m_C2 );
354 CL.push_back( m_Dubins1.m_C0 );
355 CL.push_back( m_Dubins1.m_C1 );
356 CL.push_back( m_Dubins1.m_C2 );
357 }
358
359 real_type length() const override;
360 real_type length_ISO( real_type offs ) const override;
361
362 real_type length0() const { return m_Dubins0.m_C0.length(); }
363 real_type length1() const { return m_Dubins0.m_C1.length(); }
364 real_type length2() const { return m_Dubins0.m_C2.length(); }
365 real_type length3() const { return m_Dubins1.m_C0.length(); }
366 real_type length4() const { return m_Dubins1.m_C1.length(); }
367 real_type length5() const { return m_Dubins1.m_C2.length(); }
368
369 real_type kappa0() const { return m_Dubins0.m_C0.kappa_begin(); }
370 real_type kappa1() const { return m_Dubins0.m_C1.kappa_begin(); }
371 real_type kappa2() const { return m_Dubins0.m_C2.kappa_begin(); }
372 real_type kappa3() const { return m_Dubins1.m_C0.kappa_begin(); }
373 real_type kappa4() const { return m_Dubins1.m_C1.kappa_begin(); }
374 real_type kappa5() const { return m_Dubins1.m_C2.kappa_begin(); }
375
376 real_type X0( real_type s ) const { return m_Dubins0.m_C0.X(s); }
377 real_type Y0( real_type s ) const { return m_Dubins0.m_C0.Y(s); }
378
379 real_type X1( real_type s ) const { return m_Dubins0.m_C1.X(s); }
380 real_type Y1( real_type s ) const { return m_Dubins0.m_C1.Y(s); }
381
382 real_type X2( real_type s ) const { return m_Dubins0.m_C2.X(s); }
383 real_type Y2( real_type s ) const { return m_Dubins0.m_C2.Y(s); }
384
385 real_type X3( real_type s ) const { return m_Dubins1.m_C0.X(s); }
386 real_type Y3( real_type s ) const { return m_Dubins1.m_C0.Y(s); }
387
388 real_type X4( real_type s ) const { return m_Dubins1.m_C1.X(s); }
389 real_type Y4( real_type s ) const { return m_Dubins1.m_C1.Y(s); }
390
391 real_type X5( real_type s ) const { return m_Dubins1.m_C2.X(s); }
392 real_type Y5( real_type s ) const { return m_Dubins1.m_C2.Y(s); }
393
394 real_type theta0( real_type s ) const { return m_Dubins0.m_C0.theta(s); }
395 real_type theta1( real_type s ) const { return m_Dubins0.m_C1.theta(s); }
396 real_type theta2( real_type s ) const { return m_Dubins0.m_C2.theta(s); }
397 real_type theta3( real_type s ) const { return m_Dubins1.m_C0.theta(s); }
398 real_type theta4( real_type s ) const { return m_Dubins1.m_C1.theta(s); }
399 real_type theta5( real_type s ) const { return m_Dubins1.m_C2.theta(s); }
400
401 real_type theta_begin() const override { return m_Dubins0.m_C0.theta_begin(); }
402 real_type theta_end() const override { return m_Dubins1.m_C2.theta_end(); }
403
404 real_type kappa_begin() const override { return m_Dubins0.m_C0.kappa_begin(); }
405 real_type kappa_end() const override { return m_Dubins1.m_C2.kappa_end(); }
406
407 real_type x_begin() const override { return m_Dubins0.m_C0.x_begin(); }
408 real_type x_end() const override { return m_Dubins1.m_C2.x_end(); }
409
410 real_type y_begin() const override { return m_Dubins0.m_C0.y_begin(); }
411 real_type y_end() const override { return m_Dubins1.m_C2.y_end(); }
412
413 real_type tx_begin() const override { return m_Dubins0.m_C0.tx_begin(); }
414 real_type tx_end() const override { return m_Dubins1.m_C2.tx_end(); }
415
416 real_type ty_begin() const override { return m_Dubins0.m_C0.ty_begin(); }
417 real_type ty_end() const override { return m_Dubins1.m_C2.ty_end(); }
418
419 real_type nx_begin_ISO() const override { return m_Dubins0.m_C0.nx_begin_ISO(); }
420 real_type nx_end_ISO() const override { return m_Dubins1.m_C2.nx_end_ISO(); }
421
422 real_type ny_begin_ISO() const override { return m_Dubins0.m_C0.ny_begin_ISO(); }
423 real_type ny_end_ISO() const override { return m_Dubins1.m_C2.ny_end_ISO(); }
424
425 real_type theta0_begin() const { return m_Dubins0.m_C0.theta_begin(); }
426 real_type theta0_end() const { return m_Dubins0.m_C0.theta_end(); }
427
428 real_type theta1_begin() const { return m_Dubins0.m_C1.theta_begin(); }
429 real_type theta1_end() const { return m_Dubins0.m_C1.theta_end(); }
430
431 real_type theta2_begin() const { return m_Dubins0.m_C2.theta_begin(); }
432 real_type theta2_end() const { return m_Dubins0.m_C2.theta_end(); }
433
434 real_type theta3_begin() const { return m_Dubins1.m_C0.theta_begin(); }
435 real_type theta3_end() const { return m_Dubins1.m_C0.theta_end(); }
436
437 real_type theta4_begin() const { return m_Dubins1.m_C1.theta_begin(); }
438 real_type theta4_end() const { return m_Dubins1.m_C1.theta_end(); }
439
440 real_type theta5_begin() const { return m_Dubins1.m_C2.theta_begin(); }
441 real_type theta5_end() const { return m_Dubins1.m_C2.theta_end(); }
442
443 real_type x0_begin() const { return m_Dubins0.m_C0.x_begin(); }
444 real_type x0_end() const { return m_Dubins0.m_C0.x_end(); }
445
446 real_type y0_begin() const { return m_Dubins0.m_C0.y_begin(); }
447 real_type y0_end() const { return m_Dubins0.m_C0.y_end(); }
448
449 real_type x1_begin() const { return m_Dubins0.m_C1.x_begin(); }
450 real_type x1_end() const { return m_Dubins0.m_C1.x_end(); }
451
452 real_type y1_begin() const { return m_Dubins0.m_C1.y_begin(); }
453 real_type y1_end() const { return m_Dubins0.m_C1.y_end(); }
454
455 real_type x2_begin() const { return m_Dubins0.m_C2.x_begin(); }
456 real_type x2_end() const { return m_Dubins0.m_C2.x_end(); }
457
458 real_type y2_begin() const { return m_Dubins0.m_C2.y_begin(); }
459 real_type y2_end() const { return m_Dubins0.m_C2.y_end(); }
460
461 real_type x3_begin() const { return m_Dubins1.m_C0.x_begin(); }
462 real_type x3_end() const { return m_Dubins1.m_C0.x_end(); }
463
464 real_type y3_begin() const { return m_Dubins1.m_C0.y_begin(); }
465 real_type y3_end() const { return m_Dubins1.m_C0.y_end(); }
466
467 real_type x4_begin() const { return m_Dubins1.m_C1.x_begin(); }
468 real_type x4_end() const { return m_Dubins1.m_C1.x_end(); }
469
470 real_type y4_begin() const { return m_Dubins1.m_C1.y_begin(); }
471 real_type y4_end() const { return m_Dubins1.m_C1.y_end(); }
472
473 real_type x5_begin() const { return m_Dubins1.m_C2.x_begin(); }
474 real_type x5_end() const { return m_Dubins1.m_C2.x_end(); }
475
476 real_type y5_begin() const { return m_Dubins1.m_C2.y_begin(); }
477 real_type y5_end() const { return m_Dubins1.m_C2.y_end(); }
478
479 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
480
481 real_type theta ( real_type s ) const override;
482 real_type theta_D ( real_type ) const override;
483 real_type theta_DD ( real_type ) const override { return 0; }
484 real_type theta_DDD( real_type ) const override { return 0; }
485
486 real_type X( real_type s ) const override;
487 real_type Y( real_type s ) const override;
488
489 real_type X_D( real_type s ) const override;
490 real_type Y_D( real_type s ) const override;
491
492 real_type X_DD( real_type s ) const override;
493 real_type Y_DD( real_type s ) const override;
494
495 real_type X_DDD( real_type s ) const override;
496 real_type Y_DDD( real_type s ) const override;
497
498 /*\
499 | _ __
500 | | |_ _ __ __ _ _ __ ___ / _| ___ _ __ _ __ ___
501 | | __| '__/ _` | '_ \/ __| |_ / _ \| '__| '_ ` _ \
502 | | |_| | | (_| | | | \__ \ _| (_) | | | | | | | |
503 | \__|_| \__,_|_| |_|___/_| \___/|_| |_| |_| |_|
504 \*/
505
506 void
508 m_Dubins0.translate(tx,ty);
509 m_Dubins1.translate(tx,ty);
510 }
511
512 void
513 rotate( real_type angle, real_type cx, real_type cy ) override {
514 m_Dubins0.rotate(angle,cx,cy);
515 m_Dubins1.rotate(angle,cx,cy);
516 }
517
518 void reverse() override;
519
520 void change_origin( real_type newx0, real_type newy0 ) override;
521
522 void trim( real_type, real_type ) override;
523
524 void scale( real_type s ) override;
525
526 void
527 eval(
528 real_type s,
531 real_type & x,
532 real_type & y
533 ) const;
534
535 void
536 eval(
537 real_type s,
538 real_type & x,
539 real_type & y
540 ) const override;
541
542 void
543 eval_D(
544 real_type s,
545 real_type & x_D,
546 real_type & y_D
547 ) const override;
548
549 void
550 eval_DD(
551 real_type s,
552 real_type & x_DD,
553 real_type & y_DD
554 ) const override;
555
556 void
557 eval_DDD(
558 real_type s,
559 real_type & x_DDD,
560 real_type & y_DDD
561 ) const override;
562
563 void
564 eval_ISO(
565 real_type s,
566 real_type offs,
567 real_type & x,
568 real_type & y
569 ) const override;
570
571 void
573 real_type s,
574 real_type offs,
575 real_type & x_D,
576 real_type & y_D
577 ) const override;
578
579 void
581 real_type s,
582 real_type offs,
583 real_type & x_DD,
584 real_type & y_DD
585 ) const override;
586
587 void
589 real_type s,
590 real_type offs,
591 real_type & x_DDD,
592 real_type & y_DDD
593 ) const override;
594
595 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
596
597 void
599 vector<Triangle2D> & tvec,
600 real_type max_angle = Utils::m_pi/18,
601 real_type max_size = 1e100,
602 integer icurve = 0
603 ) const override {
604 m_Dubins0.bb_triangles( tvec, max_angle, max_size, icurve );
605 m_Dubins1.bb_triangles( tvec, max_angle, max_size, icurve );
606 }
607
608 void
610 real_type offs,
611 vector<Triangle2D> & tvec,
612 real_type max_angle = Utils::m_pi/18,
613 real_type max_size = 1e100,
614 integer icurve = 0
615 ) const override {
616 m_Dubins0.bb_triangles_ISO( offs, tvec, max_angle, max_size, icurve );
617 m_Dubins1.bb_triangles_ISO( offs, tvec, max_angle, max_size, icurve );
618 }
619
620 void
622 real_type offs,
623 vector<Triangle2D> & tvec,
624 real_type max_angle = Utils::m_pi/18,
625 real_type max_size = 1e100,
626 integer icurve = 0
627 ) const override {
628 m_Dubins0.bb_triangles_SAE( offs, tvec, max_angle, max_size, icurve );
629 m_Dubins1.bb_triangles_SAE( offs, tvec, max_angle, max_size, icurve );
630 }
631
632 /*\
633 | _ _ ____ _ _
634 | ___| | ___ ___ ___ ___| |_| _ \ ___ (_)_ __ | |_
635 | / __| |/ _ \/ __|/ _ \/ __| __| |_) / _ \| | '_ \| __|
636 | | (__| | (_) \__ \ __/\__ \ |_| __/ (_) | | | | | |_
637 | \___|_|\___/|___/\___||___/\__|_| \___/|_|_| |_|\__|
638 \*/
639
640 integer
642 real_type qx,
643 real_type qy,
644 real_type & x,
645 real_type & y,
646 real_type & s,
647 real_type & t,
648 real_type & dst
649 ) const override;
650
651 integer
653 real_type qx,
654 real_type qy,
655 real_type offs,
656 real_type & x,
657 real_type & y,
658 real_type & s,
659 real_type & t,
660 real_type & dst
661 ) const override;
662
663 /*\
664 | _ _ _ _
665 | ___ ___ | | (_)___(_) ___ _ __
666 | / __/ _ \| | | / __| |/ _ \| '_ \
667 | | (_| (_) | | | \__ \ | (_) | | | |
668 | \___\___/|_|_|_|___/_|\___/|_| |_|
669 \*/
670
674 bool collision( Dubins3p const & B ) const;
675
683 bool
685 real_type offs,
686 Dubins3p const & B,
687 real_type offs_B
688 ) const;
689
690 bool collision( BaseCurve const * pC ) const override;
691
692 bool
694 real_type offs,
695 BaseCurve const * pC,
696 real_type offs_C
697 ) const override;
698
699 /*\
700 | _ _ _
701 | (_)_ __ | |_ ___ _ __ ___ ___ ___| |_
702 | | | '_ \| __/ _ \ '__/ __|/ _ \/ __| __|
703 | | | | | | || __/ | \__ \ __/ (__| |_
704 | |_|_| |_|\__\___|_| |___/\___|\___|\__|
705 \*/
706
713 void
714 intersect(
715 Dubins3p const & B,
716 IntersectList & ilist
717 ) const;
718
727 void
729 real_type offs,
730 Dubins3p const & B,
731 real_type offs_B,
732 IntersectList & ilist
733 ) const;
734
735 void
736 intersect(
737 BaseCurve const * pC,
738 IntersectList & ilist
739 ) const override;
740
741 void
743 real_type offs,
744 BaseCurve const * pC,
745 real_type offs_LS,
746 IntersectList & ilist
747 ) const override;
748
749 string info() const;
750
751 void
752 info( ostream_type & stream ) const override
753 { stream << this->info(); }
754
755 friend
757 operator << ( ostream_type & stream, Dubins3p const & bi );
758
759 CurveType type() const override { return CurveType::DUBINS; }
760
761 };
762
763}
764
Definition BaseCurve.hxx:192
virtual real_type tx(real_type s) const
real_type kappa(real_type s) const
Definition BaseCurve.hxx:560
virtual real_type ty(real_type s) const
Definition Circle.hxx:37
virtual real_type theta_end() const
Definition BaseCurve.hxx:388
virtual real_type ty_end() const
Definition BaseCurve.hxx:478
real_type ny_begin_ISO() const override
Definition Circle.hxx:502
real_type kappa_end() const override
Definition Circle.hxx:496
virtual real_type tx_end() const
Definition BaseCurve.hxx:473
real_type X(real_type s) const override
Definition Circle.cc:192
real_type theta(real_type s) const override
Definition Circle.hxx:506
real_type Y(real_type s) const override
Definition Circle.cc:215
virtual real_type x_end() const
Definition BaseCurve.hxx:413
real_type y_begin() const override
Definition Circle.hxx:498
virtual real_type nx_end_ISO() const
Definition BaseCurve.hxx:493
virtual real_type y_end() const
Definition BaseCurve.hxx:418
real_type nx_begin_ISO() const override
Definition Circle.hxx:501
real_type length() const override
Definition Circle.hxx:487
real_type ty_begin() const override
Definition Circle.hxx:500
virtual real_type ny_end_ISO() const
Definition BaseCurve.hxx:498
real_type tx_begin() const override
Definition Circle.hxx:499
real_type x_begin() const override
Definition Circle.hxx:497
real_type kappa_begin() const override
Definition Circle.hxx:495
real_type theta_begin() const override
Definition Circle.hxx:494
Definition ClothoidList.hxx:861
void init()
Definition ClothoidList.cc:286
void push_back(LineSegment const &c)
Definition ClothoidList.cc:319
void reserve(integer n)
Definition ClothoidList.cc:311
Definition Dubins3p.hxx:78
real_type nx_end_ISO() const override
Definition Dubins3p.hxx:420
real_type X_D(real_type s) const override
Definition Dubins3p.cc:226
CircleArc const & C3() const
Return the first cicle of the Dubins solution.
Definition Dubins3p.hxx:341
void translate(real_type tx, real_type ty) override
translate curve by
Definition Dubins3p.hxx:507
CircleArc const & C0() const
Return the first cicle of the Dubins solution.
Definition Dubins3p.hxx:335
real_type kappa_end() const override
Definition Dubins3p.hxx:405
real_type length_ISO(real_type offs) const override
Definition Dubins3p.cc:212
void bbox(real_type &xmin, real_type &ymin, real_type &xmax, real_type &ymax) const override
Definition Dubins3p.cc:378
real_type ty_begin() const override
Definition Dubins3p.hxx:416
bool collision(Dubins3p const &B) const
Definition Dubins3p.cc:421
Dubins3p(real_type xi, real_type yi, real_type thetai, real_type xm, real_type ym, real_type xf, real_type yf, real_type thetaf, real_type k_max, Dubins3pBuildType method, string const &name)
Definition Dubins3p.hxx:177
void bb_triangles_SAE(real_type offs, vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/18, real_type max_size=1e100, integer icurve=0) const override
Definition Dubins3p.hxx:621
real_type length() const override
Definition Dubins3p.cc:207
void trim(real_type, real_type) override
Definition Dubins3p.cc:371
real_type X_DDD(real_type s) const override
Definition Dubins3p.cc:228
CircleArc const & C2() const
Return the third cicle of the Dubins solution.
Definition Dubins3p.hxx:339
void change_origin(real_type newx0, real_type newy0) override
Definition Dubins3p.cc:365
void reverse() override
Definition Dubins3p.cc:349
real_type theta(real_type s) const override
Definition Dubins3p.cc:223
real_type nx_begin_ISO() const override
Definition Dubins3p.hxx:419
CircleArc const & C1() const
Return the second cicle of the Dubins solution.
Definition Dubins3p.hxx:337
void eval_DDD(real_type s, real_type &x_DDD, real_type &y_DDD) const override
Definition Dubins3p.cc:291
real_type Y_DD(real_type s) const override
Definition Dubins3p.cc:231
real_type kappa_begin() const override
Definition Dubins3p.hxx:404
real_type theta_begin() const override
Definition Dubins3p.hxx:401
CircleArc const & C4() const
Return the seco4d cicle of the Dubins solution.
Definition Dubins3p.hxx:343
real_type theta_DDD(real_type) const override
Definition Dubins3p.hxx:484
real_type x_begin() const override
Definition Dubins3p.hxx:407
void bbox_ISO(real_type offs, real_type &xmin, real_type &ymin, real_type &xmax, real_type &ymax) const override
Definition Dubins3p.cc:396
CurveType type() const override
Definition Dubins3p.hxx:759
real_type theta_end() const override
Definition Dubins3p.hxx:402
real_type theta_DD(real_type) const override
Definition Dubins3p.hxx:483
void bb_triangles(vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/18, real_type max_size=1e100, integer icurve=0) const override
Definition Dubins3p.hxx:598
integer closest_point_ISO(real_type qx, real_type qy, real_type &x, real_type &y, real_type &s, real_type &t, real_type &dst) const override
Definition Dubins3p.cc:551
void eval_ISO_D(real_type s, real_type offs, real_type &x_D, real_type &y_D) const override
Definition Dubins3p.cc:315
void copy(Dubins3p const &d3p)
Definition Dubins3p.hxx:197
real_type X(real_type s) const override
Definition Dubins3p.cc:225
void eval_ISO_DDD(real_type s, real_type offs, real_type &x_DDD, real_type &y_DDD) const override
Definition Dubins3p.cc:339
bool collision_ISO(real_type offs, Dubins3p const &B, real_type offs_B) const
Definition Dubins3p.cc:429
Dubins3p()=delete
real_type Y_D(real_type s) const override
Definition Dubins3p.cc:230
void rotate(real_type angle, real_type cx, real_type cy) override
Definition Dubins3p.hxx:513
integer get_range_angles(real_type xi, real_type yi, real_type thetai, real_type xm, real_type ym, real_type xf, real_type yf, real_type thetaf, real_type k_max, real_type angles[]) const
Definition Dubins3p.cc:654
real_type Y_DDD(real_type s) const override
Definition Dubins3p.cc:232
void eval_DD(real_type s, real_type &x_DD, real_type &y_DD) const override
Definition Dubins3p.cc:280
void info(ostream_type &stream) const override
Definition Dubins3p.hxx:752
real_type x_end() const override
Definition Dubins3p.hxx:408
void get_sample_angles(real_type xi, real_type yi, real_type thetai, real_type xm, real_type ym, real_type xf, real_type yf, real_type thetaf, real_type k_max, real_type tolerance, vector< real_type > &angles) const
Definition Dubins3p_pattern.cc:31
friend ostream_type & operator<<(ostream_type &stream, Dubins3p const &bi)
Definition Dubins3p.cc:688
Dubins3p(Dubins3p const &s)
Definition Dubins3p.hxx:158
void eval_ISO_DD(real_type s, real_type offs, real_type &x_DD, real_type &y_DD) const override
Definition Dubins3p.cc:327
real_type Y(real_type s) const override
Definition Dubins3p.cc:229
real_type tx_begin() const override
Definition Dubins3p.hxx:413
real_type ny_begin_ISO() const override
Definition Dubins3p.hxx:422
void eval_D(real_type s, real_type &x_D, real_type &y_D) const override
Definition Dubins3p.cc:269
real_type ty_end() const override
Definition Dubins3p.hxx:417
real_type tx_end() const override
Definition Dubins3p.hxx:414
void scale(real_type s) override
Definition Dubins3p.cc:358
void intersect(Dubins3p const &B, IntersectList &ilist) const
Definition Dubins3p.cc:480
real_type y_begin() const override
Definition Dubins3p.hxx:410
void bb_triangles_ISO(real_type offs, vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/18, real_type max_size=1e100, integer icurve=0) const override
Definition Dubins3p.hxx:609
bool build(real_type xi, real_type yi, real_type thetai, real_type xm, real_type ym, real_type xf, real_type yf, real_type thetaf, real_type k_max, Dubins3pBuildType method)
Definition Dubins3p.cc:60
real_type y_end() const override
Definition Dubins3p.hxx:411
real_type ny_end_ISO() const override
Definition Dubins3p.hxx:423
void intersect_ISO(real_type offs, Dubins3p const &B, real_type offs_B, IntersectList &ilist) const
Definition Dubins3p.cc:515
void eval_ISO(real_type s, real_type offs, real_type &x, real_type &y) const override
Definition Dubins3p.cc:303
real_type theta_D(real_type) const override
Definition Dubins3p.cc:224
CircleArc const & C5() const
Return the third cicle of the Dubins solution.
Definition Dubins3p.hxx:345
real_type X_DD(real_type s) const override
Definition Dubins3p.cc:227
Definition Dubins.hxx:74
void rotate(real_type angle, real_type cx, real_type cy) override
Definition Dubins.hxx:382
void bb_triangles(vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/18, real_type max_size=1e100, integer icurve=0) const override
Definition Dubins.hxx:465
void translate(real_type tx, real_type ty) override
translate curve by
Definition Dubins.hxx:378
void bb_triangles_SAE(real_type offs, vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/18, real_type max_size=1e100, integer icurve=0) const override
Definition Dubins.hxx:490
void bb_triangles_ISO(real_type offs, vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/18, real_type max_size=1e100, integer icurve=0) const override
Definition Dubins.hxx:477
void copy(Dubins const &d)
Definition Dubins.hxx:131
Definition BBox.cc:42
GC_namespace::GenericContainer GenericContainer
Generic container object.
Definition Clothoids.hh:84
enum class Dubins3pBuildType :integer { SAMPLE_ONE_DEGREE, PATTERN_SEARCH, PATTERN_TRICHOTOMY, PATTERN_SEARCH_WITH_ALGO748, PATTERN_TRICHOTOMY_WITH_ALGO748, ELLIPSE, POLYNOMIAL_SYSTEM } Dubins3pBuildType
Definition Dubins3p.hxx:59
std::basic_ostream< char > ostream_type
output streaming
Definition Clothoids.hh:78
std::vector< Ipair > IntersectList
Vector of pair of two real number.
Definition BaseCurve.hxx:36
Dubins3pBuildType string_to_Dubins3pBuildType(string const &str)
Definition Dubins3p.cc:32
enum class DubinsType :integer { LSL, RSR, LSR, RSL, LRL, RLR, DUBINS_ERROR } DubinsType
Definition Dubins.hxx:44
enum class CurveType :integer { LINE, POLYLINE, CIRCLE, BIARC, BIARC_LIST, CLOTHOID, CLOTHOID_LIST, DUBINS, DUBINS3P } CurveType
Definition Clothoids.hh:89
double real_type
real type number
Definition Clothoids.hh:79
int integer
integer type number
Definition Clothoids.hh:80