Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
jafar::slammm::MultiMapsSlam Class Reference

Detailed Description

Definition at line 26 of file MultiMapManager.hpp.

Inheritance diagram for jafar::slammm::MultiMapsSlam:
Inheritance graph
[legend]

List of all members.

Classes

struct  RobotMaps
struct  SlamEkfInfo
 This structure contains a filter and various information. More...

Public Member Functions

 MultiMapsSlam (std::size_t sizeMax_, MapsPoseManager *_mapsPoseManager, StartNewMapStrategy *_startNewMapStrategy, MergeMapsStrategy *_mergeMapsStrategy, slam::MapManagerFactory *mapManagerFactory=0, int firstMapId=0)
void mergeMap (unsigned int _map1Id, unsigned int _map2Id, const geom::T3DEuler &transfo)
 Merge the map of a robot into the map of an other map.
slam::SlamEkfgetCurrentMap (unsigned int _robotId=0)
 Function that return the current map.
const slam::SlamEkfgetCurrentMap (unsigned int _robotId=0) const
slam::SlamEkfgetMap (unsigned int _mapId, unsigned int _robotId=0)
unsigned int mapId (slam::SlamEkf *) const
void getWorldRobotPose (jafar::geom::T3DEuler &pose, unsigned int _robotId=0) const
 Function that return the global position of the robot.
jafar::geom::T3DEuler getWorldRobotPose (unsigned int _robotId=0) const
void getWorldFeatureState (jblas::vec &_result, unsigned int _featureId, unsigned int _currentMapId) const
void getWorldFeatureState (jblas::vec &_result, jblas::sym_mat &_resultCov, unsigned int _featureId, unsigned int _currentMapId) const
jafar::geom::T3DEuler getWorldToCurrentMapTransformation (unsigned int _robotId=0) const
 Get the transformation from the World frame to current map.
jafar::geom::T3DEuler getWorldToMapTransformation (unsigned int _mapId) const
 Get the transformation from the World frame to a given map.
void beginBrowseMaps ()
bool hasNextMap ()
slam::SlamEkfnextMap ()
const std::map< unsigned int,
slam::SlamEkf * > 
getMaps () const
slam::SlamEkfgetGlobalMap () const
 Merge all maps in one global map, using a similar method as Divide & Conquer.
void addRobot (slam::BaseRobot *)
void addRobot (slam::BaseRobot *, const jblas::vec &_robotState, const jblas::sym_mat &_robotStateCov)
void setSensor (slam::FeatureObserveModel *model, unsigned int sensorId, unsigned int _robotId)
void setRobotToSensor (jblas::vec const &robotToSensor, int sensorId, unsigned int _robotId)
virtual void predict (unsigned int _robotId, jblas::vec const &u)
virtual bool hasFeature (unsigned int id, unsigned int _robotId=0) const
virtual void getRobotPose (jafar::geom::T3DEuler &pose, unsigned int _robotId=0) const
virtual void removeFeature (unsigned int id)
virtual void addEventListener (slam::SlamEventListener &listener)
virtual void removeEventListener (slam::SlamEventListener &listener)
virtual void processObservations (unsigned int frameIndex_, std::list< slam::Observation * > const &knownObs, std::list< slam::Observation * > const &newObs, unsigned int robotId_=0, int events_=slam::SlamEventListener::ALL)
virtual void processObservations (unsigned int frameIndex_, std::vector< slam::Observation * > const &knownObs, std::vector< slam::Observation * > const &newObs, unsigned int robotId_=0, int events_=slam::SlamEventListener::ALL)
template<typename SequenceType >
void processObservations (unsigned int frameIndex_, SequenceType const &allObs, unsigned int robotId_=0, int events_=slam::SlamEventListener::ALL)
void rendezVous (unsigned int _firstRobotId, unsigned int _secondRobotId, const geom::T3DEuler &firstToSecond)
 Call this function when a rendez-vous event happen between two robots and that the tranformation between the two robots is known.
void gpsFix (const std::map< unsigned int, geom::T3DEuler > &worldToRobots)
 Call this function when the position of multiple robots is known.
void gpsFix (unsigned int _robotId, const geom::T3DEuler &worldToRobot)
 Convenient function that will execute a GPS fix event for a single robot.
void closeLoop (unsigned int _firstMapId, unsigned int _secondMapId, const geom::T3DEuler &firstToSecond)
 Close the loop between two maps.
bool canCloseLoop (unsigned int _firstMapId, unsigned int _secondMapId) const
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.
virtual void addMembersToLog (kernel::DataLogger &log) const
 Once the loggable has been added, this method is called so that the loggable can add some of its members to the log.
