CARLA
 
载入中...
搜索中...
未找到
client/detail/ActorState.h
浏览该文件的文档.
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
7#pragma once
8
9#include "carla/NonCopyable.h"
10#include "carla/client/World.h"
13#include "carla/rpc/Actor.h"
14
15namespace carla {
16namespace client {
17namespace detail {
18
19 class ActorFactory;
20
21 /// Internal state of an Actor.
23 public:
24
25 ActorId GetId() const {
26 return _description.id;
27 }
28
29 const std::string &GetTypeId() const {
31 }
32
33 const std::string &GetDisplayId() const {
34 return _display_id;
35 }
36
39 }
40
41 const std::vector<uint8_t> &GetSemanticTags() const {
43 }
44
46
47 World GetWorld() const {
48 return World{_episode};
49 }
50
51 const std::vector<ActorAttributeValue> &GetAttributes() const
52 {
53 return _attributes;
54 }
55
56 protected:
57
58 explicit ActorState(rpc::Actor description, EpisodeProxy episode);
59
63
65 return _description;
66 }
67
69 return _episode;
70 }
71
72 const EpisodeProxy &GetEpisode() const {
73 return _episode;
74 }
75
76 private:
77
78 friend class Simulator;
79
81
83
84 std::string _display_id;
85
86 std::vector<ActorAttributeValue> _attributes;
87 };
88
89} // namespace detail
90
91 /// Used to initialize Actor classes. Only the ActorFactory can create this
92 /// object, thus only the ActorFactory can create actors.
94 public:
96 private:
99 };
100
101} // namespace client
102} // namespace carla
Inherit (privately) to suppress copy construction and assignment.
Used to initialize Actor classes.
ActorInitializer(ActorInitializer &&)=default
const std::vector< uint8_t > & GetSemanticTags() const
std::vector< ActorAttributeValue > _attributes
const geom::BoundingBox & GetBoundingBox() const
SharedPtr< Actor > GetParent() const
const std::vector< ActorAttributeValue > & GetAttributes() const
const rpc::Actor & GetActorDescription() const
ActorState(rpc::Actor description, EpisodeProxy episode)
const std::string & GetDisplayId() const
const EpisodeProxy & GetEpisode() const
Connects and controls a CARLA Simulator.
Definition Simulator.h:52
std::vector< uint8_t > semantic_tags
Definition rpc/Actor.h:33
ActorId parent_id
Definition rpc/Actor.h:27
ActorDescription description
Definition rpc/Actor.h:29
geom::BoundingBox bounding_box
Definition rpc/Actor.h:31
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
Definition Memory.h:20