$darkmode
vtd::VtdExternalEgoModel Class Reference

#include <actuator_component.hpp>

Inheritance diagram for vtd::VtdExternalEgoModel:
Collaboration diagram for vtd::VtdExternalEgoModel:

Public Member Functions

 VtdExternalEgoModel (std::shared_ptr< TaskControl > tc, uint64_t id, const std::string &veh_name)
 
void step_begin (const cloe::Sync &sync) override
 
void reset () override
 
cloe::Json to_json () const override
 
- Public Member Functions inherited from vtd::VtdVehicleControl
virtual void step_end (const cloe::Sync &)
 
virtual bool update_vehicle_label ()
 
virtual cloe::utility::ActuationLevel get_actuation_level ()
 
- Public Member Functions inherited from cloe::VehicleStateModel
virtual void set_vehicle_state (const Object &obj)
 
const boost::optional< Object > & vehicle_state ()
 
bool is_vehicle_state ()
 
void register_vehicle_state_callback (const std::function< void(void)> &c)
 
fable::Json active_state () const override
 
Duration process (const Sync &sync) override
 
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
- Public Member Functions inherited from cloe::Component
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
uint64_t id () const
 
template<typename T >
T * as ()
 
Duration process (const Sync &sync) override
 
void reset () override
 
void abort () override
 
- Public Member Functions inherited from cloe::Model
virtual ~Model () noexcept=default
 
virtual Duration resolution () const
 
virtual bool is_connected () const
 
virtual bool is_operational () const
 
virtual void connect ()
 
virtual void disconnect ()
 
virtual void enroll (Registrar &)
 
virtual void start (const Sync &)
 
virtual void pause (const Sync &)
 
virtual void resume (const Sync &)
 
virtual void stop (const Sync &)
 
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
- Public Member Functions inherited from cloe::Entity
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
const std::string & name () const
 
void set_name (std::string name)
 
const std::string & description () const
 
void set_description (std::string desc)
 

Additional Inherited Members

- Protected Member Functions inherited from cloe::Entity
virtual Logger logger () const
 
- Protected Attributes inherited from cloe::VehicleStateModel
boost::optional< Objectvehicle_state_
 
std::function< void(void)> vehicle_state_callback_
 
- Protected Attributes inherited from cloe::Model
bool connected_ {false}
 
bool operational_ {false}
 
- Protected Attributes inherited from cloe::Entity
std::string name_
 
std::string desc_
 

Detailed Description

VtdExternalEgoModel provides the ego state from an external model to VTD.

Usage

Every VTD cycle, the following needs to be done:

Member Function Documentation

◆ reset()

void vtd::VtdExternalEgoModel::reset ( )
inlineoverridevirtual

Reset the model state.

This is called when Cloe is asked to reset the whole simulation to time 0. This can be the case when the simulator or a controller asks us to recover from a temporary problem without repeating the whole simulation setup.

The default implementation will raise an error. So if your model is not able to re-initialize, the simulation will be aborted.

Reimplemented from cloe::VehicleStateModel.

◆ step_begin()

void vtd::VtdExternalEgoModel::step_begin ( const cloe::Sync sync)
inlineoverridevirtual

Add the DynObjectState package to the TaskControl.

This should only be called once per simulation step. This method will not pay attention for you. Later, when the TaskControl sends its packages, this one will be part of it.

Implements vtd::VtdVehicleControl.

Here is the call graph for this function:

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