SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
scl::CSensorBase Class Referenceabstract

#include <CSensorBase.hpp>

Collaboration diagram for scl::CSensorBase:
Collaboration graph

Public Member Functions

virtual sBool setSensors (const Eigen::VectorXd &arg_sensory_input)=0
virtual sBool applySensorModel ()=0
virtual sBool getSensorOutput (Eigen::VectorXd &ret_sensor_output)=0
virtual sBool sense (const Eigen::VectorXd &arg_sensory_input, Eigen::VectorXd &ret_sensor_output)
virtual sBool init (SSensorBase *arg_state)=0
virtual sBool hasBeenInit ()
 CSensorBase ()
virtual ~CSensorBase ()

Protected Attributes


Detailed Description

This class models a generic sensor such as an encoder or a camera. It presents a high level interface to the simulated sensor.

NOTE : Please don't be confused. This is a sensor "model", and as these functions make sense for a simulated sensor. It is "NOT" meant as an interface to a real sensor.

DO NOT subclass this base and start writing a driver in it.

Constructor & Destructor Documentation

scl::CSensorBase::CSensorBase ( )

Default constructor. Sets stuff to NULL

virtual scl::CSensorBase::~CSensorBase ( )

Default destructor. Frees memory

Member Function Documentation

virtual sBool scl::CSensorBase::applySensorModel ( )
pure virtual

Applies the sensor model to the current input commands

virtual sBool scl::CSensorBase::getSensorOutput ( Eigen::VectorXd &  ret_sensor_output)
pure virtual

Gets the processed output of the sensor. Returned in the passed variable.

virtual sBool scl::CSensorBase::hasBeenInit ( )

Has this sensor been initialized

virtual sBool scl::CSensorBase::init ( SSensorBase arg_state)
pure virtual

All actutors must be initialized

virtual sBool scl::CSensorBase::sense ( const Eigen::VectorXd &  arg_sensory_input,
Eigen::VectorXd &  ret_sensor_output 

Convenience function that combines a sensor's functions

virtual sBool scl::CSensorBase::setSensors ( const Eigen::VectorXd &  arg_sensory_input)
pure virtual

Sets the sensor's values. This is done by the simulation. Typically, the sensors are given a perfect value and the sensor model processes the value in whatever way required.

Member Data Documentation

SSensorBase* scl::CSensorBase::state_

The subclass must set this during the initialization call.

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