68 enum status {idle, driving_home,
docking, executing_path, recording_path};
98 bool move(
char direction,
int speed=5 );
104 bool rotate(
char direction,
int speed=5 );
126 bool pathRename(
const std::string &old_name,
const std::string &new_name);
139 const std::string §ion );
A class to interface a Rovio robot (manufactured by WowWee).
bool pathGetList(std::string &path_list)
Get list of saved paths.
bool goHome(bool dock, int speed=5)
goHome(bool dock) drives Rovio in front of charging station if the paremeter dock is set to false,...
bool rotate(char direction, int speed=5)
rotate send Rovio the command to rotate in the specified direcction 'r'->right, 'l'->left
bool pathDelete(const std::string &path_name)
bool getNextImageSync(mrpt::obs::CObservationImagePtr &lastImage)
Returns the next frame from Rovio's live video stream, after starting the live streaming with retriev...
bool pathRename(const std::string &old_name, const std::string &new_name)
mrpt::synch::CCriticalSection buffer_img_cs
bool takeHeadUp()
Head positions.
bool m_videothread_must_exit
bool pathRecordSave(const std::string &path_name)
bool general_command(int act, std::string &response, std::string &errormsg)
bool getRovioState(TRovioState &state)
Returns a TRovioState with internal information of Rovio (State, Navigation Signal Strength,...
bool getEncoders(TEncoders &encoders)
Returns a TEncoders with information of Rovio encoders (since last read, it seems Rovio is continuous...
void initialize()
Establish conection with Rovio and log in its system: Important, fill out "options" members BEFORE ca...
bool stop_video()
This function stops and joins the thread launched by "retrieve_video()".
bool retrieve_video()
This function launchs a thread with the function "thread_video()" which gets frames into a buffer.
bool m_videothread_finished
mrpt::obs::CObservationImagePtr buffer_img
bool isVideoStreamming() const
Return true if video is streaming correctly.
bool send_cmd_action(int act, int speed)
bool path_management(int act)
bool m_videothread_initialized_done
bool m_videothread_initialized_error
bool path_management(int act, const std::string &path_name)
mrpt::system::TThreadHandle m_videoThread
bool captureImageAsync(mrpt::utils::CImage &out_img, bool recttified)
Returns a snapshot from Rovio, if rectified is set true, the returned image is rectified with the par...
void loadConfig(const mrpt::utils::CConfigFileBase &configSource, const std::string §ion)
Loads the rovio camera calibration parameters (of leave the default ones if not found) (See CGenericS...
bool getPosition(mrpt::math::TPose2D &out_pose)
Returns the Rovio's pose.
void thread_video()
This function takes a frame and waits until getLastImage ask for it, and so on.
bool move(char direction, int speed=5)
move send Rovio the command to move in the specified direcction
This class provides simple critical sections functionality.
This class allows loading and storing values and vectors of different types from a configuration text...
A class for storing images as grayscale or RGB bitmaps.
Structure to hold the parameters of a pinhole camera model.
struct OBS_IMPEXP CObservationImagePtr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::utils::TCamera cameraParams
This structure contains the information needed to interface the threads API on each platform: