$darkmode
osii::OsiOmniSensor Class Referenceabstract

#include <osi_omni_sensor.hpp>

Inheritance diagram for osii::OsiOmniSensor:

Public Member Functions

 OsiOmniSensor (std::unique_ptr< OsiTransceiver > &&osi_transceiver, uint64_t owner_id)
 
 OsiOmniSensor (OsiTransceiver *osi_transceiver, uint64_t owner_id)
 
virtual void step (const cloe::Sync &s, const bool &restart, cloe::Duration &sim_time)
 
virtual void process (const osi3::Timestamp &timestamp)
 
virtual void process (osi3::SensorData *osi_sd, cloe::Duration &sim_time)
 
virtual void process (const osi3::SensorView &osi_sv)
 
virtual void process (const bool has_veh_data, const osi3::HostVehicleData &osi_hv, const osi3::MovingObject &osi_ego)
 
virtual void process (const bool has_eh, const osi3::DetectedEntityHeader &osi_eh, const osi3::DetectedMovingObject &osi_mo)
 
void mock_detected_lane_boundaries ()
 
void from_osi_boundary_points (const osi3::LaneBoundary &osi_lb, cloe::LaneBoundary &lb)
 
virtual void store_ego_object (std::shared_ptr< cloe::Object > ego_obj)=0
 
virtual void store_object (std::shared_ptr< cloe::Object > obj)=0
 
virtual void store_lane_boundary (const cloe::LaneBoundary &lb)=0
 
virtual void store_sensor_meta_data (const Eigen::Vector3d &bbcenter_to_veh_origin, const Eigen::Vector3d &ego_dimensions)=0
 
cloe::Duration osi_timestamp_to_simtime (const osi3::Timestamp &timestamp) const
 
virtual Eigen::Isometry3d get_static_mounting_position (const Eigen::Vector3d &bbcenter_to_veh_origin, const Eigen::Vector3d &ego_dimensions)=0
 
virtual void set_mock_conf (std::shared_ptr< const SensorMockConf > mock)=0
 
SensorMockLevel get_mock_level (SensorMockTarget trg_type) const
 

Protected Attributes

std::unique_ptr< OsiTransceiverosi_comm_
 
std::unique_ptr< OsiGroundTruthground_truth_
 Access to osi ground truth, e.g. for mock-ups.
 
uint64_t owner_id_
 Id of the sensor's owner (ego).
 
Eigen::Isometry3d osi_ego_pose_
 Store ego pose (reference point is rear axle center, not ground level).
 
Eigen::Isometry3d osi_sensor_pose_
 Store sensor pose relative to the ego frame (rear axle center, not ground level).
 
cloe::Duration init_time_ = cloe::Duration(-1)
 Initial simulation time.
 
std::shared_ptr< const SensorMockConf > mock_ {nullptr}
 Use alternative source for required data or overwrite incoming data, if requested.
 

Friends

void to_json (cloe::Json &j, const OsiOmniSensor &c)
 

Detailed Description

Configure sensor mock level. Base class for an OSI sensor which is connected via TCP.

Constructor & Destructor Documentation

◆ OsiOmniSensor() [1/2]

osii::OsiOmniSensor::OsiOmniSensor ( std::unique_ptr< OsiTransceiver > &&  osi_transceiver,
uint64_t  owner_id 
)
inline

Create a new instance of OsiOmniSensor with the given OsiTransceiver.

◆ OsiOmniSensor() [2/2]

osii::OsiOmniSensor::OsiOmniSensor ( OsiTransceiver osi_transceiver,
uint64_t  owner_id 
)
inline

Create a new instance of OsiOmniSensor with the given new OsiTransceiver.

WARNING: If you use this constructor, please realize that OsiOmniSensor takes ownership of the pointer you pass in.

Member Function Documentation

◆ get_static_mounting_position()

