Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
HiroIshida committed May 14, 2022
1 parent 9cfaad3 commit 5e5b1a0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion planning/freespace_planning_algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ target_link_libraries(rrtstar_core
ament_auto_add_library(freespace_planning_algorithms SHARED
src/abstract_algorithm.cpp
src/astar_search.cpp
src/informed_rrtstar.cpp
src/rrtstar.cpp
)

target_link_libraries(freespace_planning_algorithms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ struct RRTStarParam
double margin; // [m]
};

class GridInformedRRTStar : public AbstractPlanningAlgorithm
class RRTStar : public AbstractPlanningAlgorithm
{
public:
explicit GridInformedRRTStar(
explicit RRTStar(
const PlannerCommonParam & planner_common_param, const VehicleShape & original_vehicle_shape,
const RRTStarParam & rrtstar_param);
bool makePlan(
Expand Down
9 changes: 4 additions & 5 deletions planning/freespace_planning_algorithms/src/rrtstar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rrtstar_core::Pose posemsgToPose(const geometry_msgs::msg::Pose & pose_msg)

namespace freespace_planning_algorithms
{
GridInformedRRTStar::GridInformedRRTStar(
RRTStar::RRTStar(
const PlannerCommonParam & planner_common_param, const VehicleShape & original_vehicle_shape,
const RRTStarParam & rrtstar_param)
: AbstractPlanningAlgorithm(
Expand All @@ -47,7 +47,7 @@ GridInformedRRTStar::GridInformedRRTStar(
}
}

bool GridInformedRRTStar::makePlan(
bool RRTStar::makePlan(
const geometry_msgs::msg::Pose & start_pose, const geometry_msgs::msg::Pose & goal_pose)
{
const rclcpp::Time begin = rclcpp::Clock(RCL_ROS_TIME).now();
Expand Down Expand Up @@ -105,8 +105,7 @@ bool GridInformedRRTStar::makePlan(
return true;
}

bool GridInformedRRTStar::hasObstacleOnTrajectory(
const geometry_msgs::msg::PoseArray & trajectory) const
bool RRTStar::hasObstacleOnTrajectory(const geometry_msgs::msg::PoseArray & trajectory) const
{
for (const auto & pose : trajectory.poses) {
const auto pose_local = global2local(costmap_, pose);
Expand All @@ -119,7 +118,7 @@ bool GridInformedRRTStar::hasObstacleOnTrajectory(
return false;
}

void GridInformedRRTStar::setRRTPath(const std::vector<rrtstar_core::Pose> & waypoints)
void RRTStar::setRRTPath(const std::vector<rrtstar_core::Pose> & waypoints)
{
std_msgs::msg::Header header;
header.stamp = rclcpp::Clock(RCL_ROS_TIME).now();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "freespace_planning_algorithms/abstract_algorithm.hpp"
#include "freespace_planning_algorithms/astar_search.hpp"
#include "freespace_planning_algorithms/informed_rrtstar.hpp"
#include "freespace_planning_algorithms/rrtstar.hpp"

#include <rclcpp/rclcpp.hpp>
#include <rcpputils/filesystem_helper.hpp>
Expand Down Expand Up @@ -191,8 +191,7 @@ std::unique_ptr<fpa::AbstractPlanningAlgorithm> configure_rrtstar(bool update)
const double mu = 12.0;
const double margin = 0.2;
const auto rrtstar_param = fpa::RRTStarParam{enable_update, mu, margin};
auto algo =
std::make_unique<fpa::GridInformedRRTStar>(planner_common_param, vehicle_shape, rrtstar_param);
auto algo = std::make_unique<fpa::RRTStar>(planner_common_param, vehicle_shape, rrtstar_param);
return algo;
}

Expand Down

0 comments on commit 5e5b1a0

Please sign in to comment.