Fawkes API  Fawkes Development Version
WorldModelObjPosAverageFuser Class Reference

ObjectPositionModel average fuser. More...

#include "objpos_average.h"

Inheritance diagram for WorldModelObjPosAverageFuser:

List of all members.

Public Member Functions

 WorldModelObjPosAverageFuser (fawkes::Logger *logger, fawkes::BlackBoard *blackboard, const char *from_id_pattern, const char *to_id)
 Constructor.
 ~WorldModelObjPosAverageFuser ()
 Destructor.
virtual void fuse ()
 The single function that makes fusers work.
virtual void bb_interface_created (const char *type, const char *id) throw ()
 BlackBoard interface created notification.

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

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::open_multiple_for_reading(), fawkes::BlackBoard::open_for_writing(), fawkes::BlackBoard::close(), fawkes::BlackBoard::register_observer(), and fawkes::BlackBoard::BBIO_FLAG_CREATED.

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::distance(), fawkes::Interface::has_writer(), fawkes::Interface::read(), fawkes::ObjectPositionInterface::is_valid(), fawkes::ObjectPositionInterface::object_type(), fawkes::Interface::uid(), fawkes::ObjectPositionInterface::flags(), fawkes::ObjectPositionInterface::FLAG_HAS_RELATIVE_CARTESIAN, fawkes::ObjectPositionInterface::is_visible(), fawkes::ObjectPositionInterface::world_x(), fawkes::ObjectPositionInterface::world_y(), fawkes::ObjectPositionInterface::world_z(), fawkes::ObjectPositionInterface::roll(), fawkes::ObjectPositionInterface::pitch(), fawkes::ObjectPositionInterface::yaw(), fawkes::ObjectPositionInterface::world_x_velocity(), fawkes::ObjectPositionInterface::world_y_velocity(), fawkes::ObjectPositionInterface::world_z_velocity(), fawkes::ObjectPositionInterface::relative_x(), fawkes::ObjectPositionInterface::relative_y(), fawkes::ObjectPositionInterface::relative_z(), fawkes::ObjectPositionInterface::relative_x_velocity(), fawkes::ObjectPositionInterface::relative_y_velocity(), fawkes::ObjectPositionInterface::relative_z_velocity(), fawkes::ObjectPositionInterface::distance(), fawkes::ObjectPositionInterface::bearing(), fawkes::ObjectPositionInterface::slope(), fawkes::ObjectPositionInterface::extent_x(), fawkes::ObjectPositionInterface::extent_y(), fawkes::ObjectPositionInterface::extent_z(), and fawkes::ObjectPositionInterface::visibility_history().


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