ARGoS  3
A parallel, multi-engine simulator for swarm robotics
plugins/robots/foot-bot/simulator/footbot_entity.cpp
Go to the documentation of this file.
00001 
00007 #include "footbot_entity.h"
00008 
00009 #include <argos3/core/utility/math/matrix/rotationmatrix3.h>
00010 #include <argos3/core/simulator/space/space.h>
00011 #include <argos3/core/simulator/entity/controllable_entity.h>
00012 #include <argos3/core/simulator/entity/embodied_entity.h>
00013 #include <argos3/plugins/simulator/entities/rab_equipped_entity.h>
00014 #include <argos3/plugins/simulator/entities/gripper_equipped_entity.h>
00015 #include <argos3/plugins/simulator/entities/ground_sensor_equipped_entity.h>
00016 #include <argos3/plugins/simulator/entities/led_equipped_entity.h>
00017 #include <argos3/plugins/simulator/entities/light_sensor_equipped_entity.h>
00018 #include <argos3/plugins/simulator/entities/omnidirectional_camera_equipped_entity.h>
00019 #include <argos3/plugins/simulator/entities/proximity_sensor_equipped_entity.h>
00020 #include <argos3/plugins/simulator/entities/wifi_equipped_entity.h>
00021 #include "footbot_distance_scanner_equipped_entity.h"
00022 #include "footbot_turret_entity.h"
00023 
00024 namespace argos {
00025 
00026    /****************************************/
00027    /****************************************/
00028 
00029    static const Real BODY_RADIUS                = 0.085036758f;
00030    static const Real BODY_HEIGHT                = 0.146899733f;
00031 
00032    static const Real LED_RING_RADIUS            = BODY_RADIUS + 0.005;
00033 
00034    static const Real INTERWHEEL_DISTANCE        = 0.14f;
00035    static const Real HALF_INTERWHEEL_DISTANCE   = INTERWHEEL_DISTANCE * 0.5f;
00036    static const Real WHEEL_RADIUS               = 0.029112741f;
00037 
00038    static const Real PROXIMITY_SENSOR_RING_ELEVATION       = 0.06f;
00039    static const Real PROXIMITY_SENSOR_RING_RADIUS          = BODY_RADIUS;
00040    static const CRadians PROXIMITY_SENSOR_RING_START_ANGLE = CRadians((ARGOS_PI / 12.0f) * 0.5f);
00041    static const Real PROXIMITY_SENSOR_RING_RANGE           = 0.1f;
00042 
00043    static const Real LED_RING_ELEVATION         = 0.085f;
00044    static const Real RAB_ELEVATION              = 0.1f;
00045    static const Real BEACON_ELEVATION           = 0.174249733f;
00046 
00047    static const Real GRIPPER_ELEVATION          = LED_RING_ELEVATION;
00048 
00049    static const CRadians LED_ANGLE_SLICE        = CRadians(ARGOS_PI / 6.0);
00050    static const CRadians HALF_LED_ANGLE_SLICE   = LED_ANGLE_SLICE * 0.5f;
00051 
00052    static const Real OMNIDIRECTIONAL_CAMERA_ELEVATION = 0.288699733f;
00053 
00054    /****************************************/
00055    /****************************************/
00056 
00057    CFootBotEntity::CFootBotEntity() :
00058       CComposableEntity(NULL),
00059       m_pcControllableEntity(NULL),
00060       m_pcDistanceScannerEquippedEntity(NULL),
00061       m_pcTurretEntity(NULL),
00062       m_pcEmbodiedEntity(NULL),
00063       m_pcGripperEquippedEntity(NULL),
00064       m_pcGroundSensorEquippedEntity(NULL),
00065       m_pcLEDEquippedEntity(NULL),
00066       m_pcLightSensorEquippedEntity(NULL),
00067       m_pcProximitySensorEquippedEntity(NULL),
00068       m_pcRABEquippedEntity(NULL),
00069       m_pcWheeledEntity(NULL),
00070       m_pcWiFiEquippedEntity(NULL) {
00071    }
00072 
00073    /****************************************/
00074    /****************************************/
00075 
00076    CFootBotEntity::CFootBotEntity(const std::string& str_id,
00077                                   const std::string& str_controller_id,
00078                                   const CVector3& c_position,
00079                                   const CQuaternion& c_orientation,
00080                                   Real f_rab_range,
00081                                   const CRadians& c_aperture) :
00082       CComposableEntity(NULL, str_id),
00083       m_pcControllableEntity(NULL),
00084       m_pcDistanceScannerEquippedEntity(NULL),
00085       m_pcTurretEntity(NULL),
00086       m_pcEmbodiedEntity(NULL),
00087       m_pcGripperEquippedEntity(NULL),
00088       m_pcGroundSensorEquippedEntity(NULL),
00089       m_pcLEDEquippedEntity(NULL),
00090       m_pcLightSensorEquippedEntity(NULL),
00091       m_pcProximitySensorEquippedEntity(NULL),
00092       m_pcRABEquippedEntity(NULL),
00093       m_pcWheeledEntity(NULL),
00094       m_pcWiFiEquippedEntity(NULL) {
00095       try {
00096          /*
00097           * Create and init components
00098           */
00099          /*
00100           * Embodied entity
00101           * Better to put this first, because many other entities need this one
00102           */
00103          m_pcEmbodiedEntity = new CEmbodiedEntity(this, "body_0", c_position, c_orientation);
00104          AddComponent(*m_pcEmbodiedEntity);
00105          /* Wheeled entity and wheel positions (left, right) */
00106          m_pcWheeledEntity = new CWheeledEntity(this, "wheels_0", 2);
00107          AddComponent(*m_pcWheeledEntity);
00108          m_pcWheeledEntity->SetWheel(0, CVector3(0.0f,  HALF_INTERWHEEL_DISTANCE, 0.0f), WHEEL_RADIUS);
00109          m_pcWheeledEntity->SetWheel(1, CVector3(0.0f, -HALF_INTERWHEEL_DISTANCE, 0.0f), WHEEL_RADIUS);
00110          /* LED equipped entity, with LEDs [0-11] and beacon [12] */
00111          m_pcLEDEquippedEntity = new CLEDEquippedEntity(this,
00112                                                         "leds_0",
00113                                                         m_pcEmbodiedEntity);
00114          AddComponent(*m_pcLEDEquippedEntity);
00115          for(UInt32 i = 0; i < 13; ++i) {
00116             m_pcLEDEquippedEntity->AddLED(CVector3());
00117          }
00118          m_pcLEDEquippedEntity->Disable();
00119          m_pcLEDEquippedEntity->SetCanBeEnabledIfDisabled(false);
00120          /* Proximity sensor equipped entity */
00121          m_pcProximitySensorEquippedEntity =
00122             new CProximitySensorEquippedEntity(this,
00123                                                "proximity_0");
00124          AddComponent(*m_pcProximitySensorEquippedEntity);
00125          m_pcProximitySensorEquippedEntity->AddSensorRing(
00126             CVector3(0.0f, 0.0f, PROXIMITY_SENSOR_RING_ELEVATION),
00127             PROXIMITY_SENSOR_RING_RADIUS,
00128             PROXIMITY_SENSOR_RING_START_ANGLE,
00129             PROXIMITY_SENSOR_RING_RANGE,
00130             24);
00131          /* Light sensor equipped entity */
00132          m_pcLightSensorEquippedEntity =
00133             new CLightSensorEquippedEntity(this,
00134                                            "light_0");
00135          AddComponent(*m_pcLightSensorEquippedEntity);
00136          m_pcLightSensorEquippedEntity->AddSensorRing(
00137             CVector3(0.0f, 0.0f, PROXIMITY_SENSOR_RING_ELEVATION),
00138             PROXIMITY_SENSOR_RING_RADIUS,
00139             PROXIMITY_SENSOR_RING_START_ANGLE,
00140             PROXIMITY_SENSOR_RING_RANGE,
00141             24);
00142          /* Gripper equipped entity */
00143          m_pcGripperEquippedEntity =
00144             new CGripperEquippedEntity(this,
00145                                        "gripper_0",
00146                                        CVector3(BODY_RADIUS, 0.0f, GRIPPER_ELEVATION),
00147                                        CVector3::X);
00148          AddComponent(*m_pcGripperEquippedEntity);
00149          /* Ground sensor equipped entity */
00150          m_pcGroundSensorEquippedEntity =
00151             new CGroundSensorEquippedEntity(this,
00152                                             "ground_0");
00153          AddComponent(*m_pcGroundSensorEquippedEntity);
00154          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.063, 0.0116),
00155                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00156          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.063, 0.0116),
00157                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00158          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.063, -0.0116),
00159                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00160          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.063, -0.0116),
00161                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00162          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.08, 0.0),
00163                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00164          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.042, 0.065),
00165                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00166          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.0, 0.08),
00167                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00168          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.042, 0.065),
00169                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00170          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.08, 0.0),
00171                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00172          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.042, -0.065),
00173                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00174          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.0, -0.08),
00175                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00176          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.042, -0.065),
00177                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00178          /* Distance scanner */
00179          m_pcDistanceScannerEquippedEntity = new CFootBotDistanceScannerEquippedEntity(this,
00180                                                                                        "distance_scanner_0");
00181          AddComponent(*m_pcDistanceScannerEquippedEntity);
00182          /* RAB equipped entity */
00183          m_pcRABEquippedEntity = new CRABEquippedEntity(this,
00184                                                         "rab_0",
00185                                                         10,
00186                                                         f_rab_range,
00187                                                         *m_pcEmbodiedEntity,
00188                                                         CVector3(0.0f, 0.0f, RAB_ELEVATION));
00189          AddComponent(*m_pcRABEquippedEntity);
00190          /* Omnidirectional camera equipped entity */
00191          m_pcOmnidirectionalCameraEquippedEntity = new COmnidirectionalCameraEquippedEntity(this,
00192                                                                                             "omnidirectional_camera_0",
00193                                                                                             c_aperture,
00194                                                                                             CVector3(0.0f, 0.0f, OMNIDIRECTIONAL_CAMERA_ELEVATION));
00195          AddComponent(*m_pcOmnidirectionalCameraEquippedEntity);         
00196          /* Turret equipped entity */
00197          m_pcTurretEntity = new CFootBotTurretEntity(this, "turret_0");
00198          AddComponent(*m_pcTurretEntity);
00199          /* WiFi equipped entity */
00200          m_pcWiFiEquippedEntity = new CWiFiEquippedEntity(this, "wifi_0");
00201          AddComponent(*m_pcWiFiEquippedEntity);
00202          /* Controllable entity
00203             It must be the last one, for actuators/sensors to link to composing entities correctly */
00204          m_pcControllableEntity = new CControllableEntity(this, "controller_0");
00205          AddComponent(*m_pcControllableEntity);
00206          m_pcControllableEntity->SetController(str_controller_id);
00207          /* Update components */
00208          UpdateComponents();
00209       }
00210       catch(CARGoSException& ex) {
00211          THROW_ARGOSEXCEPTION_NESTED("Failed to initialize entity \"" << GetId() << "\".", ex);
00212       }
00213    }
00214 
00215    /****************************************/
00216    /****************************************/
00217 
00218    void CFootBotEntity::Init(TConfigurationNode& t_tree) {
00219       try {
00220          /*
00221           * Init parent
00222           */
00223          CComposableEntity::Init(t_tree);
00224          /*
00225           * Create and init components
00226           */
00227          /*
00228           * Embodied entity
00229           * Better to put this first, because many other entities need this one
00230           */
00231          m_pcEmbodiedEntity = new CEmbodiedEntity(this);
00232          AddComponent(*m_pcEmbodiedEntity);
00233          m_pcEmbodiedEntity->Init(GetNode(t_tree, "body"));
00234          /* Wheeled entity and wheel positions (left, right) */
00235          m_pcWheeledEntity = new CWheeledEntity(this, "wheels_0", 2);
00236          AddComponent(*m_pcWheeledEntity);
00237          m_pcWheeledEntity->SetWheel(0, CVector3(0.0f,  HALF_INTERWHEEL_DISTANCE, 0.0f), WHEEL_RADIUS);
00238          m_pcWheeledEntity->SetWheel(1, CVector3(0.0f, -HALF_INTERWHEEL_DISTANCE, 0.0f), WHEEL_RADIUS);
00239          /* LED equipped entity, with LEDs [0-11] and beacon [12] */
00240          m_pcLEDEquippedEntity = new CLEDEquippedEntity(this,
00241                                                         "leds_0",
00242                                                         m_pcEmbodiedEntity);
00243          AddComponent(*m_pcLEDEquippedEntity);
00244          for(UInt32 i = 0; i < 13; ++i) {
00245             m_pcLEDEquippedEntity->AddLED(CVector3());
00246          }
00247          /* Proximity sensor equipped entity */
00248          m_pcProximitySensorEquippedEntity =
00249             new CProximitySensorEquippedEntity(this,
00250                                                "proximity_0");
00251          AddComponent(*m_pcProximitySensorEquippedEntity);
00252          m_pcProximitySensorEquippedEntity->AddSensorRing(
00253             CVector3(0.0f, 0.0f, PROXIMITY_SENSOR_RING_ELEVATION),
00254             PROXIMITY_SENSOR_RING_RADIUS,
00255             PROXIMITY_SENSOR_RING_START_ANGLE,
00256             PROXIMITY_SENSOR_RING_RANGE,
00257             24);
00258          /* Light sensor equipped entity */
00259          m_pcLightSensorEquippedEntity =
00260             new CLightSensorEquippedEntity(this,
00261                                            "light_0");
00262          AddComponent(*m_pcLightSensorEquippedEntity);
00263          m_pcLightSensorEquippedEntity->AddSensorRing(
00264             CVector3(0.0f, 0.0f, PROXIMITY_SENSOR_RING_ELEVATION),
00265             PROXIMITY_SENSOR_RING_RADIUS,
00266             PROXIMITY_SENSOR_RING_START_ANGLE,
00267             PROXIMITY_SENSOR_RING_RANGE,
00268             24);
00269          /* Gripper equipped entity */
00270          m_pcGripperEquippedEntity =
00271             new CGripperEquippedEntity(this,
00272                                        "gripper_0",
00273                                        CVector3(BODY_RADIUS, 0.0f, GRIPPER_ELEVATION),
00274                                        CVector3::X);
00275          AddComponent(*m_pcGripperEquippedEntity);
00276          /* Ground sensor equipped entity */
00277          m_pcGroundSensorEquippedEntity =
00278             new CGroundSensorEquippedEntity(this,
00279                                             "ground_0");
00280          AddComponent(*m_pcGroundSensorEquippedEntity);
00281          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.063, 0.0116),
00282                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00283          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.063, 0.0116),
00284                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00285          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.063, -0.0116),
00286                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00287          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.063, -0.0116),
00288                                                    CGroundSensorEquippedEntity::TYPE_GRAYSCALE);
00289          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.08, 0.0),
00290                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00291          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.042, 0.065),
00292                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00293          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.0, 0.08),
00294                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00295          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.042, 0.065),
00296                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00297          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.08, 0.0),
00298                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00299          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(-0.042, -0.065),
00300                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00301          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.0, -0.08),
00302                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00303          m_pcGroundSensorEquippedEntity->AddSensor(CVector2(0.042, -0.065),
00304                                                    CGroundSensorEquippedEntity::TYPE_BLACK_WHITE);
00305          /* Distance scanner */
00306          m_pcDistanceScannerEquippedEntity = new CFootBotDistanceScannerEquippedEntity(this,
00307                                                                                        "distance_scanner_0");
00308          AddComponent(*m_pcDistanceScannerEquippedEntity);
00309          /* RAB equipped entity */
00310          Real fRange = 3.0f;
00311          GetNodeAttributeOrDefault(t_tree, "rab_range", fRange, fRange);
00312          m_pcRABEquippedEntity = new CRABEquippedEntity(this,
00313                                                         "rab_0",
00314                                                         10,
00315                                                         fRange,
00316                                                         *m_pcEmbodiedEntity,
00317                                                         CVector3(0.0f, 0.0f, RAB_ELEVATION));
00318          AddComponent(*m_pcRABEquippedEntity);
00319          /* Omnidirectional camera equipped entity */
00320          CDegrees cAperture(70.0f);
00321          GetNodeAttributeOrDefault(t_tree, "omnidirectional_camera_aperture", cAperture, cAperture);
00322          m_pcOmnidirectionalCameraEquippedEntity = new COmnidirectionalCameraEquippedEntity(this,
00323                                                                                             "omnidirectional_camera_0",
00324                                                                                             ToRadians(cAperture),
00325                                                                                             CVector3(0.0f, 0.0f, OMNIDIRECTIONAL_CAMERA_ELEVATION));
00326          AddComponent(*m_pcOmnidirectionalCameraEquippedEntity);         
00327          /* Turret equipped entity */
00328          m_pcTurretEntity = new CFootBotTurretEntity(this, "turret_0");
00329          AddComponent(*m_pcTurretEntity);
00330          /* WiFi equipped entity */
00331          m_pcWiFiEquippedEntity = new CWiFiEquippedEntity(this, "wifi_0");
00332          AddComponent(*m_pcWiFiEquippedEntity);
00333          /* Controllable entity
00334             It must be the last one, for actuators/sensors to link to composing entities correctly */
00335          m_pcControllableEntity = new CControllableEntity(this);
00336          AddComponent(*m_pcControllableEntity);
00337          m_pcControllableEntity->Init(GetNode(t_tree, "controller"));
00338          /* Update components */
00339          UpdateComponents();
00340       }
00341       catch(CARGoSException& ex) {
00342          THROW_ARGOSEXCEPTION_NESTED("Failed to initialize entity \"" << GetId() << "\".", ex);
00343       }
00344    }
00345 
00346    /****************************************/
00347    /****************************************/
00348 
00349    void CFootBotEntity::Reset() {
00350       /* Reset all components */
00351       CComposableEntity::Reset();
00352       /* Update components */
00353       UpdateComponents();
00354    }
00355 
00356    /****************************************/
00357    /****************************************/
00358 
00359    void CFootBotEntity::Destroy() {
00360       CComposableEntity::Destroy();
00361    }
00362 
00363    /****************************************/
00364    /****************************************/
00365 
00366 #define UPDATE(COMPONENT) if(COMPONENT->IsEnabled()) COMPONENT->Update();
00367 
00368    void CFootBotEntity::UpdateComponents() {
00369       UPDATE(m_pcDistanceScannerEquippedEntity);
00370       UPDATE(m_pcTurretEntity);
00371       UPDATE(m_pcGripperEquippedEntity);
00372       UPDATE(m_pcRABEquippedEntity);
00373       if(m_pcLEDEquippedEntity->IsEnabled()) SetLEDPosition();
00374    }
00375 
00376    /****************************************/
00377    /****************************************/
00378    
00379 #define SET_RING_LED_POSITION(IDX)                                      \
00380    cLEDPosition.Set(LED_RING_RADIUS, 0.0f, LED_RING_ELEVATION);         \
00381    cLEDAngle = cLEDAnglePhase;                                          \
00382    cLEDAngle += LED_ANGLE_SLICE * IDX;                                  \
00383    cLEDPosition.RotateZ(cLEDAngle);                                     \
00384    cLEDPosition.Rotate(m_pcEmbodiedEntity->GetOrientation());           \
00385    cLEDPosition += cEntityPosition;                                     \
00386    m_pcLEDEquippedEntity->SetLEDPosition(IDX, cLEDPosition);
00387    
00388    void CFootBotEntity::SetLEDPosition() {
00389       /* Set LED positions */
00390       const CVector3& cEntityPosition = GetEmbodiedEntity().GetPosition();
00391       CVector3 cLEDPosition;
00392       CRadians cLEDAnglePhase = HALF_LED_ANGLE_SLICE + m_pcTurretEntity->GetRotation();
00393       CRadians cLEDAngle;
00394       SET_RING_LED_POSITION(0);
00395       SET_RING_LED_POSITION(1);
00396       SET_RING_LED_POSITION(2);
00397       SET_RING_LED_POSITION(3);
00398       SET_RING_LED_POSITION(4);
00399       SET_RING_LED_POSITION(5);
00400       SET_RING_LED_POSITION(6);
00401       SET_RING_LED_POSITION(7);
00402       SET_RING_LED_POSITION(8);
00403       SET_RING_LED_POSITION(9);
00404       SET_RING_LED_POSITION(10);
00405       SET_RING_LED_POSITION(11);
00406       /* Set beacon position */
00407       cLEDPosition.Set(0.0f, 0.0f, BEACON_ELEVATION);
00408       cLEDPosition.Rotate(m_pcEmbodiedEntity->GetOrientation());
00409       cLEDPosition += cEntityPosition;
00410       m_pcLEDEquippedEntity->SetLEDPosition(12, cLEDPosition);
00411    }
00412 
00413    /****************************************/
00414    /****************************************/
00415 
00416    REGISTER_ENTITY(CFootBotEntity,
00417                    "foot-bot",
00418                    "Carlo Pinciroli [ilpincy@gmail.com]",
00419                    "1.0",
00420                    "The foot-bot robot, developed in the Swarmanoid project.",
00421                    "The foot-bot is a wheeled robot developed in the Swarmanoid Project. It is a\n"
00422                    "modular robot with a rich set of sensors and actuators. For more information,\n"
00423                    "refer to the dedicated web page\n"
00424                    "(http://www.swarmanoid.org/swarmanoid_hardware.php).\n\n"
00425                    "REQUIRED XML CONFIGURATION\n\n"
00426                    "  <arena ...>\n"
00427                    "    ...\n"
00428                    "    <foot-bot id=\"fb0\">\n"
00429                    "      <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"
00430                    "      <controller config=\"mycntrl\" />\n"
00431                    "    </foot-bot>\n"
00432                    "    ...\n"
00433                    "  </arena>\n\n"
00434                    "The 'id' attribute is necessary and must be unique among the entities. If two\n"
00435                    "entities share the same id, initialization aborts.\n"
00436                    "The 'body/position' attribute specifies the position of the bottom point of the\n"
00437                    "foot-bot in the arena. When the robot is untranslated and unrotated, the\n"
00438                    "bottom point is in the origin and it is defined as the middle point between\n"
00439                    "the two wheels on the XY plane and the lowest point of the robot on the Z\n"
00440                    "axis, that is the point where the wheels touch the floor. The attribute values\n"
00441                    "are in the X,Y,Z order.\n"
00442                    "The 'body/orientation' attribute specifies the orientation of the foot-bot. All\n"
00443                    "rotations are performed with respect to the bottom point. The order of the\n"
00444                    "angles is Z,Y,X, which means that the first number corresponds to the rotation\n"
00445                    "around the Z axis, the second around Y and the last around X. This reflects\n"
00446                    "the internal convention used in ARGoS, in which rotations are performed in\n"
00447                    "that order. Angles are expressed in degrees. When the robot is unrotated, it\n"
00448                    "is oriented along the X axis.\n"
00449                    "The 'controller/config' attribute is used to assign a controller to the\n"
00450                    "foot-bot. The value of the attribute must be set to the id of a previously\n"
00451                    "defined controller. Controllers are defined in the <controllers> XML subtree.\n\n"
00452                    "OPTIONAL XML CONFIGURATION\n\n"
00453                    "You can set the emission range of the range-and-bearing system. By default, a\n"
00454                    "message sent by a foot-bot can be received up to 3m. By using the 'rab_range'\n"
00455                    "attribute, you can change it to, i.e., 4m as follows:\n\n"
00456                    "  <arena ...>\n"
00457                    "    ...\n"
00458                    "    <foot-bot id=\"fb0\" rab_range=\"4\">\n"
00459                    "      <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"
00460                    "      <controller config=\"mycntrl\" />\n"
00461                    "    </foot-bot>\n"
00462                    "    ...\n"
00463                    "  </arena>\n\n"
00464                    "You can also change the aperture of the omnidirectional camera. The aperture is\n"
00465                    "set to 70 degrees by default. The tip of the omnidirectional camera is placed on\n"
00466                    "top of the robot (h=0.289), and with an aperture of 70 degrees the range on the\n"
00467                    "ground is r=h*tan(aperture)=0.289*tan(70)=0.794m. To change the aperture to 80\n"
00468                    "degrees, use the 'omnidirectional_camera_aperture' as follows:\n\n"
00469                    "  <arena ...>\n"
00470                    "    ...\n"
00471                    "    <foot-bot id=\"fb0\" omnidirectional_camera_aperture=\"80\">\n"
00472                    "      <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"
00473                    "      <controller config=\"mycntrl\" />\n"
00474                    "    </foot-bot>\n"
00475                    "    ...\n"
00476                    "  </arena>\n\n"
00477                    ,
00478                    "Under development"
00479       );
00480 
00481    /****************************************/
00482    /****************************************/
00483 
00484    REGISTER_STANDARD_SPACE_OPERATIONS_ON_COMPOSABLE(CFootBotEntity);
00485 
00486    /****************************************/
00487    /****************************************/
00488 
00489 }