#include "Component/ModelManager.H"
#include "Util/log.H"
#include "rutz/shared_ptr.h"
#include "Raster/Raster.H"
#include "Raster/GenericFrame.H"
#include "Image/Image.H"
#include "Image/PixelsTypes.H"
#include "Transport/FrameIstream.H"
#include "Transport/FrameInfo.H"
#include "GUI/XWinManaged.H"
#include "GUI/XWindow.H"
#include "Media/FrameSeries.H"
#include "Devices/FrameGrabberConfigurator.H"
#include "Devices/DeviceOpts.H"
#include "Devices/PingSonar.H"
#include "Util/Timer.H"
#include "Util/Types.H"
#include "Util/sformat.H"
#include <cstdio>
#include <cstdlib>
#include <signal.h>
#include "Image/CutPaste.H"
#include "Image/vec2.h"
#include "Image/DrawOps.H"
#include "Robots/LoBot/control/VectorHistField.H"
#include "Robots/IRobot/Roomba.H"
Go to the source code of this file.
Classes | |
struct | robotCmd |
Defines | |
#define | NAVG 20 |
#define | MAXVEL 100 |
#define | INPLACEVEL 50 |
Typedefs | |
typedef struct robotCmd | robotCmd |
Functions | |
void | terminate (int s) |
Image< PixRGB< byte > > | vizDist (std::vector< int > dists, int divisions) |
Visualize distance received from sensor. | |
robotCmd | vec2motor (geom::vec2f a) |
Convert vectors to motor command. | |
int | main (const int argc, const char **argv) |
Receive signals from master node and performs requested actions. | |
Variables | |
static bool | goforever = true |
Test collision avoidance using ping sonar on roomba
Definition in file LoRoombaVecHist.C.
int main | ( | const int | argc, | |
const char ** | argv | |||
) |
Receive signals from master node and performs requested actions.
Definition at line 247 of file LoRoombaVecHist.C.
References ModelComponent::addSubComponent(), ModelComponent::exportOptions(), Timer::getSecs(), goforever, MC_RECURSE, MYLOGVERB, ModelManager::parseCommandLine(), Timer::reset(), ModelManager::setOptionValString(), SRC_POS, ModelComponent::start(), ModelComponent::stop(), vec2motor(), and ZEROS.
robotCmd vec2motor | ( | geom::vec2f | a | ) |
Convert vectors to motor command.
Definition at line 147 of file LoRoombaVecHist.C.
Referenced by main().
Image<PixRGB<byte> > vizDist | ( | std::vector< int > | dists, | |
int | divisions | |||
) |
Visualize distance received from sensor.
Definition at line 106 of file LoRoombaVecHist.C.
References drawPoint(), Point2D< T >::i, sformat(), writeText(), and ZEROS.