range_and_bearing_medium_sensor.cpp File Reference
#include "range_and_bearing_medium_sensor.h"
#include <argos3/core/simulator/simulator.h>
#include <argos3/core/simulator/entity/composable_entity.h>
#include <argos3/core/simulator/entity/controllable_entity.h>
#include <argos3/plugins/simulator/entities/rab_equipped_entity.h>
#include <argos3/plugins/simulator/media/rab_medium.h>
Include dependency graph for range_and_bearing_medium_sensor.cpp:

Go to the source code of this file.


 The namespace containing all the ARGoS related code.


 argos::REGISTER_SENSOR (CRangeAndBearingMediumSensor,"range_and_bearing","medium","Carlo Pinciroli [ilpincy@gmail.com]","1.0","The range-and-bearing sensor.","This sensor allows robots to perform situated communication, i.e., a form of\n""wireless communication whereby the receiver also knows the location of the\n""sender with respect to its own frame of reference.\n""This implementation of the range-and-bearing sensor is associated to the\n""range-and-bearing medium. To be able to use this sensor, you must add a\n""range-and-bearing medium to the <media> section.\n""This sensor allows a robot to receive messages. To send messages, you need the\n""range-and-bearing actuator.\n""To use this sensor, in controllers you must include the\n""ci_range_and_bearing_sensor.h header.\n\n""REQUIRED XML CONFIGURATION\n\n"" <controllers>\n"" ...\n"" <my_controller ...>\n"" ...\n"" <sensors>\n"" ...\n"" <range_and_bearing implementation=\"medium\"\n"" medium=\"rab\" />\n"" ...\n"" </sensors>\n"" ...\n"" </my_controller>\n"" ...\n"" </controllers>\n\n""The 'medium' attribute must be set to the id of the range-and-bearing medium\n""declared in the <media> section.\n\n""OPTIONAL XML CONFIGURATION\n\n""It is possible to draw the rays shot by the range-and-bearing sensor in the\n""OpenGL visualization. This can be useful for sensor debugging but also to\n""understand what's wrong in your controller. In OpenGL, the rays are drawn in\n""cyan when two robots are communicating.\n""To turn this functionality on, add the attribute \"show_rays\" as in this\n""example:\n\n"" <controllers>\n"" ...\n"" <my_controller ...>\n"" ...\n"" <sensors>\n"" ...\n"" <range_and_bearing implementation=\"medium\"\n"" medium=\"rab\"\n"" show_rays=\"true\" />\n"" ...\n"" </sensors>\n"" ...\n"" </my_controller>\n"" ...\n"" </controllers>\n\n""It is possible to add noise to the readings, thus matching the characteristics\n""of a real robot better. Noise is implemented as a random vector added to the\n""vector joining two communicating robots. For the random vector, the inclination\n""and azimuth are chosen uniformly in the range [0:PI] and [0:2PI], respectively,\n""and the length is drawn from a Gaussian distribution. The standard deviation of\n""the Gaussian distribution is expressed in meters and set by the user through\n""the attribute 'noise_std_dev' as shown in this example:\n\n"" <controllers>\n"" ...\n"" <my_controller ...>\n"" ...\n"" <sensors>\n"" ...\n"" <range_and_bearing implementation=\"medium\"\n"" medium=\"rab\"\n"" noise_std_dev=\"0.1\" />\n"" ...\n"" </sensors>\n"" ...\n"" </my_controller>\n"" ...\n"" </controllers>\n\n""In addition, it is possible to specify the probability that a packet gets lost\n""even though the robot should have received it (i.e., packet dropping). To set\n""this probability, use the attribute 'packet_drop_prob' as shown in the example:\n"" <controllers>\n"" ...\n"" <my_controller ...>\n"" ...\n"" <sensors>\n"" ...\n"" <range_and_bearing implementation=\"medium\"\n"" medium=\"rab\"\n"" packet_drop_prob=\"0.1\" />\n"" ...\n"" </sensors>\n"" ...\n"" </my_controller>\n"" ...\n"" </controllers>\n","Usable")


CRange< CRadians > argos::INCLINATION_RANGE (CRadians(0), CRadians(ARGOS_PI))