virtual Eigen::Isometry3d osii::OsiOmniSensor::get_static_mounting_position ( const Eigen::Vector3d &  bbcenter_to_veh_origin,
const Eigen::Vector3d &  ego_dimensions 
)
pure virtual

Get sensor pose in OSI vehicle reference frame, e.g. from simulator configuration.

Implemented in vtd::VtdOsiSensor.

◆ osi_timestamp_to_simtime()

cloe::Duration osii::OsiOmniSensor::osi_timestamp_to_simtime ( const osi3::Timestamp &  timestamp) const

Get the current simulation time (t-t0).

Here is the call graph for this function:

◆ process() [1/5]

void osii::OsiOmniSensor::process ( const bool  has_eh,
const osi3::DetectedEntityHeader &  osi_eh,
const osi3::DetectedMovingObject &  osi_mo 
)
virtual

Translate OSI detected moving object information to Cloe data objects.

Parameters
osi_ehDetectedEntityHeader message to be processed (if available).
osi_moDetectedMovingObject message to be processed.

◆ process() [2/5]

void osii::OsiOmniSensor::process ( const bool  has_veh_data,
const osi3::HostVehicleData &  osi_hv,
const osi3::MovingObject &  osi_ego 
)
virtual

Translate OSI ego base information made available to the sensor model from other components, or use ground truth.

Parameters
osi_hvHostVehicleData message to be processed (if available).
osi_moMovingObject (ground truth) used as fallback.

◆ process() [3/5]

void osii::OsiOmniSensor::process ( const osi3::SensorView &  osi_sv)
virtual

Translate OSI SensorView to Cloe data objects.

Parameters
osi_svSensorView message to be processed, including ground truth.

◆ process() [4/5]

void osii::OsiOmniSensor::process ( const osi3::Timestamp &  timestamp)
virtual

Store the initial timestamp. Note that the osi time does not necessarily start at zero.

Here is the call graph for this function:

◆ process() [5/5]

void osii::OsiOmniSensor::process ( osi3::SensorData *  osi_sd,
cloe::Duration sim_time 
)
virtual

Translate OSI SensorData to Cloe data objects.

Parameters
osi_sdSensorData message to be processed.
sim_timeSimulation time to be set.

◆ step()

void osii::OsiOmniSensor::step ( const cloe::Sync s,
const bool &  restart,
cloe::Duration sim_time 
)
virtual

Receive and process the incoming messages.

◆ store_ego_object()

virtual void osii::OsiOmniSensor::store_ego_object ( std::shared_ptr< cloe::Object ego_obj)
pure virtual

Store the ego object that should be passed to Cloe.

Parameters
ego_objEgo object to be stored.

Implemented in vtd::VtdOsiSensor.

◆ store_lane_boundary()

virtual void osii::OsiOmniSensor::store_lane_boundary ( const cloe::LaneBoundary lb)
pure virtual

Store a detected lane boundary in a map of Cloe data objects.

Parameters
lbLane boundary to be stored.

Implemented in vtd::VtdOsiSensor.

◆ store_object()

virtual void osii::OsiOmniSensor::store_object ( std::shared_ptr< cloe::Object obj)
pure virtual

Store a detected object in a list of Cloe data objects.

Parameters
objObject to be stored.

Implemented in vtd::VtdOsiSensor.

◆ store_sensor_meta_data()

virtual void osii::OsiOmniSensor::store_sensor_meta_data ( const Eigen::Vector3d &  bbcenter_to_veh_origin,
const Eigen::Vector3d &  ego_dimensions 
)
pure virtual

Store the sensor pose etc. in the corresponding Cloe sensor component.

Implemented in vtd::VtdOsiSensor.

Member Data Documentation

◆ osi_comm_

std::unique_ptr<OsiTransceiver> osii::OsiOmniSensor::osi_comm_
protected

Connection via TCP to simulator. Should always be valid.


The documentation for this class was generated from the following files: