CARLA
client/Junction.h
Go to the documentation of this file.
1 // Copyright (c) 2020 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/Memory.h"
10 #include "carla/NonCopyable.h"
11 #include "carla/road/Junction.h"
12 #include "carla/road/RoadTypes.h"
13 #include "carla/geom/BoundingBox.h"
14 #include "carla/client/Waypoint.h"
15 
16 #include <vector>
17 
18 namespace carla {
19 namespace client {
20 
21  class Map;
22 
23  class Junction
24  : public EnableSharedFromThis<Junction>,
25  private NonCopyable
26  {
27  public:
28 
30  return _id;
31  }
32 
33  std::vector<std::pair<SharedPtr<Waypoint>,SharedPtr<Waypoint>>> GetWaypoints(
35 
37 
38  private:
39 
40  friend class Map;
41 
42  Junction(SharedPtr<const Map> parent, const road::Junction *junction);
43 
45 
47 
49  };
50 
51 } // namespace client
52 } // namespace carla
SharedPtr< const Map > _parent
std::vector< std::pair< SharedPtr< Waypoint >, SharedPtr< Waypoint > > > GetWaypoints(road::Lane::LaneType type=road::Lane::LaneType::Driving) const
Definition: Junction.cpp:19
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
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
int32_t JuncId
Definition: RoadTypes.h:17
Junction(SharedPtr< const Map > parent, const road::Junction *junction)
Definition: Junction.cpp:14
LaneType
Can be used as flags.
Definition: Lane.h:29
geom::BoundingBox _bounding_box
carla::road::JuncId GetId() const
geom::BoundingBox GetBoundingBox() const
Definition: Junction.cpp:24
Inherit (privately) to suppress copy/move construction and assignment.