Apollo 11.0
自动驾驶开放平台
trajectory_stitcher.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of 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,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
21#pragma once
22
23#include <string>
24#include <utility>
25#include <vector>
26
27#include "modules/common/vehicle_state/proto/vehicle_state.pb.h"
28#include "modules/common_msgs/basic_msgs/pnc_point.pb.h"
29#include "modules/common_msgs/control_msgs/control_interactive_msg.pb.h"
30
33
34namespace apollo {
35namespace planning {
36
38 public:
40
42 const double x_diff, const double y_diff, const double theta_diff,
43 PublishableTrajectory* prev_trajectory);
44
45 static std::vector<common::TrajectoryPoint> ComputeStitchingTrajectory(
46 const canbus::Chassis& vehicle_chassis,
47 const common::VehicleState& vehicle_state, const double current_timestamp,
48 const double planning_cycle_time, const size_t preserved_points_num,
49 const bool replan_by_offset, const PublishableTrajectory* prev_trajectory,
50 std::string* replan_reason,
51 const control::ControlInteractiveMsg& control_interactive_msg);
52
53 static std::vector<common::TrajectoryPoint> ComputeReinitStitchingTrajectory(
54 const double planning_cycle_time,
55 const common::VehicleState& vehicle_state);
56
58 const common::VehicleState& vehicle_state, const double current_timestamp,
59 const PublishableTrajectory* prev_trajectory, std::string* replan_reason,
60 size_t* time_matched_index);
61
63 const double current_timestamp, std::string* replan_reason,
64 const control::ControlInteractiveMsg& control_interactive_msg);
65
66 static std::vector<common::TrajectoryPoint>
68 const double planning_cycle_time,
69 const common::VehicleState& vehicle_state,
70 const common::TrajectoryPoint& time_match_point,
71 const control::ControlInteractiveMsg& control_interactive_msg);
72
73 private:
74 static std::pair<double, double> ComputePositionProjection(
75 const double x, const double y,
76 const common::TrajectoryPoint& matched_trajectory_point);
77
78 static common::TrajectoryPoint ComputeTrajectoryPointFromVehicleState(
79 const double planning_cycle_time,
80 const common::VehicleState& vehicle_state);
81};
82
83} // namespace planning
84} // namespace apollo
static std::vector< common::TrajectoryPoint > ComputeStitchingTrajectory(const canbus::Chassis &vehicle_chassis, const common::VehicleState &vehicle_state, const double current_timestamp, const double planning_cycle_time, const size_t preserved_points_num, const bool replan_by_offset, const PublishableTrajectory *prev_trajectory, std::string *replan_reason, const control::ControlInteractiveMsg &control_interactive_msg)
static std::vector< common::TrajectoryPoint > ComputeControlInteractiveStitchingTrajectory(const double planning_cycle_time, const common::VehicleState &vehicle_state, const common::TrajectoryPoint &time_match_point, const control::ControlInteractiveMsg &control_interactive_msg)
static bool need_replan_by_necessary_check(const common::VehicleState &vehicle_state, const double current_timestamp, const PublishableTrajectory *prev_trajectory, std::string *replan_reason, size_t *time_matched_index)
static std::vector< common::TrajectoryPoint > ComputeReinitStitchingTrajectory(const double planning_cycle_time, const common::VehicleState &vehicle_state)
static void TransformLastPublishedTrajectory(const double x_diff, const double y_diff, const double theta_diff, PublishableTrajectory *prev_trajectory)
static bool need_replan_by_control_interactive(const double current_timestamp, std::string *replan_reason, const control::ControlInteractiveMsg &control_interactive_msg)
Planning module main class.
class register implement
Definition arena_queue.h:37