void setEventsDataLogger (kernel::DataLogger *log)
 Log events that happen in the MultiMapsSlam.
void addEventListener (MultiMapEventListener *listener)
void removeEventListener (MultiMapEventListener *listener)
void printInfo ()
 Print some information about the multimap manager.
void startNewMap (unsigned int _robotId)
 Start a new map for robot _robotId.

Private Types

typedef std::map< unsigned int,
slam::FeatureObserveModel * > 
FeatureObserveModelsContType

Private Member Functions

template<class SequenceType1 , class SequenceType2 >
void processObservationsImpl (unsigned int frameIndex_, SequenceType1 const &knownObs, SequenceType2 const &newObs, unsigned int _robotId, int events_)
 Process observations, it will create a new map if needed.
void initNewMap (unsigned int _robotId)
void startNewMap (RobotMaps &)
void updateCacheWorldToCurrentMap ()
 Update all world transformation that are cached in RobotMaps.

Private Attributes

int nextMapId
std::map< unsigned int,
SlamEkfInfo
m_maps
std::map< unsigned int, RobotMapsm_robotMaps
MapsPoseManagerm_mapsPoseManager
StartNewMapStrategym_startNewMapStrategy
MergeMapsStrategym_mergeMapsStrategy
slam::MapManagerFactorym_mapManagerFactory
std::size_t m_sizeMax
std::list< unsigned int > m_sensorsIds
 list of sensors ids, this list is used by setSensor to ensure that the id of a sensor is unique
std::list
< slam::SlamEventListener * > 
m_listeners
std::map< unsigned int,
SlamEkfInfo >::iterator 
browseFeaturesIt
kernel::DataLoggerm_eventsLogger
unsigned int m_frameIndex
std::list
< MultiMapEventListener * > 
m_eventListners

Constructor & Destructor Documentation

jafar::slammm::MultiMapsSlam::MultiMapsSlam ( std::size_t  sizeMax_,
MapsPoseManager _mapsPoseManager,
StartNewMapStrategy _startNewMapStrategy,
MergeMapsStrategy _mergeMapsStrategy,
slam::MapManagerFactory mapManagerFactory = 0,
int  firstMapId = 0 
)
Parameters:
sizeMax_the maximum size of the state of a local map

Member Function Documentation

virtual void jafar::slammm::MultiMapsSlam::addMembersToLog ( kernel::DataLogger log) const [virtual]

Once the loggable has been added, this method is called so that the loggable can add some of its members to the log.

Implements this method calling addLoggable(). By default this method is empty.

Reimplemented from jafar::kernel::DataLoggable.

Merge all maps in one global map, using a similar method as Divide & Conquer.

The maps of MultiMapsSlam are not touched and remain valid after a call to this function.

slam::SlamEkf* jafar::slammm::MultiMapsSlam::getMap ( unsigned int  _mapId,
unsigned int  _robotId = 0 
)
Returns:
a map
void jafar::slammm::MultiMapsSlam::getWorldFeatureState ( jblas::vec _result,
unsigned int  _featureId,
unsigned int  _currentMapId 
) const
Returns:
the state of the feature in the world reference.
void jafar::slammm::MultiMapsSlam::getWorldFeatureState ( jblas::vec _result,
jblas::sym_mat _resultCov,
unsigned int  _featureId,
unsigned int  _currentMapId 
) const
Returns:
the covariance of the feature in the world reference

Get the transformation from the World frame to a given map.

Parameters:
_mapiId
void jafar::slammm::MultiMapsSlam::gpsFix ( const std::map< unsigned int, geom::T3DEuler > &  worldToRobots)

Call this function when the position of multiple robots is known.

This function will start a new map for each robot.

void jafar::slammm::MultiMapsSlam::gpsFix ( unsigned int  _robotId,
const geom::T3DEuler worldToRobot 
)

Convenient function that will execute a GPS fix event for a single robot.

This function will start a new map for each robot.

Returns:
the identifier of a map
void jafar::slammm::MultiMapsSlam::rendezVous ( unsigned int  _firstRobotId,
unsigned int  _secondRobotId,
const geom::T3DEuler firstToSecond 
)

Call this function when a rendez-vous event happen between two robots and that the tranformation between the two robots is known.

This function will start a new map for each robot.

virtual void jafar::slammm::MultiMapsSlam::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::slammm::MultiMapsSlam::writeLogHeader ( kernel::DataLogger log) const [virtual]

Implements this method calling repeatidly log methods.

You should use writeComment(), writeLegend() or writeLegendTokens().

Implements jafar::kernel::DataLoggable.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:50 for Jafar by doxygen 1.7.6.1
LAAS-CNRS