]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/commitdiff
Merge branch 'simple-occupancy-grid' v0.13.0
authorJiri Vlasak <jiri.vlasak.2@cvut.cz>
Fri, 19 Aug 2022 10:02:15 +0000 (12:02 +0200)
committerJiri Vlasak <jiri.vlasak.2@cvut.cz>
Fri, 19 Aug 2022 10:02:15 +0000 (12:02 +0200)
1  2 
incl/rrtext.hh

diff --cc incl/rrtext.hh
index d8bcfd6eed1c4bcd4a37da59b0950b4a04123927,e285fa2796c4d287067a96a6f26aa2da2c043520..a10c1507754b528c008b5c8ee88db742c5975cb1
  
  namespace rrts {
  
+ /*! \brief Collision check based on enlarged occupancy grid.
+  *
+  */
+ class RRTExt21 : public virtual RRTS {
+ private:
+       unsigned int _grid_width = 0;
+       unsigned int _grid_height = 0;
+       float _grid_res = 0.0;
+       int8_t const *_grid_data = nullptr;
+       double _origin_x = 0.0;
+       double _origin_y = 0.0;
+       bool collide(RRTNode const &n);
+       bool collide_steered();
+ public:
+       void set_grid_to_check(unsigned int w, unsigned int h, float r,
+                       int8_t const *d, double x, double y);
+ };
  /*! \brief Collision check based on occupancy grid.
 + *
 + * This approach expects obstacles to be represented by points and the collision
 + * occures whenever the point is inside the frame given by the car pose and the
 + * car size.
   *
   * \ingroup ext-col
   */