Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
tree_planner.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 LEIDOS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16
17#ifndef __ARBITRATOR_INCLUDE_TREE_PLANNER_HPP__
18#define __ARBITRATOR_INCLUDE_TREE_PLANNER_HPP__
19
20#include <memory>
21#include <carma_planning_msgs/msg/maneuver_plan.hpp>
22#include "planning_strategy.hpp"
23#include "cost_function.hpp"
25#include "search_strategy.hpp"
26#include "vehicle_state.hpp"
27#include <rclcpp/rclcpp.hpp>
28
29namespace arbitrator
30{
41 {
42 public:
50 TreePlanner(std::shared_ptr<CostFunction> cf,
51 std::shared_ptr<NeighborGenerator> ng,
52 std::shared_ptr<SearchStrategy> ss,
53 rclcpp::Duration target):
57 target_plan_duration_(target) {};
58
65 carma_planning_msgs::msg::ManeuverPlan generate_plan(const VehicleState& start_state);
66 protected:
67 std::shared_ptr<CostFunction> cost_function_;
68 std::shared_ptr<NeighborGenerator> neighbor_generator_;
69 std::shared_ptr<SearchStrategy> search_strategy_;
70 rclcpp::Duration target_plan_duration_;
71 };
72}
73
74#endif //__ARBITRATOR_INCLUDE_TREE_PLANNER_HPP__
Generic interface representing a strategy for arriving at a maneuver plan.
Implementation of PlanningStrategy using a generic tree search algorithm.
rclcpp::Duration target_plan_duration_
TreePlanner(std::shared_ptr< CostFunction > cf, std::shared_ptr< NeighborGenerator > ng, std::shared_ptr< SearchStrategy > ss, rclcpp::Duration target)
Tree planner constructor.
carma_planning_msgs::msg::ManeuverPlan generate_plan(const VehicleState &start_state)
Utilize the configured cost function, neighbor generator, and search strategy, to generate a plan by ...
std::shared_ptr< SearchStrategy > search_strategy_
std::shared_ptr< NeighborGenerator > neighbor_generator_
std::shared_ptr< CostFunction > cost_function_
Struct defining the vehicle state required for maneuver planning.