Apollo 11.0
自动驾驶开放平台
dummy_algorithms.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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 *****************************************************************************/
17
19
20namespace apollo {
21namespace perception {
22namespace fusion {
23
24// class DummyFusionSystem implementation
26 algorithm::SensorManager::Instance()->Init();
27 return true;
28}
29
31 std::vector<base::ObjectPtr>* fused_objects) {
32 if (fused_objects == nullptr) {
33 return false;
34 }
35
36 fused_objects->clear();
37 bool is_main_sensor = algorithm::SensorManager::Instance()->IsMainSensor(
38 sensor_frame->sensor_info.name);
39 if (!is_main_sensor) {
40 return true;
41 }
42
43 fused_objects->resize(sensor_frame->objects.size());
44 for (size_t i = 0; i < sensor_frame->objects.size(); i++) {
45 (*fused_objects)[i] = sensor_frame->objects[i];
46 }
47 return true;
48}
49
50// class DummyDataAssociation implementation
52 return true;
53}
54
56 SensorFramePtr sensor_measurements,
57 ScenePtr scene,
58 AssociationResult* association_result) {
59 return true;
60}
61
62// class DummyTracker implementation
64 return true;
65}
66
68 const SensorObjectPtr measurement,
69 double target_timestamp) {}
70
72 const std::string& sensor_id,
73 double measurement_timestamp,
74 double target_timestamp) {}
75
77
78} // namespace fusion
79} // namespace perception
80} // namespace apollo
#define FUSION_REGISTER_FUSIONSYSTEM(name)
bool Init(const AssociationInitOptions &options) override
Init base data association config
bool Associate(const AssociationOptions &options, SensorFramePtr sensor_measurements, ScenePtr scene, AssociationResult *association_result) override
associate sensor measurements with global scene
bool Fuse(const base::FrameConstPtr &sensor_frame, std::vector< base::ObjectPtr > *fused_objects) override
fuse a sensor frame
bool Init(const FusionInitOptions &options) override
Init base fusion system config
void UpdateWithoutMeasurement(const TrackerOptions &options, const std::string &sensor_id, double measurement_timestamp, double target_timestamp) override
update track state without measurement
bool Init(TrackPtr track, SensorObjectPtr measurement) override
Init tracker with measurement
void UpdateWithMeasurement(const TrackerOptions &options, const SensorObjectPtr measurement, double target_timestamp) override
update track state with measurement
std::shared_ptr< const Frame > FrameConstPtr
Definition frame.h:61
std::shared_ptr< SensorObject > SensorObjectPtr
std::shared_ptr< SensorFrame > SensorFramePtr
std::shared_ptr< Track > TrackPtr
Definition track.h:397
std::shared_ptr< Scene > ScenePtr
Definition scene.h:88
class register implement
Definition arena_queue.h:37