Jafar
|
Base class for all types of sensors. More...
Base class for all types of sensors.
Definition at line 43 of file sensorAbstract.hpp.
#include <sensorAbstract.hpp>
Public Types | |
enum | type_enum { PINHOLE, PINHOLESTEREO, BARRETO } |
enum | kind_enum { PROPRIOCEPTIVE, EXTEROCEPTIVE } |
Public Member Functions | |
SensorAbstract (const robot_ptr_t &_robPtr, const filtered_obj_t poseInFilter=UNFILTERED, int extraStateFilterSize=0, std::vector< RobotAbstract::Quantity > robQuant=createQuantPosOriQuat()) | |
Selectable LOCAL or REMOTE pose constructor. | |
virtual | ~SensorAbstract () |
Mandatory virtual destructor. | |
void | setIntegrationPolicy (bool integrate_all) |
bool | getIntegrationPolicy () |
void | setUseForInit (bool use_for_init) |
bool | getUseForInit () |
void | setNeedInit (bool need_init) |
bool | getNeedInit () |
virtual void | move () |
Move function for sensors for now just to apply constraints, but should be thought more generally it it can have a command, or slowly change (noise), etc should be included in the state of the robot probably, and anyway done in a more efficient and clean way. | |
virtual int | queryAvailableRaws (RawInfos &infos)=0 |
get information about the available raws and the estimated dates for next one | |
virtual int | queryNextAvailableRaw (RawInfo &info)=0 |
get information about the next available raw | |
virtual double | getRawTimestamp (unsigned id)=0 |
virtual void | process (unsigned id, double date_limit=-1.)=0 |
process the given raw and throw away the previous unprocessed ones | |
virtual void | process_fake (unsigned id, bool move)=0 |
don't do any predict or update, but let the data acquisition run smoothly | |
virtual void | discard (unsigned id)=0 |
discard a data without using it | |
virtual void | init (double date) |
use previous data to initialize the robot if needed | |
virtual void | start ()=0 |
virtual void | stop ()=0 |
virtual bool | join (int timed_ms=-1)=0 |
void | enable (bool enabled=true) |
bool | isEnabled () |
virtual void | enableHard (bool enabled=true)=0 |
virtual void | stopDumping ()=0 |
virtual void | showInfos ()=0 |
virtual std::string | categoryName () const |
void | setId () |
void | setPose (double x, double y, double z, double rollDeg, double pitchDeg, double yawDeg) |
void | setPoseStd (double x, double y, double z, double rollDeg, double pitchDeg, double yawDeg, double xStd, double yStd, double zStd, double rollDegStd, double pitchDegStd, double yawDegStd) |
void | setPoseStd (double x, double y, double z, double rollDeg, double pitchDeg, double yawDeg, double posStd, double oriDegStd) |
vec7 | globalPose (bool normalize=false) |
Get sensor pose in global frame. | |
void | globalPose (jblas::vec7 &senGlobalPose, jblas::mat &SG_rs) |
Get sensor pose in global frame. | |
virtual void | writeLogHeader (kernel::DataLogger &log) const |
Implements this method calling repeatidly log methods. | |
virtual void | writeLogData (kernel::DataLogger &log) const |
Implements this method calling repeatidly log methods. | |
Static Public Member Functions | |
static std::vector < RobotAbstract::Quantity > | createQuantPosOriQuat () |
Public Attributes | |
enum jafar::rtslam::SensorAbstract::type_enum | type |
enum jafar::rtslam::SensorAbstract::kind_enum | kind |
Gaussian | pose |
Sensor pose in robot. | |
ind_array | ia_globalPose |
Indices of sensor's global pose in map (this is either the ia of the robot, rob.ia to make it short, or the ia_union() of rob.ia and sen.ia) | |
bool | poseInFilter |
Flag indicating if the sensor pose is being filtered. | |
size_t | missed_data |
how many data have been missed before last integration | |
Protected Attributes | |
bool | integrate_all |
bool | use_for_init |
use this sensor to init the state, so needs to process it before those that are not used to init the state | |
bool | need_init |
needs a few seconds of readings to initialize | |
bool | enabled |
RobotQuantity | quantsJacob |
whether the sensor is enabled or not (different from hardwaresensor level, will not wait for data) | |
RobotQuantity | quantsState |
quantities positions in the filter state | |
Static Protected Attributes | |
static IdFactory | sensorIds |
Private Member Functions | |
ENABLE_LINK_TO_PARENT (RobotAbstract, Robot, SensorAbstract) | |
ENABLE_ACCESS_TO_PARENT (RobotAbstract, robot) |
jafar::rtslam::SensorAbstract::SensorAbstract | ( | const robot_ptr_t & | _robPtr, |
const filtered_obj_t | poseInFilter = UNFILTERED , |
||
int | extraStateFilterSize = 0 , |
||
std::vector< RobotAbstract::Quantity > | robQuant = createQuantPosOriQuat() |
||
) |
Selectable LOCAL or REMOTE pose constructor.
Creates a sensor with the pose indexed in a map.
robPtr | the robot |
poseInFilter | flag indicating if the sensor pose is part of the filter (REMOTE). |
vec7 jafar::rtslam::SensorAbstract::globalPose | ( | bool | normalize = false | ) |
Get sensor pose in global frame.
This function composes robot pose with sensor pose to obtain the global sensor pose.
void jafar::rtslam::SensorAbstract::globalPose | ( | jblas::vec7 & | senGlobalPose, |
jblas::mat & | SG_rs | ||
) |
Get sensor pose in global frame.
This function composes robot pose with sensor pose to obtain the global sensor pose. It renders the Jacobians of the composed frame wrt all variables that are in the map (either robot only, or robot and sensor), depending on the sensor pose storage being LOCAL or REMOTE (see class Gaussian for doc on storage options). Therefore, this Jacobian is either 7-by-7 (LOCAL sensor pose) or 7-by-14 (REMOTE sensor pose).
The concerned states are available as an indirect array ia_rs, member of the class and defined at construction time.
poseG | the global pose. |
PG_rs | the Jacobian wrt the mapped states of robot and sensor. |
virtual void jafar::rtslam::SensorAbstract::process | ( | unsigned | id, |
double | date_limit = -1. |
||
) | [pure virtual] |
process the given raw and throw away the previous unprocessed ones
Implemented in jafar::rtslam::SensorExteroAbstract, and jafar::rtslam::SensorAbsloc.
virtual void jafar::rtslam::SensorAbstract::writeLogData | ( | kernel::DataLogger & | log | ) | const [virtual] |
Implements this method calling repeatidly log methods.
You should use writeData() or writeDataVector().
Implements jafar::kernel::DataLoggable.
virtual void jafar::rtslam::SensorAbstract::writeLogHeader | ( | kernel::DataLogger & | log | ) | const [virtual] |
Implements this method calling repeatidly log methods.
You should use writeComment(), writeLegend() or writeLegendTokens().
Implements jafar::kernel::DataLoggable.
whether the sensor is enabled or not (different from hardwaresensor level, will not wait for data)
quantities positions in the sensor jacobians
Definition at line 60 of file sensorAbstract.hpp.
Generated on Wed Oct 15 2014 00:37:46 for Jafar by doxygen 1.7.6.1 |