Skip to content
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

Enabled runtime configuration of parameters for Hybrid A* #2540

Merged
merged 3 commits into from
Sep 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class SmacPlanner2D : public nav2_core::GlobalPlanner

protected:
/**
* @brief Callback executed when a paramter change is detected
* @brief Callback executed when a parameter change is detected
* @param event ParameterEvent message
*/
void on_parameter_event_callback(const rcl_interfaces::msg::ParameterEvent::SharedPtr event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,41 @@ class SmacPlannerHybrid : public nav2_core::GlobalPlanner
const geometry_msgs::msg::PoseStamped & goal) override;

protected:
/**
* @brief Callback executed when a parameter change is detected
* @param event ParameterEvent message
*/
void on_parameter_event_callback(const rcl_interfaces::msg::ParameterEvent::SharedPtr event);

std::unique_ptr<AStarAlgorithm<NodeHybrid>> _a_star;
GridCollisionChecker _collision_checker;
std::unique_ptr<Smoother> _smoother;
rclcpp::Clock::SharedPtr _clock;
rclcpp::Logger _logger{rclcpp::get_logger("SmacPlannerHybrid")};
nav2_costmap_2d::Costmap2D * _costmap;
std::shared_ptr<nav2_costmap_2d::Costmap2DROS> _costmap_ros;
std::unique_ptr<CostmapDownsampler> _costmap_downsampler;
std::string _global_frame, _name;
float _lookup_table_dim;
float _tolerance;
bool _downsample_costmap;
int _downsampling_factor;
unsigned int _angle_quantizations;
double _angle_bin_size;
bool _downsample_costmap;
rclcpp_lifecycle::LifecyclePublisher<nav_msgs::msg::Path>::SharedPtr _raw_plan_publisher;
unsigned int _angle_quantizations;
bool _allow_unknown;
int _max_iterations;
SearchInfo _search_info;
double _max_planning_time;
double _lookup_table_size;
std::string _motion_model_for_search;
MotionModel _motion_model;
rclcpp_lifecycle::LifecyclePublisher<nav_msgs::msg::Path>::SharedPtr _raw_plan_publisher;
std::mutex _mutex;
rclcpp_lifecycle::LifecycleNode::WeakPtr _node;

// Subscription for parameter change
rclcpp::AsyncParametersClient::SharedPtr _parameters_client;
rclcpp::Subscription<rcl_interfaces::msg::ParameterEvent>::SharedPtr _parameter_event_sub;
};

} // namespace nav2_smac_planner
Expand Down
Loading