CARLA
RssResponse.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2020 Intel Corporation
2 //
3 // This work is licensed under the terms of the MIT license.
4 // For a copy, see <https://opensource.org/licenses/MIT>.
5 
6 #pragma once
7 
8 #include "carla/rss/RssCheck.h"
10 
11 namespace carla {
12 namespace sensor {
13 namespace data {
14 
15 /// A RSS Response
16 class RssResponse : public SensorData {
17 public:
18  explicit RssResponse(size_t frame_number, double timestamp, const rpc::Transform &sensor_transform,
19  const bool &response_valid, const ::ad::rss::state::ProperResponse &response,
20  const ::ad::rss::state::RssStateSnapshot &rss_state_snapshot,
21  const ::ad::rss::situation::SituationSnapshot &situation_snapshot,
22  const ::ad::rss::world::WorldModel &world_model,
23  const carla::rss::EgoDynamicsOnRoute &ego_dynamics_on_route)
24  : SensorData(frame_number, timestamp, sensor_transform),
25  _response_valid(response_valid),
26  _response(response),
27  _rss_state_snapshot(rss_state_snapshot),
28  _situation_snapshot(situation_snapshot),
29  _world_model(world_model),
30  _ego_dynamics_on_route(ego_dynamics_on_route) {}
31 
32  bool GetResponseValid() const {
33  return _response_valid;
34  }
35 
36  const ::ad::rss::state::ProperResponse &GetProperResponse() const {
37  return _response;
38  }
39 
40  const ::ad::rss::state::RssStateSnapshot &GetRssStateSnapshot() const {
41  return _rss_state_snapshot;
42  }
43 
44  const ::ad::rss::situation::SituationSnapshot &GetSituationSnapshot() const {
45  return _situation_snapshot;
46  }
47 
48  const ::ad::rss::world::WorldModel &GetWorldModel() const {
49  return _world_model;
50  }
51 
54  }
55 
56 private:
57  /*!
58  * The validity of RSS calculation.
59  */
61 
62  ::ad::rss::state::ProperResponse _response;
63 
64  ::ad::rss::state::RssStateSnapshot _rss_state_snapshot;
65 
66  ::ad::rss::situation::SituationSnapshot _situation_snapshot;
67 
68  ::ad::rss::world::WorldModel _world_model;
69 
71 };
72 
73 } // namespace data
74 } // namespace sensor
75 } // namespace carla
::ad::rss::state::ProperResponse _response
Definition: RssResponse.h:62
struct defining the ego vehicles current dynamics in respect to the current route ...
Definition: RssCheck.h:40
const carla::rss::EgoDynamicsOnRoute & GetEgoDynamicsOnRoute() const
Definition: RssResponse.h:52
const ::ad::rss::state::ProperResponse & GetProperResponse() const
Definition: RssResponse.h:36
::ad::rss::situation::SituationSnapshot _situation_snapshot
Definition: RssResponse.h:66
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
RssResponse(size_t frame_number, double timestamp, const rpc::Transform &sensor_transform, const bool &response_valid, const ::ad::rss::state::ProperResponse &response, const ::ad::rss::state::RssStateSnapshot &rss_state_snapshot, const ::ad::rss::situation::SituationSnapshot &situation_snapshot, const ::ad::rss::world::WorldModel &world_model, const carla::rss::EgoDynamicsOnRoute &ego_dynamics_on_route)
Definition: RssResponse.h:18
const ::ad::rss::situation::SituationSnapshot & GetSituationSnapshot() const
Definition: RssResponse.h:44
carla::rss::EgoDynamicsOnRoute _ego_dynamics_on_route
Definition: RssResponse.h:70
::ad::rss::state::RssStateSnapshot _rss_state_snapshot
Definition: RssResponse.h:64
const ::ad::rss::state::RssStateSnapshot & GetRssStateSnapshot() const
Definition: RssResponse.h:40
Base class for all the objects containing data generated by a sensor.
Definition: SensorData.h:20
const ::ad::rss::world::WorldModel & GetWorldModel() const
Definition: RssResponse.h:48
::ad::rss::world::WorldModel _world_model
Definition: RssResponse.h:68