MRXT: The Multi-Robot eXploration Tool
Multi-Robot autonomous exploration and mapping simulator.
|
00001 /* 00002 * 00003 * Author: Miguel Julia <mjulia@umh.es> 00004 * 00005 * Date: 2009 00006 * 00007 * Class robotBase 00008 * 00009 00010 */ 00011 00012 #pragma once 00013 #ifndef __ROBOT__BASE__ 00014 #define __ROBOT__BASE__ 00015 00016 #include "ClThread.h" 00017 #include "stepEvent.h" 00018 #include "rangeSensorData.h" 00019 #include "landmarksData.h" 00020 #include "robotTypes.h" 00021 00022 /** 00023 * @brief This class reference a robotic plattform in the simulator 00024 * 00025 */ 00026 class robotBase: public production{ 00027 00028 /////////////////////////////////////////////////////////////////////// 00029 //------------------------- Attributes ------------------------------ 00030 /////////////////////////////////////////////////////////////////////// 00031 private: 00032 00033 void* scene; 00034 int number; 00035 bool captured; 00036 00037 //--------------------------------------------------------------------- 00038 /////////////////////////////////////////////////////////////////////// 00039 00040 /////////////////////////////////////////////////////////////////////// 00041 //------------------------- Methods --------------------------------- 00042 /////////////////////////////////////////////////////////////////////// 00043 00044 public: 00045 00046 /// Default constructor 00047 robotBase(); 00048 /// Builds a robotBase with ID number and a vitualWorld associated 00049 robotBase(int number); 00050 /// Default destructor 00051 virtual ~robotBase(); 00052 00053 /// sets the reference to the virtual world object 00054 void setWorldModel(void* scence); 00055 /// sets the robot ID number 00056 void setNumber(int number); 00057 /// sets the robot ID number 00058 int getNumber() const; 00059 00060 /// returns the range sensor current data 00061 rangeSensorData* getRangeSensorData(); 00062 /// returns the landmarks data 00063 landmarksData* getLandmarksData(); 00064 /// returns the robot odometry 00065 pose* getOdometry(); 00066 00067 /// sets the linear and angular speed 00068 void setSpeed(float v, float w); 00069 00070 int fire(); 00071 void setCaptured(); 00072 bool isCaptured(); 00073 00074 00075 //--------------------------------------------------------------------- 00076 /////////////////////////////////////////////////////////////////////// 00077 }; 00078 00079 inline void robotBase::setNumber(int n) {number = n;} 00080 inline int robotBase::getNumber() const {return number;} 00081 inline void robotBase::setCaptured() {captured = true;} 00082 inline bool robotBase::isCaptured() {return captured;} 00083 #endif 00084