Skip to content

Commit

Permalink
config - added path_planning_period parameter in the "General" se…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
rayvburn committed Jan 19, 2024
1 parent 992fe6a commit 6be86f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/humap_local_planner/humap_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ namespace humap_local_planner {
struct GeneralParams {
/// Whether to use planning (True) or proactive approach (False) for trajectory generation
bool planning_approach = true;
/// How often the global path is expected to be updated
double path_planning_period = 0.5;
/// The amount of time to roll trajectories out for in seconds
double sim_time = 1.2;
/// The granularity with which to check for collisions along each trajectory in meters
Expand Down
12 changes: 12 additions & 0 deletions src/humap_config_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ void HumapConfigROS::loadFromParamServer(const ros::NodeHandle& nh) {
);
}

std::string planner_frequency_param;
nh.searchParam("planner_frequency", planner_frequency_param);
double planner_frequency = 2.0;
if (nh.param(planner_frequency_param, planner_frequency, planner_frequency)) {
general_->path_planning_period = 1.0 / planner_frequency;
ROS_INFO(
"Path planning period set to %6.3f s. Computed based on `planner_frequency` which is %6.3f Hz",
general_->path_planning_period,
planner_frequency
);
}

// Limits
// default values based on PAL's TIAGo config
nh.param("max_vel_trans", limits_->max_vel_trans, 1.5);
Expand Down

0 comments on commit 6be86f3

Please sign in to comment.