eyebot_entity.cpp File Reference
#include "eyebot_entity.h"
#include <argos3/core/simulator/space/space.h>
#include <argos3/core/simulator/entity/controllable_entity.h>
#include <argos3/core/simulator/entity/embodied_entity.h>
#include <argos3/plugins/simulator/entities/led_equipped_entity.h>
#include <argos3/plugins/simulator/entities/light_sensor_equipped_entity.h>
#include <argos3/plugins/simulator/entities/perspective_camera_equipped_entity.h>
#include <argos3/plugins/simulator/entities/proximity_sensor_equipped_entity.h>
#include <argos3/plugins/simulator/entities/quadrotor_entity.h>
#include <argos3/plugins/simulator/entities/rab_equipped_entity.h>
#include <argos3/plugins/simulator/entities/battery_equipped_entity.h>
Include dependency graph for eyebot_entity.cpp:

Go to the source code of this file.

Namespaces

 argos
 The namespace containing all the ARGoS related code.
 

Macros

#define UPDATE(COMPONENT)   if(COMPONENT->IsEnabled()) COMPONENT->Update();
 

Functions

 argos::REGISTER_ENTITY (CEyeBotEntity,"eye-bot","Carlo Pinciroli [ilpincy@gmail.com]","1.0","The eye-bot robot, developed in the Swarmanoid project.","The eye-bot is a quad-rotor developed in the Swarmanoid Project. It is a\n""fully autonomous robot with a rich set of sensors and actuators. For more\n""information, refer to the dedicated web page\n""(http://www.swarmanoid.org/swarmanoid_hardware.php).\n\n""REQUIRED XML CONFIGURATION\n\n"" <arena ...>\n"" ...\n"" <eye-bot id=\"eb0\">\n"" <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"" <controller config=\"mycntrl\" />\n"" </eye-bot>\n"" ...\n"" </arena>\n\n""The 'id' attribute is necessary and must be unique among the entities. If two\n""entities share the same id, initialization aborts.\n""The 'body/position' attribute specifies the position of the bottom point of the\n""eye-bot in the arena. When the robot is untranslated and unrotated, the\n""bottom point is in the origin and it is defined as the middle point between\n""the two wheels on the XY plane and the lowest point of the robot on the Z\n""axis, that is the point where the wheels touch the floor. The attribute values\n""are in the X,Y,Z order.\n""The 'body/orientation' attribute specifies the orientation of the eye-bot. All\n""rotations are performed with respect to the bottom point. The order of the\n""angles is Z,Y,X, which means that the first number corresponds to the rotation\n""around the Z axis, the second around Y and the last around X. This reflects\n""the internal convention used in ARGoS, in which rotations are performed in\n""that order. Angles are expressed in degrees. When the robot is unrotated, it\n""is oriented along the X axis.\n""The 'controller/config' attribute is used to assign a controller to the\n""eye-bot. The value of the attribute must be set to the id of a previously\n""defined controller. Controllers are defined in the <controllers> XML subtree.\n\n""OPTIONAL XML CONFIGURATION\n\n""You can set the emission range of the range-and-bearing system. By default, a\n""message sent by an eye-bot can be received up to 3m. By using the 'rab_range'\n""attribute, you can change it to, i.e., 4m as follows:\n\n"" <arena ...>\n"" ...\n"" <eye-bot id=\"eb0\" rab_range=\"4\">\n"" <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"" <controller config=\"mycntrl\" />\n"" </eye-bot>\n"" ...\n"" </arena>\n\n""You can also set the data sent at each time step through the range-and-bearing\n""system. By default, a message sent by a eye-bot is 10 bytes long. By using the\n""'rab_data_size' attribute, you can change it to, i.e., 20 bytes as follows:\n\n"" <arena ...>\n"" ...\n"" <eye-bot id=\"eb0\" rab_data_size=\"20\">\n"" <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"" <controller config=\"mycntrl\" />\n"" </eye-bot>\n"" ...\n"" </arena>\n\n""You can also configure the battery of the robot. By default, the battery never\n""depletes. You can choose among several battery discharge models, such as\n""- time: the battery depletes by a fixed amount at each time step\n""- motion: the battery depletes according to how the robot moves\n""- time_motion: a combination of the above models.\n""You can define your own models too. Follow the examples in the file\n""argos3/src/plugins/simulator/entities/battery_equipped_entity.cpp.\n\n"" <arena ...>\n"" ...\n"" <eye-bot id=\"eb0\"\n"" <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"" <controller config=\"mycntrl\" />\n"" <battery model=\"time\" factor=\"1e-5\"/>\n"" </eye-bot>\n"" ...\n"" </arena>\n\n"" <arena ...>\n"" ...\n"" <eye-bot id=\"eb0\"\n"" <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"" <controller config=\"mycntrl\" />\n"" <battery model=\"motion\" pos_factor=\"1e-3\"\n"" orient_factor=\"1e-3\"/>\n"" </eye-bot>\n"" ...\n"" </arena>\n\n"" <arena ...>\n"" ...\n"" <eye-bot id=\"eb0\"\n"" <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"" <controller config=\"mycntrl\" />\n"" <battery model=\"time_motion\" time_factor=\"1e-5\"\n"" pos_factor=\"1e-3\"\n"" orient_factor=\"1e-3\"/>\n"" </eye-bot>\n"" ...\n"" </arena>\n\n""Finally, you can change the parameters of the camera. You can set its aperture,\n""focal length, and range with the attributes 'camera_aperture',\n""'camera_focal_length', and 'camera_range', respectively. The default values are:\n""30 degrees for aperture, 0.035 for focal length, and 2 meters for range. Check\n""the following example:\n\n"" <arena ...>\n"" ...\n"" <eye-bot id=\"eb0\"\n"" camera_aperture=\"45\"\n"" camera_focal_length=\"0.07\"\n"" camera_range=\"10\">\n"" <body position=\"0.4,2.3,0.25\" orientation=\"45,0,0\" />\n"" <controller config=\"mycntrl\" />\n"" </eye-bot>\n"" ...\n"" </arena>\n\n","Usable")
 
 argos::REGISTER_STANDARD_SPACE_OPERATIONS_ON_COMPOSABLE (CEyeBotEntity)
 

Macro Definition Documentation

#define UPDATE (   COMPONENT)    if(COMPONENT->IsEnabled()) COMPONENT->Update();

Definition at line 308 of file eyebot_entity.cpp.