Fawkes API
Fawkes Development Version
|
ObjectPositionModel average fuser. More...
#include "objpos_average.h"
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... | |
![]() | |
virtual | ~WorldModelFuser () |
Virtual empty destructor. More... | |
![]() | |
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 | |
![]() | |
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... | |
![]() | |
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... | |
ObservedInterfaceLockMap * | bbio_get_observed_create () throw () |
Get interface creation type watch list. More... | |
ObservedInterfaceLockMap * | bbio_get_observed_destroy () throw () |
Get interface destriction type watch list. More... | |
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.
Definition at line 40 of file objpos_average.h.
WorldModelObjPosAverageFuser::WorldModelObjPosAverageFuser | ( | fawkes::Logger * | logger, |
fawkes::BlackBoard * | blackboard, | ||
const char * | from_id_pattern, | ||
const char * | to_id | ||
) |
Constructor.
blackboard | BlackBoard |
from_id_pattern | pattern for ID of the interfaces to copy from |
to_id | ID of the interface to copy to |
logger | logger |
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.
|
virtual |
BlackBoard interface created notification.
This is called whenever an interface is created for a type that you registered for.
type | type 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 |
id | ID 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().
|
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().