-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial draft of changes for online map / planner updates #12
base: master
Are you sure you want to change the base?
Changes from 16 commits
745d2d0
51f0bac
c8ad75d
0d0bcc0
07efb89
b492b7f
85723b8
f24ce13
11075fe
8c0bc04
0072859
db4a618
2735940
6b3863b
4704095
808bd65
21e3385
5c1afb2
fc57077
632a7f6
db5da4d
80db121
ad3095d
d07c579
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
std_msgs/Header header | ||
geometry_msgs/Pose startingPose | ||
geometry_msgs/Pose goalPose |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ | |
|
||
namespace se2_planning { | ||
|
||
enum StateValidityCheckingMethod : int { COLLISION = 0, TRAVERSABILITY = 1, ROBUST_TRAVERSABILITY = 2 }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah okay, I see it now. But we need to explain a bit what is behind these methods. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I have just left all methods there that we can discuss/check what is actually useful. Improving the documentation is important for that, sounds good! |
||
|
||
class GridMapLazyStateValidator : public GridMapStateValidator { | ||
using BASE = GridMapStateValidator; | ||
|
||
|
@@ -23,32 +25,56 @@ class GridMapLazyStateValidator : public GridMapStateValidator { | |
~GridMapLazyStateValidator() override = default; | ||
|
||
bool isStateValid(const State& state) const final; | ||
void initialize() final; | ||
void initialize() override; | ||
bool isInitialized() const final; | ||
|
||
void setIsUseRandomizedStrategy(bool value); | ||
bool getIsUseRandomizedStrategy() const; | ||
|
||
void setIsUseEarlyStoppingHeuristic(bool value); | ||
bool setIsUseEarlyStoppingHeuristic() const; | ||
bool getIsUseEarlyStoppingHeuristic() const; | ||
|
||
void setSeed(int value); | ||
int getSeed() const; | ||
|
||
void setStateValidityCheckingMethod(StateValidityCheckingMethod value); | ||
StateValidityCheckingMethod getStateValidityCheckingMethod() const; | ||
|
||
void setStateValidityThreshold(double value); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to explain what is that threshold. e.g. cell value < threshold is considered valid. |
||
double getStateValidityThreshold() const; | ||
|
||
void setUnsafeStateValidityThreshold(double value); | ||
double getUnsafeStateValidityThreshold() const; | ||
|
||
void setMaxNumberOfUnsafeCells(int value); | ||
int getMaxNumberOfUnsafeCells() const; | ||
|
||
private: | ||
std::vector<Vertex> nominalFootprintPoints_; | ||
bool isInitializeCalled_ = false; | ||
bool isUseRandomizedStrategy_ = false; | ||
bool isUseEarlyStoppingHeuristic_ = false; | ||
StateValidityCheckingMethod stateValidityCheckingMethod_ = StateValidityCheckingMethod::COLLISION; | ||
double minStateValidityThreshold_ = 0.5; | ||
double unsafeStateValidityThreshold_ = 0.5; | ||
int maxNumberOfUnsafeCells_ = 0; | ||
int seed_ = 0; | ||
}; | ||
|
||
void computeFootprintPoints(const grid_map::GridMap& gridMap, const RobotFootprint& footprint, std::vector<Vertex>* footprintPoints); | ||
bool isInCollision(const SE2state& state, const std::vector<Vertex>& nominalFootprintPoints, const grid_map::GridMap& gridMap, | ||
const std::string& obstacleLayer); | ||
bool isInCollision(const SE2state& state, const std::vector<Vertex>& footprint, const grid_map::GridMap& gridMap, | ||
const std::string& obstacleLayer, const double collisionThreshold); | ||
// bool isTraversable(const SE2state& state, const std::vector<Vertex>& footprint, const grid_map::GridMap& gridMap, | ||
// const std::string& traversabilityLayer, const double traversabilityThreshold); | ||
bool isTraversableIterator(const SE2state& state, const RobotFootprint& footprint, const grid_map::GridMap& gridMap, | ||
const std::string& traversabilityLayer, const double traversabilityThreshold); | ||
bool isTraversableRobustIterator(const SE2state& state, const RobotFootprint& footprint, const grid_map::GridMap& gridMap, | ||
const std::string& traversabilityLayer, const double minTraversabilityThreshold, | ||
const double unsafeTraversabilityThreshold, const int maxNumberOfUnsafeCells); | ||
void addExtraPointsForEarlyStopping(const RobotFootprint& footprint, std::vector<Vertex>* points, int seed); | ||
std::unique_ptr<GridMapLazyStateValidator> createGridMapLazyStateValidator(const grid_map::GridMap& gridMap, | ||
const RobotFootprint& footprint, | ||
const std::string& obstacleLayer); | ||
std::unique_ptr<GridMapLazyStateValidator> createGridMapLazyStateValidator( | ||
const grid_map::GridMap& gridMap, const RobotFootprint& footprint, const std::string& obstacleLayer, | ||
const StateValidityCheckingMethod& stateValidityCheckingMethod, const double stateValidityThreshold, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do all methods require all of these parameters? e.g. if I just use the obstacle method? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, you are right, this should probably be organized differently. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, I think we should remove the functions that are not used from the function calls. |
||
const double unsafeStateValidityThreshold, const int maxNumberOfUnsafeCells); | ||
|
||
} /* namespace se2_planning */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this parameter exactly? (grid_map_state_validity_checking_method)