Public Member Functions | |
RobotBrainComponent (OptionManager &mgr, const std::string &descrName="GenericRobotBrainComponent", const std::string &tagName="GenericRobotBrainComponent") | |
void | init (Ice::CommunicatorPtr ic, Ice::ObjectAdapterPtr adapter) |
Init: Sets up all of the Ice runtime details, and ends with a call to registerTopics. | |
bool | registerSubscription (const std::string &MessageTopic) |
Register Subscription: Register this object as a subscriber to a specified topic. | |
void | registerPublisher (const std::string &MessageTopic) |
Register Publisher: Register this object as a publisher of a specified topic. | |
bool | publish (const ::std::string &MessageTopic, RobotSimEvents::EventMessagePtr msg) |
Publish: Send out a message to all subscribers. | |
void | start2 () |
Start2: Overload of the ModelComponent start2 - don't mess with this. | |
void | stop1 () |
Stop1: Overload of the ModelComponent stop1 - don't mess with this. | |
virtual void | run () |
virtual void | registerTopics () |
and registerPublisher calls that you would like to happen automatically after init. | |
virtual void | evolve () |
Evolve: Gets called by run in a while(1) loop. Anything that you want to happen continuously should go in here. | |
virtual void | updateMessage (const RobotSimEvents::EventMessagePtr &eMsg, const Ice::Current &) |
to publishes a message. | |
virtual void | start3 () |
Protected Attributes | |
OModelParam< std::string > | itsIceIdentity |
OModelParam< std::string > | itsIcestormIP |
OModelParam< int > | itsConnectionTimeout |
int | itsEvolveSleepTime |
Definition at line 19 of file RobotBrainComponent.H.
RobotBrainComponent::RobotBrainComponent | ( | OptionManager & | mgr, | |
const std::string & | descrName = "GenericRobotBrainComponent" , |
|||
const std::string & | tagName = "GenericRobotBrainComponent" | |||
) |
Robot Brain Component Constructor: Simply calls the ModelComponent constructor. Make sure that you include this constructor in your inherited class' initialization list Also, make sure that you use a unique tagName for each object that you want to add
Definition at line 27 of file RobotBrainComponent.C.
virtual void RobotBrainComponent::evolve | ( | ) | [inline, virtual] |
Evolve: Gets called by run in a while(1) loop. Anything that you want to happen continuously should go in here.
Reimplemented in SeaBee3GUICommunicator, SeaBee3GUIIce, BeoLogger, BeoCamera, BeoGPS, BeoIMU, BeoLRF, BeoPilot, BeoSonar, FaceDetector, RG_Lane, TV_Lane, Beobot2_GistSalLocalizerMasterI, Beobot2_GistSalLocalizerWorkerI, Beobot2GistSalMasterI, BeoSLAM, LandmarkDBWorkerI, LRF_Occupancy, Gist_Navigation, CornerNavigation, GistSal_Grapher, GistSal_Navigation, Hack_Navigation, ND_Navigation, QT_Navigation, RG_Lane, SLAM_Navigation, VisionBrainComponentI, RetinaI, StereoRetinaI, ScorbotController, BasicBrainComponentI, BeeStemI, IceCommunicator, IMUDataServer, Localization, LoggerModule, MapperI, MovementControllerI, ParticleFilter, SeaBee3Simulator, SeaBeeInjector, StereoVision, VisionBrainComponentI, WaypointControllerI, and XBox360RemoteControlI.
Definition at line 65 of file RobotBrainComponent.H.
Referenced by run().
void RobotBrainComponent::init | ( | Ice::CommunicatorPtr | ic, | |
Ice::ObjectAdapterPtr | adapter | |||
) |
Init: Sets up all of the Ice runtime details, and ends with a call to registerTopics.
Definition at line 37 of file RobotBrainComponent.C.
Referenced by MovementControllerI::evolve().
bool RobotBrainComponent::publish | ( | const ::std::string & | MessageTopic, | |
RobotSimEvents::EventMessagePtr | msg | |||
) |
Publish: Send out a message to all subscribers.
Definition at line 192 of file RobotBrainComponent.C.
Referenced by IMUDataServer::evolve(), BeoSonar::evolve(), BasicBrainComponentI::evolve(), FaceDetector::evolve(), SeaBeeInjector::evolve(), MovementControllerI::evolve(), ParticleFilter::evolve(), BeoGPS::evolve(), BeeStemI::evolve(), Beobot2GistSalMasterI::evolve(), BeoLRF::evolve(), Beobot2_GistSalLocalizerWorkerI::evolve(), BeoCamera::evolve(), GistSal_Navigation::evolve(), BeoPilot::evolve(), BeoIMU::evolve(), RetinaI::evolve(), and ColorSegmenterI::updateFrame().
void RobotBrainComponent::registerPublisher | ( | const std::string & | MessageTopic | ) |
Register Publisher: Register this object as a publisher of a specified topic.
Definition at line 165 of file RobotBrainComponent.C.
Referenced by RG_Lane::registerTopics(), ParticleFilter::registerTopics(), SeaBee3Simulator::registerTopics(), BeoSLAM::registerTopics(), Beobot2GistSalMasterI::registerTopics(), GistSal_Navigation::registerTopics(), VisionRectangle::registerTopics(), MovementControllerI::registerTopics(), RetinaI::registerTopics(), BeoPilot::registerTopics(), SeaBee3GUICommunicator::registerTopics(), BasicBrainComponentI::registerTopics(), StereoRetinaI::registerTopics(), QT_Navigation::registerTopics(), StraightEdgeFinder::registerTopics(), SaliencyModuleI::registerTopics(), MapperI::registerTopics(), Hack_Navigation::registerTopics(), CornerNavigation::registerTopics(), FaceDetector::registerTopics(), BeoSonar::registerTopics(), BeoLRF::registerTopics(), IMUDataServer::registerTopics(), SLAM_Navigation::registerTopics(), SeaBeeInjector::registerTopics(), ND_Navigation::registerTopics(), Beobot2_GistSalLocalizerWorkerI::registerTopics(), BeeStemI::registerTopics(), Gist_Navigation::registerTopics(), BeoIMU::registerTopics(), BeoGPS::registerTopics(), BeoCamera::registerTopics(), BinFinder::registerTopics(), XBox360RemoteControlI::registerTopics(), IceCommunicator::registerTopics(), Beobot2_GistSalLocalizerMasterI::registerTopics(), ColorSegmenterI::registerTopics(), SeaBee3GUIIce::registerTopics(), and WaypointControllerI::registerTopics().
bool RobotBrainComponent::registerSubscription | ( | const std::string & | MessageTopic | ) |
Register Subscription: Register this object as a subscriber to a specified topic.
Definition at line 125 of file RobotBrainComponent.C.
References ModelComponent::tagName().
Referenced by Localization::registerTopics(), RG_Lane::registerTopics(), ParticleFilter::registerTopics(), SeaBee3Simulator::registerTopics(), BeoSLAM::registerTopics(), Beobot2GistSalMasterI::registerTopics(), TV_Lane::registerTopics(), GistSal_Navigation::registerTopics(), MovementControllerI::registerTopics(), RetinaI::registerTopics(), BeoPilot::registerTopics(), SeaBee3GUICommunicator::registerTopics(), BasicBrainComponentI::registerTopics(), QT_Navigation::registerTopics(), LRF_Occupancy::registerTopics(), MapperI::registerTopics(), Hack_Navigation::registerTopics(), CornerNavigation::registerTopics(), FaceDetector::registerTopics(), SLAM_Navigation::registerTopics(), ND_Navigation::registerTopics(), Beobot2_GistSalLocalizerWorkerI::registerTopics(), StereoVision::registerTopics(), BeeStemI::registerTopics(), Gist_Navigation::registerTopics(), LandmarkDBWorkerI::registerTopics(), BeoLogger::registerTopics(), LoggerModule::registerTopics(), IceCommunicator::registerTopics(), ScorbotController::registerTopics(), Beobot2_GistSalLocalizerMasterI::registerTopics(), SeaBee3GUIIce::registerTopics(), and WaypointControllerI::registerTopics().
virtual void RobotBrainComponent::registerTopics | ( | ) | [inline, virtual] |
and registerPublisher calls that you would like to happen automatically after init.
Register Topics: This function is called at the end of init, and is virtual so that is can be overloaded by chid classes. In your overloaded version you should put all of the registerSubsciption
Reimplemented in SeaBee3GUICommunicator, SeaBee3GUIIce, BeoLogger, BeoCamera, BeoGPS, BeoIMU, BeoLRF, BeoPilot, BeoSonar, FaceDetector, RG_Lane, TV_Lane, Beobot2_GistSalLocalizerMasterI, Beobot2_GistSalLocalizerWorkerI, Beobot2GistSalMasterI, BeoSLAM, LandmarkDBWorkerI, LRF_Occupancy, Gist_Navigation, CornerNavigation, GistSal_Grapher, GistSal_Navigation, Hack_Navigation, ND_Navigation, QT_Navigation, RG_Lane, SLAM_Navigation, VisionGUI, ObjectFinder, RetinaI, StereoRetinaI, ScorbotController, BasicBrainComponentI, BasicVisionBrainComponentI, BeeStemI, BinFinder, CircleDetectionComponent, ColorSegmenterI, IceCommunicator, IMUDataServer, Localization, LoggerModule, MapperI, MovementControllerI, ParticleFilter, PixelizerI, SaliencyModuleI, SeaBee3Simulator, SeaBeeInjector, StereoVision, StraightEdgeFinder, VisionRectangle, WaypointControllerI, and XBox360RemoteControlI.
Definition at line 62 of file RobotBrainComponent.H.
Referenced by start2().
void RobotBrainComponent::run | ( | ) | [virtual] |
Run: This function gets forked into a new thread once the ModelManager is started. By default, it calls the evolve function. It will likely become non-virtual in the future, so please put all run-time functionality into evolve
Reimplemented in RetinaI.
Definition at line 103 of file RobotBrainComponent.C.
References evolve().
void RobotBrainComponent::start2 | ( | ) | [virtual] |
Start2: Overload of the ModelComponent start2 - don't mess with this.
Reimplemented from ModelComponent.
Definition at line 43 of file RobotBrainComponent.C.
References OModelParam< T >::getVal(), registerTopics(), and start3().
virtual void RobotBrainComponent::start3 | ( | ) | [inline, virtual] |
start3: Gets called immediately after start2, which is after all of the subcomponents have been started. If you have any code that needs to run only once at the beginning before the general run/evolve loop, but after the constructor, then you can put it here.
Reimplemented in BeoPilot, and BeoSonar.
Definition at line 75 of file RobotBrainComponent.H.
Referenced by start2().
void RobotBrainComponent::stop1 | ( | ) | [virtual] |
Stop1: Overload of the ModelComponent stop1 - don't mess with this.
Reimplemented from ModelComponent.
Definition at line 113 of file RobotBrainComponent.C.
References ModelComponent::tagName().
virtual void RobotBrainComponent::updateMessage | ( | const RobotSimEvents::EventMessagePtr & | eMsg, | |
const Ice::Current & | ||||
) | [inline, virtual] |
to publishes a message.
Update Message: Gets called by the Ice runtime when a publisher of a message that your object subscribes
Reimplemented in SeaBee3GUICommunicator, SeaBee3GUIIce, BeoLogger, BeoCamera, BeoGPS, BeoIMU, BeoLRF, BeoPilot, BeoSonar, FaceDetector, RG_Lane, TV_Lane, Beobot2_GistSalLocalizerMasterI, Beobot2_GistSalLocalizerWorkerI, Beobot2GistSalMasterI, BeoSLAM, LandmarkDBWorkerI, LRF_Occupancy, Gist_Navigation, CornerNavigation, GistSal_Grapher, GistSal_Navigation, Hack_Navigation, ND_Navigation, QT_Navigation, RG_Lane, SLAM_Navigation, VisionBrainComponentI, RetinaI, StereoRetinaI, ScorbotController, BasicBrainComponentI, BeeStemI, IceCommunicator, IMUDataServer, Localization, LoggerModule, MapperI, MovementControllerI, ParticleFilter, SeaBee3Simulator, SeaBeeInjector, StereoVision, VisionBrainComponentI, WaypointControllerI, and XBox360RemoteControlI.
Definition at line 69 of file RobotBrainComponent.H.