]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/blobdiff - incl/rrtsp.hh
Add extension with dubins paths
[hubacji1/rrts.git] / incl / rrtsp.hh
index f136449fbc9e888830b551b2002f98e1a8667df5..728ebf9770fb2b3c487737e6e85f828699505452 100644 (file)
@@ -1,3 +1,9 @@
+/*
+ * SPDX-FileCopyrightText: 2021 Jiri Vlasak <jiri.vlasak.2@cvut.cz>
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
 /*! \brief RRT* planners.
  *
  * This file contains _to be used_ RRT* planners consisting of the RRT*
  * RRT* planners have no implementation.
  *
  * \file
+ * \defgroup planners RRTS Planners
  */
-#ifndef RRTS_RRTCE_H
-#define RRTS_RRTCE_H
+#ifndef RRTS_RRTSP_H
+#define RRTS_RRTSP_H
 
 #include "rrtext.hh"
 
 namespace rrts {
 
+/*! \brief Planner for F1/10.
+ *
+ * TODO: change RRTExt2 to cost grid
+ *
+ * \ingroup planners
+ */
+class P40 : public RRTExt2, public RRTExt8, public RRTExt10, public RRTExt14,
+               public RRTExt15, public RRTExt19, public RRTExt17,
+               public RRTExt13 {
+public:
+       Json::Value json() const
+       {
+               auto jvo = RRTExt13::json();
+               auto json15 = RRTExt15::json();
+               jvo["log_path_cost"] = json15["log_path_cost"];
+               return jvo;
+       }
+       void json(Json::Value jvi)
+       {
+               RRTExt2::json(jvi);
+       }
+       void reset()
+       {
+               RRTExt8::reset();
+               RRTExt14::reset();
+               RRTExt13::reset();
+       }
+};
+
+/*! \brief Planner with optimization and reset.
+ *
+ * \ingroup planners
+ */
+class P39 : public RRTExt2, public RRTExt8, public RRTExt10, public RRTExt14,
+               public RRTExt15, public RRTExt16, public RRTExt17,
+               public RRTExt13 {
+public:
+       Json::Value json() const
+       {
+               auto jvo = RRTExt13::json();
+               auto json15 = RRTExt15::json();
+               jvo["log_path_cost"] = json15["log_path_cost"];
+               return jvo;
+       }
+       void json(Json::Value jvi)
+       {
+               RRTExt2::json(jvi);
+       }
+       void reset()
+       {
+               RRTExt8::reset();
+               RRTExt14::reset();
+               RRTExt13::reset();
+       }
+};
+
 class P38 : public RRTExt2, public RRTExt8, public RRTExt10, public RRTExt14,
                public RRTExt15, public RRTExt16, public RRTExt18,
                public RRTExt13 {
@@ -74,4 +137,4 @@ public:
 };
 
 } // namespace rrts
-#endif /* RRTS_RRTCE_H */
+#endif /* RRTS_RRTSP_H */