-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated ThetaStarSIREN and LazyThetaStarSIREN
- Loading branch information
1 parent
4e4be62
commit 8af9c40
Showing
26 changed files
with
640 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#ifndef ASTARSIREN_HPP | ||
#define ASTARSIREN_HPP | ||
/** | ||
* @file AStarSIREN.hpp | ||
* @author Guillermo Gil ([email protected]) | ||
* @author Jose Antonio Cobano ([email protected]) | ||
* | ||
* @brief This algorithm is a variation of the A*. The only TBD | ||
* difference is that it reimplements the computeG method adding the | ||
* following cost term to the resturned result: | ||
* | ||
* auto cost_term = static_cast<unsigned int>(cost_weight_ * _suc->cost * dist_scale_factor_reduced_); | ||
* | ||
* @version 0.1 | ||
* @date 2021-06-29 | ||
* | ||
* @copyright Copyright (c) 2021 | ||
* | ||
*/ | ||
#include <Planners/AStar.hpp> | ||
|
||
namespace Planners{ | ||
|
||
/** | ||
* @brief | ||
* | ||
*/ | ||
class AStarSIREN : public AStar | ||
{ | ||
|
||
public: | ||
/** | ||
* @brief Construct a new AStarM1 object | ||
* @param _use_3d This parameter allows the user to choose between | ||
* planning on a plane (8 directions possibles) | ||
* or in the 3D full space (26 directions) | ||
* @param _name Algorithm name stored internally | ||
* | ||
*/ | ||
AStarSIREN(bool _use_3d, std::string _name ); | ||
|
||
/** | ||
* @brief Construct a new Cost Aware A Star M1 object | ||
* | ||
* @param _use_3d | ||
*/ | ||
AStarSIREN(bool _use_3d); | ||
|
||
protected: | ||
|
||
/** | ||
* @brief Overrided ComputeG function. | ||
* | ||
* @param _current Pointer to the current node | ||
* @param _suc Pointer to the successor node | ||
* @param _n_i The index of the direction in the directions vector. | ||
* Depending on this index, the distance wi | ||
* @param _dirs Number of directions used (to distinguish between 2D and 3D) | ||
* @return unsigned int The G Value calculated by the function | ||
*/ | ||
inline virtual unsigned int computeG(const Node* _current, Node* _suc, unsigned int _n_i, unsigned int _dirs, torch::jit::script::Module& loaded_sdf) override; | ||
|
||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#ifndef LAZYTHETASTARSIREN_HPP | ||
#define LAZYTHETASTARSIREN_HPP | ||
/** | ||
* @file LazyThetaStarSIREN.hpp | ||
* @author Guillermo Gil ([email protected]) | ||
* @author Jose Antonio Cobano ([email protected]) | ||
* @brief | ||
* @version 0.1 | ||
* @date 2024-06-27 | ||
* | ||
* @copyright Copyright (c) 2024 | ||
* | ||
*/ | ||
#include <Planners/LazyThetaStar.hpp> | ||
|
||
namespace Planners | ||
{ | ||
/** | ||
* @brief Lazy Theta* SIREN Algorithm Class | ||
* | ||
*/ | ||
class LazyThetaStarSIREN : public LazyThetaStar | ||
{ | ||
|
||
public: | ||
|
||
/** | ||
* @brief Construct a new Lazy Theta Star SIREN object | ||
* | ||
* @param _use_3d This parameter allows the user to choose between planning on a plane | ||
* (8 directions possibles) or in the 3D full space (26 directions) | ||
* @param _name Algorithm name stored internally | ||
* | ||
*/ | ||
LazyThetaStarSIREN(bool _use_3d, std::string _name ); | ||
|
||
/** | ||
* @brief Construct a new Lazy Theta Star SIREN object | ||
* | ||
* @param _use_3d | ||
*/ | ||
LazyThetaStarSIREN(bool _use_3d); | ||
|
||
protected: | ||
|
||
/** | ||
* @brief Compute cost function of the Lazy version of the algorithm | ||
* | ||
* @param _s_aux Pointer to first node | ||
* @param _s2_aux Pointer to second node | ||
*/ | ||
inline virtual void ComputeCost(Node *_s_aux, Node *_s2_aux, torch::jit::script::Module& loaded_sdf) override; | ||
|
||
/** | ||
* @brief SetVertex function | ||
* Line of sight is checked inside this function | ||
* @param _s_aux | ||
*/ | ||
virtual void SetVertex(Node *_s_aux, torch::jit::script::Module& loaded_sdf) override; | ||
|
||
|
||
/** | ||
* @brief This functions implements the algorithm G function. | ||
* | ||
* @param _current Pointer to the current node | ||
* @param _suc Pointer to the successor node | ||
* @param _n_i The index of the direction in the directions vector. | ||
* Depending on this index, the distance wi | ||
* @param _dirs Number of directions used (to distinguish between 2D and 3D) | ||
* @return unsigned int The G Value calculated by the function | ||
*/ | ||
virtual unsigned int computeG(const Node* _current, Node* _suc, unsigned int _n_i, unsigned int _dirs, torch::jit::script::Module& loaded_sdf) override; | ||
|
||
|
||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#ifndef THETASTARSIREN_HPP | ||
#define THETASTARSIREN_HPP | ||
/** | ||
* @file ThetaStarSIREN.hpp | ||
* @author Guillermo Gil ([email protected]) | ||
* @author Jose Antonio Cobano ([email protected]) | ||
* | ||
* @brief TBD | ||
* | ||
* @version 0.1 | ||
* @date 2024-06-27 | ||
* | ||
* @copyright Copyright (c) 2024 | ||
* | ||
*/ | ||
#include <Planners/ThetaStar.hpp> | ||
|
||
namespace Planners | ||
{ | ||
|
||
/** | ||
* @brief Theta* SIREN Algorithm Class | ||
* | ||
*/ | ||
class ThetaStarSIREN : public ThetaStar | ||
{ | ||
|
||
public: | ||
|
||
/** | ||
* @brief Construct a new Theta Star SIREN object | ||
* | ||
* @param _use_3d This parameter allows the user to choose between planning on | ||
* a plane (8 directions possibles) or in the 3D full space (26 directions) | ||
* @param _name Algorithm name stored internally | ||
* | ||
*/ | ||
ThetaStarSIREN(bool _use_3d, std::string _name ); | ||
|
||
/** | ||
* @brief Construct a new Theta Star SIREN object | ||
* | ||
* @param _use_3d | ||
*/ | ||
ThetaStarSIREN(bool _use_3d); | ||
|
||
|
||
protected: | ||
|
||
/** | ||
* @brief Compute cost algorithm function | ||
* | ||
* @param _s_aux Pointer to first node | ||
* @param _s2_aux Pointer to the second node | ||
*/ | ||
inline virtual void ComputeCost(Node *_s_aux, Node *_s2_aux, torch::jit::script::Module& loaded_sdf) override; | ||
|
||
|
||
/** | ||
* @brief TBD | ||
* | ||
* | ||
* @param _current Pointer to the current node | ||
* @param _suc Pointer to the successor node | ||
* @param _n_i The index of the direction in the directions vector. | ||
* Depending on this index, the distance wi | ||
* @param _dirs Number of directions used (to distinguish between 2D and 3D) | ||
* @return unsigned int The G Value calculated by the function | ||
*/ | ||
inline virtual unsigned int computeG(const Node* _current, Node* _suc, unsigned int _n_i, unsigned int _dirs, torch::jit::script::Module& loaded_sdf) override; | ||
|
||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.