Base class#
#include "navground/sim/task.h"
- This class describe the high-level task control that provides navigation goals. - Sub-classes are expected to override methods - prepare, which is called at the begin of the simulation to set it up. 
- update, which is called at every simulation step. 
- close, which is called at the end of the simulation. 
 - Subclassed by navground::sim::DirectionTask, navground::sim::WaypointsTask - Public Types - The type of callbacks called when the task publishes data related to an event. - The task must publish data of the same size, see get_log_size. - Param data:
- [in] The event payload 
 
 - Public Functions - The size of the data passed to callbacks when events occur, see TaskCallback and add_callback. - Returns:
- The size of the data vector. 
 
 - Adds a callback called to log task events. - Parameters:
- value – [in] The desired callback 
 
 - Remove any callbacks. 
 - Returns whether the task is done. - Returns:
- True if the task has finished. 
 
 - Protected Functions - Tick the task, possibly updating the navigation goal of the agent. - Parameters:
- agent – The agent ticking the task 
- world – The world the agent is part of 
- time – [in] The simulation time 
 
 
 - Setup the task. - Called before starting a simulation. - Parameters:
- agent – The agent owning the task 
- world – [in] The world the agent is part of 
 
 
 - Clean-up the task. - Called after finishing a simulation. 
 - Log an event, forwarding data to registered callbacks. - Parameters:
- log – [in] The logged data