CARLA
 
载入中...
搜索中...
未找到
LaneInvasionEvent.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
10
11#include "carla/client/Actor.h"
13#include "carla/rpc/ActorId.h"
14
15#include <vector>
16
17namespace carla {
18namespace sensor {
19namespace data {
20
21 /// A change of lane event.
23 public:
24
26
28 size_t frame,
29 double timestamp,
30 const rpc::Transform &sensor_transform,
31 ActorId parent,
32 std::vector<LaneMarking> crossed_lane_markings)
33 : SensorData(frame, timestamp, sensor_transform),
34 _parent(parent),
35 _crossed_lane_markings(std::move(crossed_lane_markings)) {}
36
37 /// Get "self" actor. Actor that invaded another lane.
39
40 /// List of lane markings that have been crossed.
41 const std::vector<LaneMarking> &GetCrossedLaneMarkings() const {
43 }
44
45 private:
46
48
49 std::vector<LaneMarking> _crossed_lane_markings;
50 };
51
52} // namespace data
53} // namespace sensor
54} // namespace carla
Base class for all the objects containing data generated by a sensor.
Definition SensorData.h:22
SharedPtr< client::Actor > GetActor() const
Get "self" actor. Actor that invaded another lane.
LaneInvasionEvent(size_t frame, double timestamp, const rpc::Transform &sensor_transform, ActorId parent, std::vector< LaneMarking > crossed_lane_markings)
const std::vector< LaneMarking > & GetCrossedLaneMarkings() const
List of lane markings that have been crossed.
std::vector< LaneMarking > _crossed_lane_markings
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
rpc::ActorId ActorId
Definition ActorId.h:18