DUNE: Uniform Navigational Environment
2017.01.0
|
DepthSensor simulator task.
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onResourceAcquisition (void) |
void | onResourceRelease (void) |
void | consume (const IMC::SimulatedState *msg) |
void | task (void) |
Public Attributes | |
IMC::SimulatedState | m_sstate |
IMC::Depth | m_depth |
Random::Generator * | m_prng |
Arguments | m_args |
|
inline |
|
inline |
|
inline |
Acquire resources. Initializes random number generator.
References m_args, m_prng, Simulators::DepthSensor::Arguments::prng_seed, and Simulators::DepthSensor::Arguments::prng_type.
|
inline |
Release resources.
References m_prng.
|
inline |
Dispatches a DUNE::IMC::Depth message with the depth stored in m_sstate plus some gaussian noise (according to parametrized standard deviation).
If task is not active, returns immediately.
References DUNE::Math::Random::Generator::gaussian(), m_args, m_depth, m_prng, m_sstate, and Simulators::DepthSensor::Arguments::std_dev.
Arguments Simulators::DepthSensor::Task::m_args |
Task arguments.
Referenced by onResourceAcquisition(), Task(), and task().
IMC::Depth Simulators::DepthSensor::Task::m_depth |
Current depth.
Referenced by task().
Random::Generator* Simulators::DepthSensor::Task::m_prng |
PRNG handle.
Referenced by onResourceAcquisition(), onResourceRelease(), and task().
IMC::SimulatedState Simulators::DepthSensor::Task::m_sstate |