box_entity.cpp File Reference
#include "box_entity.h"
#include <argos3/core/utility/math/matrix/rotationmatrix3.h>
#include <argos3/core/simulator/space/space.h>
#include <argos3/core/simulator/simulator.h>
#include <argos3/plugins/simulator/media/led_medium.h>
#include <argos3/plugins/simulator/physics_engines/physics_box_model.h>
Include dependency graph for box_entity.cpp:

Go to the source code of this file.

Namespaces

 argos
 The namespace containing all the ARGoS related code.
 

Functions

 argos::REGISTER_ENTITY (CBoxEntity, "box", "Carlo Pinciroli [ilpincy@gmail.com]", "1.0", "A stretchable 3D box.", "The box entity can be used to model walls, obstacles or box-shaped grippable\n" "objects. It can be movable or not. A movable object can be pushed and gripped.\n" "An unmovable object is pretty much like a wall.\n\n" "REQUIRED XML CONFIGURATION\n\n" "To declare an unmovable object (i.e., a wall) you need the following:\n\n" " <arena ...>\n" " ...\n" " <box id=\"box1\" size=\"0.75,0.1,0.5\" movable=\"false\">\n" " <body position=\"0.4,2.3,0\" orientation=\"45,0,0\" />\n" " </box>\n" " ...\n" " </arena>\n\n" "To declare a movable object you need the following:\n\n" " <arena ...>\n" " ...\n" " <box id=\"box1\" size=\"0.75,0.1,0.5\" movable=\"true\" mass=\"2.5\">\n" " <body position=\"0.4,2.3,0\" orientation=\"45,0,0\" />\n" " </box>\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 'size' attribute specifies the size of the box along the three axes, in\n" "the X,Y,Z order. When you add a box, imagine it initially unrotated and\n" "centered in the origin. The size, then, corresponds to the extent along the X,\n" "Y and Z axes.\n" "The 'movable' attribute specifies whether or not the object is movable. When\n" "set to 'false', the object is unmovable: if another object pushes against it,\n" "the box won't move. When the attribute is set to 'true', the box is movable\n" "upon pushing or gripping. When an object is movable, the 'mass' attribute is\n" "required.\n" "The 'mass' attribute quantifies the mass of the box in kg.\n" "The 'body/position' attribute specifies the position of the base of the box in\n" "the arena. The three values are in the X,Y,Z order.\n" "The 'body/orientation' attribute specifies the orientation of the 3D box. All\n" "rotations are performed with respect to the center of mass. 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.\n\n" "OPTIONAL XML CONFIGURATION\n\n" "It is possible to add any number of colored LEDs to the box. In this way,\n" "the box is visible with a robot camera. The position and color of the\n" "LEDs is specified with the following syntax:\n\n" " <arena ...>\n" " ...\n" " <box id=\"box1\" size=\"0.75,0.1,0.5\" movable=\"true\" mass=\"2.5\">\n" " <body position=\"0.4,2.3,0\" orientation=\"45,0,0\" />\n" " <leds medium=\"id_of_led_medium\">\n" " <led offset=\" 0.15, 0.15,0.15\" anchor=\"origin\" color=\"white\" />\n" " <led offset=\"-0.15, 0.15,0\" anchor=\"origin\" color=\"red\" />\n" " <led offset=\" 0.15, 0.15,0\" anchor=\"origin\" color=\"blue\" />\n" " <led offset=\" 0.15,-0.15,0\" anchor=\"origin\" color=\"green\" />\n" " </leds>\n" " </box>\n" " ...\n" " </arena>\n\n" "In the example, four LEDs are added to the box. The LEDs have\n" "different colors and are located one on the top and three\n" "around the box. The LEDs are managed by the LED medium declared in\n" "the <media> section of the configuration file with id \"id_of_led_medium\"", "Usable")
 
 argos::REGISTER_STANDARD_SPACE_OPERATIONS_ON_COMPOSABLE (CBoxEntity)