Apollo 11.0
自动驾驶开放平台
storytelling_container.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 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
18
19namespace apollo {
20namespace prediction {
21
23
24void StoryTellingContainer::Insert(const ::google::protobuf::Message& message) {
25 Stories story_message = dynamic_cast<const Stories&>(message);
26 close_to_junction_.CopyFrom(story_message.close_to_junction());
27}
28
29std::shared_ptr<const hdmap::JunctionInfo> StoryTellingContainer::ADCJunction()
30 const {
31 std::string adc_junction_id = close_to_junction_.id();
32 return PredictionMap::JunctionById(adc_junction_id);
33}
34
35const std::string& StoryTellingContainer::ADCJunctionId() const {
36 return close_to_junction_.id();
37}
38
40 return close_to_junction_.distance();
41}
42
43} // namespace prediction
44} // namespace apollo
static std::shared_ptr< const hdmap::JunctionInfo > JunctionById(const std::string &id)
Get a shared pointer to a junction by junction ID.
std::shared_ptr< const hdmap::JunctionInfo > ADCJunction() const
Get ADC junction
const std::string & ADCJunctionId() const
Get ADC junction id
void Insert(const ::google::protobuf::Message &message) override
Insert a data message into the container
double ADCDistanceToJunction() const
Compute ADC's distance to junction
class register implement
Definition arena_queue.h:37
story telling container
optional CloseToJunction close_to_junction
Definition story.proto:51