Add SimulationInit and SimulationPeriodic functions (#2377)

Fixes #2375
This commit is contained in:
Dustin Spicuzza
2020-02-19 02:05:16 -05:00
committed by GitHub
parent 554bda3332
commit 761f79385a
7 changed files with 90 additions and 6 deletions

View File

@@ -61,6 +61,16 @@ class IterativeRobotBase : public RobotBase {
*/
virtual void RobotInit();
/**
* Robot-wide simulation initialization code should go here.
*
* Users should override this method for default Robot-wide simulation
* related initialization which will be called when the robot is first
* started. It will be called exactly one time after RobotInit is called
* only when the robot is in simulation.
*/
virtual void SimulationInit();
/**
* Initialization code for disabled mode should go here.
*
@@ -102,6 +112,13 @@ class IterativeRobotBase : public RobotBase {
*/
virtual void RobotPeriodic();
/**
* Periodic simulation code should go here.
*
* This function is called in a simulated robot after user code executes.
*/
virtual void SimulationPeriodic();
/**
* Periodic code for disabled mode should go here.
*