#include "Beowulf/Beowulf.H"
#include "Component/ModelManager.H"
#include "Media/FrameSeries.H"
#include "Transport/FrameIstream.H"
#include "Neuro/SaccadeController.H"
#include "Neuro/SaccadeControllers.H"
#include "Neuro/SaccadeControllerConfigurator.H"
#include "Neuro/NeuroOpts.H"
#include "Image/Image.H"
#include "Image/Pixels.H"
#include "Raster/Raster.H"
#include "GUI/XWinManaged.H"
#include "Media/MediaOpts.H"
#include "Util/Timer.H"
#include "Simulation/SimEventQueue.H"
#include "Simulation/SimEventQueueConfigurator.H"
#include "Devices/DeviceOpts.H"
#include "Beobot/BeobotBrainMT.H"
#include "Beobot/BeobotConfig.H"
#include "Beobot/BeobotControl.H"
#include "Beobot/BeobotBeoChipListener.H"
#include "RCBot/Motion/MotionEnergy.H"
#include "Controllers/PID.H"
#include "Image/MathOps.H"
#include "Image/CutPaste.H"
#include "Image/DrawOps.H"
#include "Image/FilterOps.H"
#include "Image/PyramidOps.H"
#include "Image/ShapeOps.H"
#include "Image/Transforms.H"
#include "Beobot/beobot-GSnav-def.H"
#include "Beobot/GSnavResult.H"
#include <signal.h>
#include <errno.h>
Go to the source code of this file.
Defines | |
#define | ERR_INTERVAL 5000 |
Functions | |
std::string | getInputPrefix (nub::soft_ref< InputFrameSeries > ifs, int &inputType) |
get the input prefix to save the intermdeiate results | |
int | getOpMode (std::string opmodestr) |
get the operation mode of the current run | |
void | setupBeoChip (nub::soft_ref< BeoChip > b, BeobotConfig bbc) |
setup the BeoChip | |
int | beoChipProc (rutz::shared_ptr< BeobotBeoChipListener > lis, nub::soft_ref< BeoChip > b) |
process beoChip input | |
void | getBbmtResults (nub::ref< BeobotBrainMT > bbmt, Image< PixRGB< byte > > &currIma, Image< double > &cgist, Image< float > &currSalMap, ImageSet< float > &cmap, std::vector< Point2D< int > > &salpt, std::vector< std::vector< double > > &feat, std::vector< Rectangle > &objRect) |
get all the necessary information from the visual cortex | |
void | dispResults (Image< PixRGB< byte > > disp, rutz::shared_ptr< XWinManaged > win, Image< PixRGB< byte > > ima, Image< PixRGB< byte > > prevIma, std::vector< Point2D< int > > clmpt, std::vector< Point2D< int > > nlmpt, Image< float > currSalMap, std::vector< Point2D< int > > salpt, std::vector< Rectangle > objRect) |
display results | |
bool | checkNode (int opMode, nub::soft_ref< Beowulf > beo, int32 &rnode, TCPmessage &rmsg, int32 &raction, int32 &rframe) |
check to see if the node have returned results | |
bool | checkInput (int opMode, bool resetNextLandmark, uint64 inputFrameRate, uint64 inputTime) |
check to see if the new input should be processed | |
void | setupVentralPacket (TCPmessage &smsg, int rframe, bool resetVentralSearch, Image< PixRGB< byte > > currIma, Image< double > cgist, std::vector< Point2D< int > > salpt, std::vector< std::vector< double > > feat, std::vector< Rectangle > objRect, float dx, float dy, uint snumGT, float ltravGT) |
void | setupDorsalPacket (TCPmessage &smsg, int rframe, ImageSet< float > cmap, bool resetCurrLandmark, std::vector< Point2D< int > > clmpt, bool resetNextLandmark, std::vector< Point2D< int > > nlmpt) |
setup the packet containing cmaps for tracking | |
void | processDorsalResult (TCPmessage &rmsg, int32 raction, int32 rframe, std::vector< Point2D< int > > &clmpt, std::vector< Point2D< int > > &nlmpt, bool &resetNextLandmark, float &sp, float &st) |
get the proper motor command to run the robot | |
void | processVentralResult (TCPmessage &rmsg, int32 raction, int32 rframe, std::vector< Point2D< int > > &clmpt, std::vector< Point2D< int > > &nlmpt, bool &resetCurrLandmark, bool &resetNextLandmark) |
setup for the next search | |
void | getOdometry (float &dx, float &dy) |
get the odometry information | |
void | executeMotorCommand (int opMode, float st, float sp) |
execute the motor command from Dorsal | |
Image< double > | getGroundTruth (uint fNum, uint &snumGT, float <ravGT, float &dx, float &dy) |
feed in the current ground truth | |
void | reportResults (std::string resultPrefix, uint nsegment) |
report the results of the current run | |
void | terminate (int s) |
Signal handler (e.g., for control-C). | |
int | main (const int argc, const char **argv) |
Variables | |
static bool | goforever = true |
Robot navigation using a combination saliency and gist. Run beobot-GSnav-master at CPU_A to run Gist-Saliency model Run beobot-GSnav at CPU_B to run SIFT object recognition
Definition in file beobot-GSnav-master.C.
int beoChipProc | ( | rutz::shared_ptr< BeobotBeoChipListener > | lis, | |
nub::soft_ref< BeoChip > | b | |||
) |
process beoChip input
Definition at line 900 of file beobot-GSnav-master.C.
check to see if the new input should be processed
Definition at line 959 of file beobot-GSnav-master.C.
bool checkNode | ( | int | opMode, | |
nub::soft_ref< Beowulf > | beo, | |||
int32 & | rnode, | |||
TCPmessage & | rmsg, | |||
int32 & | raction, | |||
int32 & | rframe | |||
) |
check to see if the node have returned results
Definition at line 949 of file beobot-GSnav-master.C.
void dispResults | ( | Image< PixRGB< byte > > | disp, | |
rutz::shared_ptr< XWinManaged > | win, | |||
Image< PixRGB< byte > > | ima, | |||
Image< PixRGB< byte > > | prevIma, | |||
std::vector< Point2D< int > > | clmpt, | |||
std::vector< Point2D< int > > | nlmpt, | |||
Image< float > | currSalMap, | |||
std::vector< Point2D< int > > | salpt, | |||
std::vector< Rectangle > | objRect | |||
) |
display results
Definition at line 822 of file beobot-GSnav-master.C.
References drawDisk(), drawRect(), Image< T >::getHeight(), Image< T >::getWidth(), Image< T >::initialized(), inplaceNormalize(), inplacePaste(), min(), quickInterpolate(), sformat(), SMFAC, toRGB(), and writeText().
void executeMotorCommand | ( | int | opMode, | |
float | st, | |||
float | sp | |||
) |
execute the motor command from Dorsal
Definition at line 799 of file beobot-GSnav-master.C.
void getBbmtResults | ( | nub::ref< BeobotBrainMT > | bbmt, | |
Image< PixRGB< byte > > & | currIma, | |||
Image< double > & | cgist, | |||
Image< float > & | currSalMap, | |||
ImageSet< float > & | cmap, | |||
std::vector< Point2D< int > > & | salpt, | |||
std::vector< std::vector< double > > & | feat, | |||
std::vector< Rectangle > & | objRect | |||
) |
get all the necessary information from the visual cortex
Definition at line 920 of file beobot-GSnav-master.C.
Referenced by Beobot2GistSalMasterI::evolve().
Image< double > getGroundTruth | ( | uint | fNum, | |
uint & | snumGT, | |||
float & | ltravGT, | |||
float & | dx, | |||
float & | dy | |||
) |
feed in the current ground truth
Definition at line 1202 of file beobot-GSnav-master.C.
std::string getInputPrefix | ( | nub::soft_ref< InputFrameSeries > | ifs, | |
int & | inputType | |||
) |
get the input prefix to save the intermdeiate results
Definition at line 675 of file beobot-GSnav-master.C.
void getOdometry | ( | float & | dx, | |
float & | dy | |||
) |
get the odometry information
Definition at line 792 of file beobot-GSnav-master.C.
int getOpMode | ( | std::string | opmodestr | ) |
get the operation mode of the current run
Definition at line 735 of file beobot-GSnav-master.C.
void processDorsalResult | ( | TCPmessage & | rmsg, | |
int32 | raction, | |||
int32 | rframe, | |||
std::vector< Point2D< int > > & | clmpt, | |||
std::vector< Point2D< int > > & | nlmpt, | |||
bool & | resetNextLandmark, | |||
float & | sp, | |||
float & | st | |||
) |
get the proper motor command to run the robot
Definition at line 1122 of file beobot-GSnav-master.C.
References TCPmessage::getElementInt32(), and TCPmessage::reset().
void processVentralResult | ( | TCPmessage & | rmsg, | |
int32 | raction, | |||
int32 | rframe, | |||
std::vector< Point2D< int > > & | clmpt, | |||
std::vector< Point2D< int > > & | nlmpt, | |||
bool & | resetCurrLandmark, | |||
bool & | resetNextLandmark | |||
) |
setup for the next search
Definition at line 1066 of file beobot-GSnav-master.C.
References TCPmessage::getElementInt32(), TCPmessage::getSize(), and TCPmessage::reset().
void reportResults | ( | std::string | resultPrefix, | |
uint | nsegment | |||
) |
report the results of the current run
Definition at line 1350 of file beobot-GSnav-master.C.
void setupBeoChip | ( | nub::soft_ref< BeoChip > | b, | |
BeobotConfig | bbc | |||
) |
setup the BeoChip
Definition at line 747 of file beobot-GSnav-master.C.
References BeobotConfig::gearMaxVal, BeobotConfig::gearMinVal, BeobotConfig::gearNeutralVal, BeobotConfig::gearServoNum, BeobotConfig::pwm0MaxVal, BeobotConfig::pwm0MinVal, BeobotConfig::pwm0NeutralVal, BeobotConfig::pwm1MaxVal, BeobotConfig::pwm1MinVal, BeobotConfig::pwm1NeutralVal, BeobotConfig::speedMaxVal, BeobotConfig::speedMinVal, BeobotConfig::speedNeutralVal, BeobotConfig::speedServoNum, BeobotConfig::steerMaxVal, BeobotConfig::steerMinVal, BeobotConfig::steerNeutralVal, and BeobotConfig::steerServoNum.
void setupDorsalPacket | ( | TCPmessage & | smsg, | |
int | rframe, | |||
ImageSet< float > | cmap, | |||
bool | resetCurrLandmark, | |||
std::vector< Point2D< int > > | clmpt, | |||
bool | resetNextLandmark, | |||
std::vector< Point2D< int > > | nlmpt | |||
) |
setup the packet containing cmaps for tracking
Definition at line 1035 of file beobot-GSnav-master.C.
References TCPmessage::addImageSet(), TCPmessage::addInt32(), and TCPmessage::reset().
void setupVentralPacket | ( | TCPmessage & | smsg, | |
int | rframe, | |||
bool | resetVentralSearch, | |||
Image< PixRGB< byte > > | currIma, | |||
Image< double > | cgist, | |||
std::vector< Point2D< int > > | salpt, | |||
std::vector< std::vector< double > > | feat, | |||
std::vector< Rectangle > | objRect, | |||
float | dx, | |||
float | dy, | |||
uint | snumGT, | |||
float | ltravGT | |||
) |
setup the packat containing the salient region information to be recognized by the ventral module
Definition at line 978 of file beobot-GSnav-master.C.
References TCPmessage::addDouble(), TCPmessage::addFloat(), TCPmessage::addImage(), TCPmessage::addInt32(), Image< T >::beginw(), Image< T >::getSize(), and TCPmessage::reset().
void terminate | ( | int | s | ) |
Signal handler (e.g., for control-C).
Definition at line 195 of file beobot-GSnav-master.C.
References goforever.