delphyne
|
DynamicEnvironmentHandler class implementation.
Each rule state is expected to last a fixed amount of time. An ignition service is provided for modifying the phase duration. A topic is advertised for publishing the current phase for each PhaseRing. The message being published is a ignition::msgs::StringMsg. topic_name : "/current_phase
#include <src/backend/fixed_phase_iteration_handler.h>
Public Member Functions | |
FixedPhaseIterationHandler ()=delete | |
FixedPhaseIterationHandler (maliput::api::RoadNetwork *road_network, double phase_duration=10.) | |
Constructs a FixedPhaseIterationHandler. More... | |
~FixedPhaseIterationHandler () override=default | |
void | Update (double sim_time) override |
Updates the rule's states. More... | |
double | get_phase_duration () const |
void | set_phase_duration (double phase_duration) |
Public Member Functions inherited from DynamicEnvironmentHandler | |
DynamicEnvironmentHandler ()=delete | |
virtual | ~DynamicEnvironmentHandler ()=default |
Static Public Attributes | |
static constexpr char | kCurrentPhaseTopic [] = "/current_phase" |
Name of service for modifying phase duration. More... | |
static constexpr char | kSetPhaseDurationSrvName [] = "/set_phase_duration" |
Protected Member Functions | |
void | SetPhaseDurationSvCb (const ignition::msgs::Double &phase_duration) |
Protected Member Functions inherited from DynamicEnvironmentHandler | |
DynamicEnvironmentHandler (maliput::api::RoadNetwork *road_network) | |
Creates DynamicEnvironmentHandler. More... | |
Additional Inherited Members | |
Protected Attributes inherited from DynamicEnvironmentHandler | |
maliput::api::RoadNetwork * | road_network_ {nullptr} |
|
delete |
FixedPhaseIterationHandler | ( | maliput::api::RoadNetwork * | road_network, |
double | phase_duration = 10. |
||
) |
Constructs a FixedPhaseIterationHandler.
road_network | maliput::api::RoadNetwork pointer. |
phase_duration | The duration of the rule's states in seconds. |
|
overridedefault |
double get_phase_duration | ( | ) | const |
void set_phase_duration | ( | double | phase_duration | ) |
phase_duration | The duration of the rule's states in seconds. |
|
protected |
|
overridevirtual |
Updates the rule's states.
sim_time | Current simulation time. |
Implements DynamicEnvironmentHandler.
|
staticconstexpr |
Name of service for modifying phase duration.
|
staticconstexpr |