Skip to content

Commit

Permalink
change the name setValidRegion to setSearchRegion
Browse files Browse the repository at this point in the history
  • Loading branch information
sikang committed Aug 29, 2018
1 parent 82b11af commit 60f3082
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/mpl_planner/planner/map_planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ template <int Dim> class MapPlanner: public PlannerBase<Dim, Waypoint<Dim>> {
/// Set map util
virtual void setMapUtil(const std::shared_ptr<MapUtil<Dim>> &map_util);
/**
* @brief Set valid region
* @brief Set search region
* @param path a sequence of waypoints from a path or trajectory
* @param search_radius the search distance in each axis
* @param dense if true, do ray cast between two consecutive points in path
*/
void setValidRegion(const vec_Vecf<Dim>& path, const Vecf<Dim>& search_radius, bool dense = false);
void setSearchRegion(const vec_Vecf<Dim>& path, const Vecf<Dim>& search_radius, bool dense = false);

/// Get search region
vec_Vecf<Dim> getSearchRegion() const;
Expand Down
2 changes: 1 addition & 1 deletion src/mpl_planner/map_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void MapPlanner<Dim>::setGradientWeight(decimal_t w) {
}

template <int Dim>
void MapPlanner<Dim>::setValidRegion(const vec_Vecf<Dim>& path, const Vecf<Dim>& search_radius, bool dense) {
void MapPlanner<Dim>::setSearchRegion(const vec_Vecf<Dim>& path, const Vecf<Dim>& search_radius, bool dense) {
// create cells along path
vec_Veci<Dim> ps;
if(!dense) {
Expand Down
2 changes: 1 addition & 1 deletion test/test_distance_map_planner_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int main(int argc, char **argv) {
planner->setU(U); // Set control input
planner->setEpsilon(1.0); // Set heursitic to zero

planner->setValidRegion(path, Vec2f(0.5, 0.5)); // Set search region around path
planner->setSearchRegion(path, Vec2f(0.5, 0.5)); // Set search region around path
planner->setPotentialRadius(Vec2f(1.0, 1.0)); // Set potential distance
planner->setPotentialWeight(1); // Set potential weight
planner->setGradientWeight(0); // Set gradient weight
Expand Down
2 changes: 1 addition & 1 deletion test/test_distance_map_planner_2d_with_yaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int main(int argc, char **argv) {
planner->setU(U_yaw); // Set control input
planner->setEpsilon(1.0); // Set heursitic to zero

planner->setValidRegion(path, Vec2f(0.5, 0.5)); // Set search region around path
planner->setSearchRegion(path, Vec2f(0.5, 0.5)); // Set search region around path
planner->setPotentialRadius(Vec2f(1.0, 1.0)); // Set potential distance
planner->setPotentialWeight(1); // Set potential weight
planner->setGradientWeight(0); // Set gradient weight
Expand Down

0 comments on commit 60f3082

Please sign in to comment.