scenario_simulator_v2 C++ API
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
simple_sensor_simulator::OccupancyGridSensorBase Class Referenceabstract

Base class of occupancy grid sensor simulator. More...

#include <occupancy_grid_sensor.hpp>

Inheritance diagram for simple_sensor_simulator::OccupancyGridSensorBase:
Inheritance graph
[legend]

Public Member Functions

virtual ~OccupancyGridSensorBase ()=default
 
virtual void update (const double current_simulation_time, const std::vector< traffic_simulator_msgs::EntityStatus > &, const rclcpp::Time &current_ros_time, const std::vector< std::string > &lidar_detected_entities)=0
 Update sensor status. More...
 
const std::vector< std::string > getDetectedObjects (const std::vector< traffic_simulator_msgs::EntityStatus > &status, const std::vector< std::string > &lidar_detected_entities) const
 List all objects in range of sensor sight. More...
 
geometry_msgs::Pose getSensorPose (const std::vector< traffic_simulator_msgs::EntityStatus > &) const
 Extract sensor pose from entity statuses. More...
 

Protected Member Functions

 OccupancyGridSensorBase (const double current_simulation_time, const simulation_api_schema::OccupancyGridSensorConfiguration &configuration)
 

Protected Attributes

double previous_simulation_time_
 
simulation_api_schema::OccupancyGridSensorConfiguration configuration_
 
std::vector< std::string > detected_objects_
 

Detailed Description

Base class of occupancy grid sensor simulator.

Constructor & Destructor Documentation

◆ OccupancyGridSensorBase()

simple_sensor_simulator::OccupancyGridSensorBase::OccupancyGridSensorBase ( const double  current_simulation_time,
const simulation_api_schema::OccupancyGridSensorConfiguration &  configuration 
)
inlineexplicitprotected

◆ ~OccupancyGridSensorBase()

virtual simple_sensor_simulator::OccupancyGridSensorBase::~OccupancyGridSensorBase ( )
virtualdefault

Member Function Documentation

◆ getDetectedObjects()

const std::vector< std::string > simple_sensor_simulator::OccupancyGridSensorBase::getDetectedObjects ( const std::vector< traffic_simulator_msgs::EntityStatus > &  status,
const std::vector< std::string > &  lidar_detected_entities 
) const

List all objects in range of sensor sight.

Warning
status must contain EGO object
Returns
names of objects in range of sensor sight

◆ getSensorPose()

geometry_msgs::Pose simple_sensor_simulator::OccupancyGridSensorBase::getSensorPose ( const std::vector< traffic_simulator_msgs::EntityStatus > &  status) const

Extract sensor pose from entity statuses.

Returns
sensor pose
Warning
status must contain EGO object
Exceptions
SimulationRuntimeErrorif status does not contain EGO object

◆ update()

virtual void simple_sensor_simulator::OccupancyGridSensorBase::update ( const double  current_simulation_time,
const std::vector< traffic_simulator_msgs::EntityStatus > &  ,
const rclcpp::Time &  current_ros_time,
const std::vector< std::string > &  lidar_detected_entities 
)
pure virtual

Update sensor status.

Implemented in simple_sensor_simulator::OccupancyGridSensor< T >.

Member Data Documentation

◆ configuration_

simulation_api_schema::OccupancyGridSensorConfiguration simple_sensor_simulator::OccupancyGridSensorBase::configuration_
protected

◆ detected_objects_

std::vector<std::string> simple_sensor_simulator::OccupancyGridSensorBase::detected_objects_
protected

◆ previous_simulation_time_

double simple_sensor_simulator::OccupancyGridSensorBase::previous_simulation_time_
protected

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