ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::apps::VehicleModel Class Reference

a vehicle model which can be used in simulations More...

#include <vehiclemodel.h>

Collaboration diagram for adore::apps::VehicleModel:
Collaboration graph

Public Member Functions

 VehicleModel (bool external_ego_measurement_models, adore::env::traffic::Participant::TTrackingID simulationID, adore::env::traffic::Participant::TV2XStationID v2xStationID)
 Construct a new Vehicle Model object. More...
 
void setAutomaticControl (bool value)
 switches between manual and automatic control input More...
 
void setCheckpointClearance ()
 confirmation of current checkout More...
 
void setSupressInput (bool value)
 supress input to introduce errors, without deactivating automatic control More...
 
bool setIndicatorRightOn (double duration)
 
bool setIndicatorLeftOn (double duration)
 
virtual void run ()
 simulation step of the vehicle model More...
 

Protected Attributes

adore::env::traffic::Participant::TTrackingID simulationID_
 
adore::env::traffic::Participant::TV2XStationID v2xStationID_
 

Private Attributes

params::APVehicleparams_
 
double last_time_
 
double integration_step_
 
double last_time_checkpoint_clearance_
 
bool last_time_valid_
 
bool automatic_control_
 
bool checkpoint_clearance_
 
bool supress_input_
 
double indicator_left_off_from_
 
double indicator_right_off_from_
 
adoreMatrix< double, 10, 1 > x_
 
adore::fun::MotionCommand u_
 
adore::mad::AReader< double > * timer_
 
adore::mad::AReader< adore::fun::MotionCommand > * control_input_
 
adore::mad::AWriter< adore::fun::VehicleMotionState9d > * sim_output_
 
adore::mad::AWriter< adore::fun::VehicleMotionState9d > * gps_output_
 
adore::mad::AWriter< adore::fun::VehicleMotionState9d > * odom_output_
 
adore::mad::AWriter< adore::fun::VehicleExtendedState > * extended_state_output_
 
adore::mad::AReader< adore::fun::IndicatorCommand > * indstateReader_
 
adore::fun::IndicatorCommand indicatorCommand_
 
adore::mad::OdeRK4< double > solver_
 
adore::mad::AFeed< adore::sim::ResetVehiclePose > * reset_pose_feed_
 
adore::mad::AFeed< adore::sim::ResetVehicleTwist > * reset_twist_feed_
 
adore::sim::AFactory::TParticipantWriterparticipant_writer_
 

Detailed Description

a vehicle model which can be used in simulations

needs a timer, control_input, gps_output from adore::sim listens to reset_pose_feed and reset_twist_feed to reset pose/twist if requested uses run()-function to update

See also
adore::params::APVehicle on how to configure the vehicle model
VehicleModel::run()

Constructor & Destructor Documentation

◆ VehicleModel()

adore::apps::VehicleModel::VehicleModel ( bool  external_ego_measurement_models,
adore::env::traffic::Participant::TTrackingID  simulationID,
adore::env::traffic::Participant::TV2XStationID  v2xStationID 
)
inline

Construct a new Vehicle Model object.

Parameters
external_ego_measurement_modelsif true, only simulated true vehicle state is published. if false, odom and localization are also published with same data.
sim_factoryadore::sim factory
paramfactoryadore::params factory
simulationIDid of vehicle in simulation
Here is the call graph for this function:

Member Function Documentation

◆ run()

virtual void adore::apps::VehicleModel::run ( )
inlinevirtual

simulation step of the vehicle model

Here is the caller graph for this function:

◆ setAutomaticControl()

void adore::apps::VehicleModel::setAutomaticControl ( bool  value)
inline

switches between manual and automatic control input

Here is the caller graph for this function:

◆ setCheckpointClearance()

void adore::apps::VehicleModel::setCheckpointClearance ( )
inline

confirmation of current checkout

Here is the caller graph for this function:

◆ setIndicatorLeftOn()

bool adore::apps::VehicleModel::setIndicatorLeftOn ( double  duration)
inline
Here is the caller graph for this function:

◆ setIndicatorRightOn()

bool adore::apps::VehicleModel::setIndicatorRightOn ( double  duration)
inline
Here is the caller graph for this function:

◆ setSupressInput()

void adore::apps::VehicleModel::setSupressInput ( bool  value)
inline

supress input to introduce errors, without deactivating automatic control

Here is the caller graph for this function:

Member Data Documentation

◆ automatic_control_

bool adore::apps::VehicleModel::automatic_control_
private

◆ checkpoint_clearance_

bool adore::apps::VehicleModel::checkpoint_clearance_
private

◆ control_input_

adore::mad::AReader<adore::fun::MotionCommand>* adore::apps::VehicleModel::control_input_
private

◆ extended_state_output_

adore::mad::AWriter<adore::fun::VehicleExtendedState>* adore::apps::VehicleModel::extended_state_output_
private

< publishes ego state measurement inside vehicle

◆ gps_output_

adore::mad::AWriter<adore::fun::VehicleMotionState9d>* adore::apps::VehicleModel::gps_output_
private

< publishes ego state measurement inside vehicle

◆ indicator_left_off_from_

double adore::apps::VehicleModel::indicator_left_off_from_
private

◆ indicator_right_off_from_

double adore::apps::VehicleModel::indicator_right_off_from_
private

< upper time bound for setting left indicator on

◆ indicatorCommand_

adore::fun::IndicatorCommand adore::apps::VehicleModel::indicatorCommand_
private

◆ indstateReader_

adore::mad::AReader<adore::fun::IndicatorCommand>* adore::apps::VehicleModel::indstateReader_
private

< publishes extended state values inside vehicle reads indicator commands

◆ integration_step_

double adore::apps::VehicleModel::integration_step_
private

◆ last_time_

double adore::apps::VehicleModel::last_time_
private

◆ last_time_checkpoint_clearance_

double adore::apps::VehicleModel::last_time_checkpoint_clearance_
private

◆ last_time_valid_

bool adore::apps::VehicleModel::last_time_valid_
private

◆ odom_output_

adore::mad::AWriter<adore::fun::VehicleMotionState9d>* adore::apps::VehicleModel::odom_output_
private

< publishes ego state measurement inside vehicle

◆ params_

params::APVehicle* adore::apps::VehicleModel::params_
private

◆ participant_writer_

adore::sim::AFactory::TParticipantWriter* adore::apps::VehicleModel::participant_writer_
private

◆ reset_pose_feed_

adore::mad::AFeed<adore::sim::ResetVehiclePose>* adore::apps::VehicleModel::reset_pose_feed_
private

◆ reset_twist_feed_

adore::mad::AFeed<adore::sim::ResetVehicleTwist>* adore::apps::VehicleModel::reset_twist_feed_
private

◆ sim_output_

adore::mad::AWriter<adore::fun::VehicleMotionState9d>* adore::apps::VehicleModel::sim_output_
private

◆ simulationID_

adore::env::traffic::Participant::TTrackingID adore::apps::VehicleModel::simulationID_
protected

< publishes vehicle state globally

◆ solver_

adore::mad::OdeRK4<double> adore::apps::VehicleModel::solver_
private

◆ supress_input_

bool adore::apps::VehicleModel::supress_input_
private

◆ timer_

adore::mad::AReader<double>* adore::apps::VehicleModel::timer_
private

◆ u_

adore::fun::MotionCommand adore::apps::VehicleModel::u_
private

◆ v2xStationID_

adore::env::traffic::Participant::TV2XStationID adore::apps::VehicleModel::v2xStationID_
protected

◆ x_

adoreMatrix<double,10,1> adore::apps::VehicleModel::x_
private

< upper time bound for setting right indicator on


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