Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
WorldModelObjPosAverageFuser Class Reference

ObjectPositionModel average fuser. More...

#include "objpos_average.h"

Inheritance diagram for WorldModelObjPosAverageFuser:

Public Member Functions

 WorldModelObjPosAverageFuser (fawkes::Logger *logger, fawkes::BlackBoard *blackboard, const char *from_id_pattern, const char *to_id)
 Constructor. More...
 
 ~WorldModelObjPosAverageFuser ()
 Destructor. More...
 
virtual void fuse ()
 The single function that makes fusers work. More...
 
virtual void bb_interface_created (const char *type, const char *id) throw ()
 BlackBoard interface created notification. More...
 
- Public Member Functions inherited from WorldModelFuser
virtual ~WorldModelFuser ()
 Virtual empty destructor. More...
 
- Public Member Functions inherited from fawkes::BlackBoardInterfaceObserver
 BlackBoardInterfaceObserver ()
 Empty constructor. More...
 
virtual ~BlackBoardInterfaceObserver ()
 Destructor. More...
 
virtual void bb_interface_destroyed (const char *type, const char *id) throw ()
 BlackBoard interface destroyed notification. More...
 

Additional Inherited Members

- Protected Types inherited from fawkes::BlackBoardInterfaceObserver
typedef LockMap< std::string,
std::list< std::string > > 
ObservedInterfaceLockMap
 Type for lockable interface type hash sets. More...
 
typedef
ObservedInterfaceLockMap::iterator 
ObservedInterfaceLockMapIterator
 Type for iterator of lockable interface type hash sets. More...
 
- Protected Member Functions inherited from fawkes::BlackBoardInterfaceObserver
void bbio_add_observed_create (const char *type_pattern, const char *id_pattern="*") throw ()
 Add interface creation type to watch list. More...
 
void bbio_add_observed_destroy (const char *type_pattern, const char *id_pattern="*") throw ()
 Add interface destruction type to watch list. More...
 
ObservedInterfaceLockMapbbio_get_observed_create () throw ()
 Get interface creation type watch list. More...
 
ObservedInterfaceLockMapbbio_get_observed_destroy () throw ()
 Get interface destriction type watch list. More...
 

Detailed Description

ObjectPositionModel average fuser.

This fuser takes a number of ObjectPositionInterface instanced and fuses them into a single ObjectPositionInterface by averaging over the source interfaces. It registers as an observer and opens any newly created interface that matches the ID pattern.

Author
Tim Niemueller

Definition at line 40 of file objpos_average.h.

Constructor & Destructor Documentation

WorldModelObjPosAverageFuser::WorldModelObjPosAverageFuser ( fawkes::Logger logger,
fawkes::BlackBoard blackboard,
const char *  from_id_pattern,
const char *  to_id 
)

Constructor.

Parameters
blackboardBlackBoard
from_id_patternpattern for ID of the interfaces to copy from
to_idID of the interface to copy to
loggerlogger

Definition at line 49 of file objpos_average.cpp.

References fawkes::BlackBoard::close(), fawkes::BlackBoard::open_for_writing(), fawkes::BlackBoard::open_multiple_for_reading(), and fawkes::BlackBoard::register_observer().

WorldModelObjPosAverageFuser::~WorldModelObjPosAverageFuser ( )

Destructor.

Definition at line 88 of file objpos_average.cpp.

Member Function Documentation

void WorldModelObjPosAverageFuser::bb_interface_created ( const char *  type,
const char *  id 
)
throw (
)
virtual

BlackBoard interface created notification.

This is called whenever an interface is created for a type that you registered for.

Parameters
typetype of the interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call
idID of the newly created interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call

Reimplemented from fawkes::BlackBoardInterfaceObserver.

Definition at line 104 of file objpos_average.cpp.

References fawkes::Exception::print_trace().

void WorldModelObjPosAverageFuser::fuse ( )
virtual

The single function that makes fusers work.

In this method fusers shall read from their source interfaces, process the data and write to their output interfaces.

Implements WorldModelFuser.

Definition at line 124 of file objpos_average.cpp.

References fawkes::ObjectPositionInterface::bearing(), fawkes::distance(), fawkes::ObjectPositionInterface::distance(), fawkes::ObjectPositionInterface::extent_x(), fawkes::ObjectPositionInterface::extent_y(), fawkes::ObjectPositionInterface::extent_z(), fawkes::ObjectPositionInterface::FLAG_HAS_EULER_ANGLES, fawkes::ObjectPositionInterface::FLAG_HAS_EXTENT, fawkes::ObjectPositionInterface::FLAG_HAS_RELATIVE_CARTESIAN, fawkes::ObjectPositionInterface::FLAG_HAS_RELATIVE_POLAR, fawkes::ObjectPositionInterface::FLAG_HAS_WORLD, fawkes::ObjectPositionInterface::FLAG_HAS_WORLD_VELOCITY, fawkes::ObjectPositionInterface::flags(), fawkes::Interface::has_writer(), fawkes::ObjectPositionInterface::is_valid(), fawkes::ObjectPositionInterface::is_visible(), fawkes::ObjectPositionInterface::object_type(), fawkes::ObjectPositionInterface::pitch(), fawkes::Interface::read(), fawkes::ObjectPositionInterface::relative_x(), fawkes::ObjectPositionInterface::relative_x_velocity(), fawkes::ObjectPositionInterface::relative_y(), fawkes::ObjectPositionInterface::relative_y_velocity(), fawkes::ObjectPositionInterface::relative_z(), fawkes::ObjectPositionInterface::relative_z_velocity(), fawkes::ObjectPositionInterface::roll(), fawkes::ObjectPositionInterface::slope(), fawkes::Interface::uid(), fawkes::ObjectPositionInterface::visibility_history(), fawkes::ObjectPositionInterface::world_x(), fawkes::ObjectPositionInterface::world_x_velocity(), fawkes::ObjectPositionInterface::world_y(), fawkes::ObjectPositionInterface::world_y_velocity(), fawkes::ObjectPositionInterface::world_z(), fawkes::ObjectPositionInterface::world_z_velocity(), and fawkes::ObjectPositionInterface::yaw().


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