CARLA
 
载入中...
搜索中...
未找到
ActorState.cpp
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
8
9#include <string>
10#include <iterator>
11
12namespace carla {
13namespace client {
14namespace detail {
15
17 rpc::Actor description,
18 EpisodeProxy episode)
19 : _description(std::move(description)),
20 _episode(std::move(episode)),
21 _display_id([](const auto &desc) {
22 using namespace std::string_literals;
23 return
24 "Actor "s +
25 std::to_string(desc.id) +
26 " (" + desc.description.id + ')';
27 }(_description)),
28 _attributes(_description.description.attributes.begin(), _description.description.attributes.end())
29 {}
30
31 SharedPtr<Actor> ActorState::GetParent() const {
32 auto parent_id = GetParentId();
33 return parent_id != 0u ? GetWorld().GetActor(parent_id) : nullptr;
34 }
35
36} // namespace detail
37} // namespace client
38} // namespace carla
ActorState(rpc::Actor description, EpisodeProxy episode)
EpisodeProxyImpl< EpisodeProxyPointerType::Strong > EpisodeProxy
_attributes(_description.description.attributes.begin(), _description.description.attributes.end())
CARLA模拟器的主命名空间。
Definition Carla.cpp:139
boost::shared_ptr< T > SharedPtr
使用这个SharedPtr(boost::shared_ptr)以保持与boost::python的兼容性, 但未来如果可能的话,我们希望能为std::shared_ptr制作一个Python适配器。
Definition Memory.h:19
包含CARLA客户端相关类和函数的命名空间。