1
This file is created at Almende B.V. It is open-source software and part of the
2
Common Hybrid Agent Platform (CHAP). A toolbox with a lot of open-source tools,
3
ranging from thread pools and TCP/IP components to control architectures and
4
learning algorithms. This software is published under the GNU Lesser General
7
It is not possible to add usage restrictions to an open-source license.
8
Nevertheless, we personally strongly object against this software used by the
9
military, in the bio-industry, for animal experimentation, or anything that
10
violates the Universal Declaration of Human Rights.
12
Copyright © 2010 Anne van Rossum <anne@almende.com>
13
Author Anne van Rossum
15
================================================================================
17
The Robot3D simulator can receive commands over YARP and will respond by sending
18
messages over YARP. The most familiar message format is the "Bottle" defined in
21
The first section will describe syntax details. The other sections will assume
22
the syntax is understood.
24
================================================================================
26
================================================================================
29
* Sensor configuration
30
* Camera configuration
32
================================================================================
34
================================================================================
36
Each robot does have a list of sensors, actuators, etc. They all have their own
37
YARP port. To obtain the port names, use the following syntax:
39
RPC_VOCAB_PORT port_type [index]
41
The command in all capitals is a "Vocab". An integer that can be used as a 1-4
42
letter string. This makes it possible to write this type of C-statements:
44
case VOCAB4('p','o','r','t'): // do something
47
The port_type can be "sensor", "actuator", or "all". The index can be used to
48
get the name of only one YARP port.
50
The Robot3D simulator will respond with:
52
(port_name* VOCAB_OK) | VOCAB_FAILED
54
Here port_name is a string denoting the name of a port. The asterisk "*" means
55
that it returns a list (of minimal 1 item). The list ends with a VOCAB_OK. The
56
alternative is indicated by the OR operator "|", and would only consist out of
59
Example in C++ is given in RFModuleRPC::getRemotePorts.
61
================================================================================
63
================================================================================
66
================================================================================
68
================================================================================
70
Towards the Robot3D simulator
72
RPC_VOCAB_CCAM vocab_side vocab_io parameter [value]
76
vocab_side = VOCAB_BACK | VOCAB_FRONT | VOCAB_LEFT | VOCAB_RIGHT
77
vocab_io = VOCAB_GET | VOCAB_SET
78
parameter = "MinDistance" | "MaxDistance" | "FlareAngle" | "Frustum" |
79
"Resolution" | "Background"
80
value = float | osg::Vec2 | osg::Vec3 | osg::Vec4
82
The value is necessary when setting a parameter using VOCAB_SET, and can be of
83
a diversity of types that correspond with the parameter, an angle is a float.
87
(value VOCAB_OK) | VOCAB_FAILED