scenario_simulator_v2 C++ API
Public Member Functions | List of all members
traffic_simulator::traffic::TrafficSink Class Reference

#include <traffic_sink.hpp>

Inheritance diagram for traffic_simulator::traffic::TrafficSink:
Inheritance graph
[legend]
Collaboration diagram for traffic_simulator::traffic::TrafficSink:
Collaboration graph
[legend]

Public Member Functions

 TrafficSink (const std::shared_ptr< entity::EntityManager > entity_manager_ptr, const TrafficSinkConfig &config)
 Construct a new Traffic Sink object. More...
 
auto execute (const double current_time, const double step_time) -> void override
 
auto appendDebugMarker (visualization_msgs::msg::MarkerArray &marker_array) const -> void override
 
- Public Member Functions inherited from traffic_simulator::traffic::TrafficModuleBase
 TrafficModuleBase ()
 

Constructor & Destructor Documentation

◆ TrafficSink()

traffic_simulator::traffic::TrafficSink::TrafficSink ( const std::shared_ptr< entity::EntityManager entity_manager_ptr,
const TrafficSinkConfig config 
)
explicit

Construct a new Traffic Sink object.

Parameters
entity_manager_ptrShared pointer, refers to the EntityManager
configTrafficSink configuration

Member Function Documentation

◆ appendDebugMarker()

auto traffic_simulator::traffic::TrafficSink::appendDebugMarker ( visualization_msgs::msg::MarkerArray &  marker_array) const -> void
overridevirtual

◆ execute()

auto traffic_simulator::traffic::TrafficSink::execute ( const double  current_time,
const double  step_time 
) -> void
overridevirtual
Note
execute calls despawn on each entity only when both:
  1. Its distance from the TrafficSink is <= config.radius [m].
  2. Its EntityType is in config.sinkable_entity_types.

Implements traffic_simulator::traffic::TrafficModuleBase.


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