Skip to content

Commit be5663c

Browse files
feat(behavior_path_sampling_module): add sampling based planner (#6131)
* first commit: add only necessary bpp code for template Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * change name of file Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete more unrelated code Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * refactor Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * fix manager Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * rebase Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Copy sampling-based planner to behavior path planner Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix include paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * rebase Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * eliminate unused code Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete repeated code Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * add dependencies for bezier and frenet planners Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * [WIP] Made a simple implementation of behavior planning Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * [WIP] added comments on making drivable area Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Just adding functions to test Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * [WIP] Implement Frenet Planner Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * eliminate unused code Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * WIP add debug marker generation Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Comment out for debugging Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * return prev drivable area (temp) Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fixes to compile after rebase Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * WIP update sampling planner param structure to equal behav planner Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Updated param handling Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * changed names of internal_variable to match changes Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * partially solve markers not clearing Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add param update functionality Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * WIP transform frenet to pathwithlaneid Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * set frenet path as output Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Added pruning to select the best frenet path Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Initialize vehicle info Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * calculate properly right and left bound for drivable area check Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * remove debug prints and increase vehicle margin, should be param Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * param changes for driving in small lanes Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * WIP add drivable area expansion from LC Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add drivable area expansion Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * add driveable area Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Make the points on the path have the same z as goal Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * remove print, changes Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * WIP add prev sampling path to calculation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * WIP constraints handler Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Add modifiable hard constraints checking function Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Add modifiable soft constraints checking function Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Add costs for distance to goal and curvature Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * take out todo-> solved Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Added normalized constraints with ref path speed Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * (WIP)isExecution requested update to not execute Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * refactor: move getInitialState to utils Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * refactor: move some functions to utils, get rid of velocity req in generate pathwithlaneid Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * made curvature soft constraint depend on distance to goal Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Add prev path extension Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add calculation of initial lateral velocity and acceleration Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * add calculation of initial lateral velocity and acceleration to path extension Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * WIP Add poses to path to get centerline distance and other stuff Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * clear info_marker_ to prevent performance issues Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * solve dependency issues Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Add cost to avg. distance to centerline Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * added arc lenght based extension limit Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Add running and success conditions, add dist to soft const Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update success transition Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Solve bug with goal not being in any current lanelet Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Add todo comment Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Adjust to centerline cost Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update soft costs Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * tuning Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * add reference path change after sampling planner Success (which might cause a LC Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Added soft constraints weights as parameter to easily tune w/ rqt Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * improve performance by computing arc coordinates before soft constraints check Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * temp Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * temp Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * deleted unusused Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * delete unused Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add plugin export macro Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix launch file Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * WIP still not launching sampling planner plugin Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * solve problem of plugin insertion (duplicated files) Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * partly fix issue with PathwithLaneID not having laneids at the first points Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Modify PreviousOutput path since it is no longer a shared ptr Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Added new change root lanelet request override Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * WIP update collision detection to use rtree Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix bug with index Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Add rtree for collision checking Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * refine soft constraints use remaining length of path max curv and normalize lateral error Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Add sanity check and delete unused code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change success transit function to be more accurate Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * refactor Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * solve bug for path.extend with 0 poses Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add hard check for empty paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix private current_state usage Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Add path reuse at different lenghts Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete old comments use param for path reuse Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * light refactoring Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * pre-commit changes Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * pre-commit add dependency Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete unused dependencies Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * change constraints evaluation to return vectors Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * use tier4 autoware utils function to calc quaternion Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * refactor, use autoware utils Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update comment Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Add documentation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * pre-commit changes Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete unused dependencies and repeated args Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update copyright and fix magic numbers Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete unused header Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * refactoring Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * remove unused dependency Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update copyright and dependency Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update calcBound to work properly Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * solve problem with drivable area Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * remove forced false Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * solve calc bound problem Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * fix compatibility with updates to bpp Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * remove cerr print Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * solve bugs when merging with lane Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * solve issue of sbp not activating Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * remove unused commented code Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> --------- Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> Co-authored-by: Maxime CLEMENT <maxime.clement@tier4.jp>
1 parent 5ed6038 commit be5663c

File tree

19 files changed

+1858
-1
lines changed

19 files changed

+1858
-1
lines changed

launch/tier4_planning_launch/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<arg name="launch_external_request_lane_change_left_module" default="true"/>
1616
<arg name="launch_goal_planner_module" default="true"/>
1717
<arg name="launch_start_planner_module" default="true"/>
18+
<arg name="launch_sampling_planner_module" default="true"/>
1819
<arg name="launch_side_shift_module" default="true"/>
1920

2021
<arg name="launch_crosswalk_module" default="true"/>
@@ -58,6 +59,11 @@
5859
value="$(eval &quot;'$(var behavior_path_planner_launch_modules)' + 'behavior_path_planner::StartPlannerModuleManager, '&quot;)"
5960
if="$(var launch_start_planner_module)"
6061
/>
62+
<let
63+
name="behavior_path_planner_launch_modules"
64+
value="$(eval &quot;'$(var behavior_path_planner_launch_modules)' + 'behavior_path_planner::SamplingPlannerModuleManager, '&quot;)"
65+
if="$(var launch_sampling_planner_module)"
66+
/>
6167
<let
6268
name="behavior_path_planner_launch_modules"
6369
value="$(eval &quot;'$(var behavior_path_planner_launch_modules)' + 'behavior_path_planner::GoalPlannerModuleManager, '&quot;)"
@@ -204,6 +210,7 @@
204210
<param from="$(var behavior_path_planner_lane_change_module_param_path)"/>
205211
<param from="$(var behavior_path_planner_goal_planner_module_param_path)"/>
206212
<param from="$(var behavior_path_planner_start_planner_module_param_path)"/>
213+
<param from="$(var behavior_path_planner_sampling_planner_module_param_path)"/>
207214
<param from="$(var behavior_path_planner_drivable_area_expansion_param_path)"/>
208215
<param from="$(var behavior_path_planner_scene_module_manager_param_path)"/>
209216
<param from="$(var behavior_path_planner_common_param_path)"/>

planning/behavior_path_planner/config/scene_module_manager.param.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@
8282
keep_last: false
8383
priority: 7
8484
max_module_size: 1
85+
86+
sampling_planner:
87+
enable_module: true
88+
enable_rtc: false
89+
enable_simultaneous_execution_as_approved_module: false
90+
enable_simultaneous_execution_as_candidate_module: false
91+
keep_last: true
92+
priority: 16
93+
max_module_size: 1

planning/behavior_path_planner/launch/behavior_path_planner.launch.xml

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<arg name="behavior_path_planner_lane_change_module_param_path"/>
2020
<arg name="behavior_path_planner_goal_planner_module_param_path"/>
2121
<arg name="behavior_path_planner_start_planner_module_param_path"/>
22+
<arg name="behavior_path_planner_sampling_planner_module_param_path"/>
2223
<arg name="behavior_path_planner_drivable_area_expansion_param_path"/>
2324

2425
<node pkg="behavior_path_planner" exec="behavior_path_planner" name="behavior_path_planner" output="screen">
@@ -49,6 +50,7 @@
4950
<param from="$(var behavior_path_planner_avoidance_module_param_path)"/>
5051
<param from="$(var behavior_path_planner_avoidance_by_lc_module_param_path)"/>
5152
<param from="$(var behavior_path_planner_dynamic_avoidance_module_param_path)"/>
53+
<param from="$(var behavior_path_planner_sampling_planner_module_param_path)"/>
5254
<param from="$(var behavior_path_planner_lane_change_module_param_path)"/>
5355
<param from="$(var behavior_path_planner_goal_planner_module_param_path)"/>
5456
<param from="$(var behavior_path_planner_start_planner_module_param_path)"/>

planning/behavior_path_planner/package.xml

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<depend>autoware_perception_msgs</depend>
4444
<depend>behavior_path_planner_common</depend>
4545
<depend>freespace_planning_algorithms</depend>
46+
<depend>frenet_planner</depend>
4647
<depend>geometry_msgs</depend>
4748
<depend>interpolation</depend>
4849
<depend>lane_departure_checker</depend>
@@ -52,6 +53,7 @@
5253
<depend>magic_enum</depend>
5354
<depend>motion_utils</depend>
5455
<depend>object_recognition_utils</depend>
56+
<depend>path_sampler</depend>
5557
<depend>planning_test_utils</depend>
5658
<depend>pluginlib</depend>
5759
<depend>rclcpp</depend>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
project(behavior_path_sampling_planner_module)
3+
4+
find_package(autoware_cmake REQUIRED)
5+
autoware_package()
6+
pluginlib_export_plugin_description_file(behavior_path_planner plugins.xml)
7+
8+
ament_auto_add_library(${PROJECT_NAME} SHARED
9+
src/sampling_planner_module.cpp
10+
src/manager.cpp
11+
)
12+
13+
ament_auto_package(INSTALL_TO_SHARE config)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Behavior Path Sampling Based Planner
2+
3+
WARNING: This module is experimental and has not been properly tested on a real vehicle, use only on simulations.
4+
5+
## Purpose
6+
7+
This package implements a node that uses sampling based planning to generate a drivable trajectory for the behavior path planner. It is heavily based off the [sampling_based_planner module](https://github.com/autowarefoundation/autoware.universe/tree/main/planning/sampling_based_planner).
8+
9+
## Features
10+
11+
This package is able to:
12+
13+
- create a smooth trajectory to avoid static obstacles.
14+
- guarantees the generated trajectory (if any) complies with customizable hard constraints.
15+
- transitions to a success state after the ego vehicle merges to its goal lane.
16+
- re-use previously generated outputs to re-sample new alternative paths
17+
18+
Note that the velocity is just taken over from the input path.
19+
20+
## Algorithm
21+
22+
Sampling based planning is decomposed into 3 successive steps:
23+
24+
1. Sampling: candidate trajectories are generated.
25+
2. Pruning: invalid candidates are discarded.
26+
3. Selection: the best remaining valid candidate is selected.
27+
28+
### Sampling
29+
30+
Candidate trajectories are generated based on the current ego state and some target state.
31+
1 sampling algorithms is currently implemented: polynomials in the frenet frame.
32+
33+
### Pruning
34+
35+
The validity of each candidate trajectory is checked using a set of hard constraints.
36+
37+
- collision: ensure no collision with static obstacles;
38+
- curvature: ensure smooth curvature;
39+
- drivable area: ensure the trajectory stays within the drivable area.
40+
41+
### Selection
42+
43+
Among the valid candidate trajectories, the _best_ one is determined using a set of soft constraints (i.e., objective functions).
44+
45+
- curvature: prefer smoother trajectories;
46+
- length: prefer trajectories with longer remaining path length;
47+
- lateral deviation: prefer trajectories close to the goal.
48+
49+
Each soft constraint is associated with a weight to allow tuning of the preferences.
50+
51+
## Limitations
52+
53+
The quality of the candidates generated with polynomials in frenet frame greatly depend on the reference path.
54+
If the reference path is not smooth, the resulting candidates will probably be un-drivable.
55+
56+
Failure to find a valid trajectory current results in a suddenly stopping trajectory.
57+
58+
The module has troubles generating paths that converge rapidly to the goal lanelet. Basically, after overcoming all obstacles, the module should prioritize paths that rapidly make the ego vehicle converge back to its goal lane (ie. paths with low average and final lateral deviation). However, this does not function properly at the moment.
59+
60+
Detection of proper merging can be rough: Sometimes, the module when detects that the ego has converged on the goal lanelet and that there are no more obstacles, the planner transitions to the goal planner, but the transition is not very smooth and could cause discomfort for the user.
61+
62+
## Future works
63+
64+
Some possible improvements for this module include:
65+
66+
-Implementing a dynamic weight tuning algorithm: Dynamically change weights depending on the scenario (ie. to prioritize more the paths with low curvature and low avg. lat. deviation after all obstacles have been avoided).
67+
68+
-Implementing multi-objective optimization to improve computing time and possibly make a more dynamic soft constraints weight tuning. [Related publication](https://ieeexplore.ieee.org/abstract/document/10180226).
69+
70+
-Implement bezier curves as another method to obtain samples, see the [sampling_based_planner module](https://github.com/autowarefoundation/autoware.universe/tree/main/planning/sampling_based_planner).
71+
72+
-Explore the possibility to replace several or other behavior path modules with the sampling based behavior path module.
73+
74+
-Perform real-life tests of this module once it has matured and some of its limitations have been solved.
75+
76+
## Other possibilities
77+
78+
The module is currently aimed at creating paths for static obstacle avoidance. However, the nature of sampling planner allows this module to be expanded or repurposed to other tasks such as lane changes, dynamic avoidance and general reaching of a goal. It is possible, with a good dynamic/scenario dependant weight tuning to use the sampling planning approach as a replacement for the other behavior path modules, assuming good candidate pruning and good soft constraints weight tuning.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**:
2+
ros__parameters:
3+
start_planner:
4+
max_curvature: 0.1
5+
min_curvature: -0.1
6+
lateral_deviation_weight: 1.0
7+
length_weight: 1.0
8+
curvature_weight: 1.0
9+
enable_frenet: true
10+
enable_bezier: false
11+
resolution: 0.5
12+
previous_path_reuse_points_nb: 2
13+
nb_target_lateral_positions: {10.0, 20.0}
14+
target_lengths: {-2.0, -1.0, 0.0, 1.0, 2.0}
15+
target_lateral_positions: 2
16+
target_lateral_velocities: {-0.1, 0.0, 0.1}
17+
target_lateral_accelerations: {0.0}
18+
force_zero_deviation: true
19+
force_zero_heading: true
20+
smooth_reference: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright 2024 TIER IV, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef BEHAVIOR_PATH_SAMPLING_PLANNER_MODULE__MANAGER_HPP_
16+
#define BEHAVIOR_PATH_SAMPLING_PLANNER_MODULE__MANAGER_HPP_
17+
18+
#include "behavior_path_planner_common/interface/scene_module_manager_interface.hpp"
19+
#include "behavior_path_sampling_planner_module/sampling_planner_module.hpp"
20+
#include "behavior_path_sampling_planner_module/sampling_planner_parameters.hpp"
21+
22+
#include <rclcpp/rclcpp.hpp>
23+
24+
#include <memory>
25+
#include <string>
26+
#include <unordered_map>
27+
#include <vector>
28+
29+
namespace behavior_path_planner
30+
{
31+
32+
class SamplingPlannerModuleManager : public SceneModuleManagerInterface
33+
{
34+
public:
35+
SamplingPlannerModuleManager() : SceneModuleManagerInterface{"sampling_planner"} {}
36+
void init(rclcpp::Node * node) override;
37+
38+
std::unique_ptr<SceneModuleInterface> createNewSceneModuleInstance() override
39+
{
40+
return std::make_unique<SamplingPlannerModule>(
41+
name_, *node_, parameters_, rtc_interface_ptr_map_,
42+
objects_of_interest_marker_interface_ptr_map_);
43+
}
44+
45+
void updateModuleParams(
46+
[[maybe_unused]] const std::vector<rclcpp::Parameter> & parameters) override;
47+
48+
private:
49+
std::shared_ptr<SamplingPlannerParameters> parameters_;
50+
};
51+
52+
} // namespace behavior_path_planner
53+
54+
#endif // BEHAVIOR_PATH_SAMPLING_PLANNER_MODULE__MANAGER_HPP_

0 commit comments

Comments
 (0)