Apollo  6.0
Open source self driving car software
trans_tools.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 
17 #pragma once
18 
19 #include <cmath>
20 #include <memory>
21 #include <string>
22 #include <thread>
23 #include <vector>
24 
26 
27 namespace apollo {
28 namespace v2x {
29 namespace ft {
30 
31 base::Object Pb2Object(const PerceptionObstacle &obstacle,
32  const std::string &frame_id);
33 void Pb2Object(const PerceptionObstacle &obstacle, base::Object *object,
34  const std::string &frame_id, double timestamp_object = 0.0);
35 
36 void V2xPb2Object(const V2XObstacle &obstacle, base::Object *object,
37  const std::string &frame_id, double timestamp_object);
38 
39 void CarstatusPb2Object(const LocalizationEstimate &carstatus,
40  base::Object *object, const std::string &frame_id);
41 
42 double Pbs2Objects(const PerceptionObstacles &obstacles,
43  std::vector<base::Object> *objects,
44  const std::string &frame_id);
45 
46 double V2xPbs2Objects(const V2XObstacles &obstacles,
47  std::vector<base::Object> *objects,
48  const std::string &frame_id);
49 
50 PerceptionObstacle Object2Pb(const base::Object &object);
51 void FillObjectPolygonFromBBox3D(PerceptionObstacle *object_ptr);
52 void Object2Pb(const base::Object &object, PerceptionObstacle *obstacle);
53 
54 void Object2V2xPb(const base::Object &object, V2XObstacle *obstacle);
55 void Objects2Pbs(const std::vector<base::Object> &objects,
56  std::shared_ptr<PerceptionObstacles> obstacles);
57 
58 void Objects2V2xPbs(const std::vector<base::Object> &objects,
59  std::shared_ptr<V2XObstacles> obstacles);
60 
61 } // namespace ft
62 } // namespace v2x
63 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
double Pbs2Objects(const PerceptionObstacles &obstacles, std::vector< base::Object > *objects, const std::string &frame_id)
void Objects2V2xPbs(const std::vector< base::Object > &objects, std::shared_ptr< V2XObstacles > obstacles)
void CarstatusPb2Object(const LocalizationEstimate &carstatus, base::Object *object, const std::string &frame_id)
PerceptionObstacle Object2Pb(const base::Object &object)
void FillObjectPolygonFromBBox3D(PerceptionObstacle *object_ptr)
void Object2V2xPb(const base::Object &object, V2XObstacle *obstacle)
void Objects2Pbs(const std::vector< base::Object > &objects, std::shared_ptr< PerceptionObstacles > obstacles)
double V2xPbs2Objects(const V2XObstacles &obstacles, std::vector< base::Object > *objects, const std::string &frame_id)
void V2xPb2Object(const V2XObstacle &obstacle, base::Object *object, const std::string &frame_id, double timestamp_object)
base::Object Pb2Object(const PerceptionObstacle &obstacle, const std::string &frame_id)