    

 ## On this page

  

 

 # vss::simulation::Simulation Class Reference

 Last update: 14.01.2025 

This service provides the simulation control procedures. [More...](classvss_1_1simulation_1_1_simulation.xhtml#details)

## <a name="pub-methods"></a>Public Member Functions

[vss::Status](structvss_1_1_status.xhtml) [Load](classvss_1_1simulation_1_1_simulation.xhtml#abb8b416be837c11db6a4f7818793516b) ([Configuration](structvss_1_1simulation_1_1_configuration.xhtml)) [vss::Status](structvss_1_1_status.xhtml) [Initialize](classvss_1_1simulation_1_1_simulation.xhtml#aa3f80c4cd36ad10a9ea64f495c14981e) ([WorldUpdate](structvss_1_1simulation_1_1_world_update.xhtml)) [vss::Status](structvss_1_1_status.xhtml) [Update](classvss_1_1simulation_1_1_simulation.xhtml#a6cd6753bfa8324a015a6c1ea0f208672) ([WorldUpdate](structvss_1_1simulation_1_1_world_update.xhtml)) [vss::Status](structvss_1_1_status.xhtml) [Stop](classvss_1_1simulation_1_1_simulation.xhtml#a051340c75f41cc927cd0467132e0f459) (google::protobuf::Empty) [vss::Status](structvss_1_1_status.xhtml) [Unload](classvss_1_1simulation_1_1_simulation.xhtml#a62ebf3aa1f54a82b04ffa806db37135b) (google::protobuf::Empty) [vss::Status](structvss_1_1_status.xhtml) [Kill](classvss_1_1simulation_1_1_simulation.xhtml#adacc0c903b414dfc738406d9c0e7bda8) (google::protobuf::Empty) <a id="details" name="details"></a>## Detailed Description

This service provides the simulation control procedures.

NoteThe AVX state machine (simulation logic) must be considered when using simulation control procedures. Procedures that are not consistent with current AVX state will end in ERROR. 

## Member Function Documentation

<a id="abb8b416be837c11db6a4f7818793516b"></a>## [◆ ](#abb8b416be837c11db6a4f7818793516b)Load()

 [vss::Status](structvss_1_1_status.xhtml) vss::simulation::Simulation::Load  ( [Configuration](structvss_1_1simulation_1_1_configuration.xhtml)  ) 

Loads AVX with a track, a list of assets, some simulation parameters, a sensor configuration, a lighting system (optional), some deployment parameters and the ID of the ego vehicle (the vehicle instance on which the sensor configuration will be attached).





<a id="aa3f80c4cd36ad10a9ea64f495c14981e"></a>## [◆ ](#aa3f80c4cd36ad10a9ea64f495c14981e)Initialize()

 [vss::Status](structvss_1_1_status.xhtml) vss::simulation::Simulation::Initialize  ( [WorldUpdate](structvss_1_1simulation_1_1_world_update.xhtml)  ) 

Sets the initial position/orientation/states of all components of the world and changes AVX state to RUNNING.





<a id="a6cd6753bfa8324a015a6c1ea0f208672"></a>## [◆ ](#a6cd6753bfa8324a015a6c1ea0f208672)Update()

 [vss::Status](structvss_1_1_status.xhtml) vss::simulation::Simulation::Update  ( [WorldUpdate](structvss_1_1simulation_1_1_world_update.xhtml)  ) 

Applies a world model update to AVX.





<a id="a051340c75f41cc927cd0467132e0f459"></a>## [◆ ](#a051340c75f41cc927cd0467132e0f459)Stop()

 [vss::Status](structvss_1_1_status.xhtml) vss::simulation::Simulation::Stop  ( google::protobuf::Empty  ) 

Changes AVX state from RUNNING to LOADED.





<a id="a62ebf3aa1f54a82b04ffa806db37135b"></a>## [◆ ](#a62ebf3aa1f54a82b04ffa806db37135b)Unload()

 [vss::Status](structvss_1_1_status.xhtml) vss::simulation::Simulation::Unload  ( google::protobuf::Empty  ) 

Unloads the simulation and switches AVX back to STARTED state.

NoteThis command is used to restart a simulation without having to restart AVX. 



<a id="adacc0c903b414dfc738406d9c0e7bda8"></a>## [◆ ](#adacc0c903b414dfc738406d9c0e7bda8)Kill()

 [vss::Status](structvss_1_1_status.xhtml) vss::simulation::Simulation::Kill  ( google::protobuf::Empty  ) 

Sends a signal to end the AVX program properly. Closes the Grpc server.





---

The documentation for this class was generated from the following file:- simulation.proto