Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rogergranada committed May 7, 2018
1 parent 7b15cae commit f228061
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
20 changes: 10 additions & 10 deletions docs/source/gams-madara/background.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ The GAMS / Madara integrates the advantages of MADARA, a middleware for distribu

The Knowledge base is essentially the world model generated by each agent. Information about mission, location, orientation, and robot type (real or simulated) are populated on the basis of knowledges. Each agent mounts its base of knowledges according to the environment data obtained by the sensors. The data remains at the base as a mapping of all the stimuli captured by the platform.

The transport block is responsible for transferring knowledges through the agent network, allowing the exchange of information between the \ emph {knowledges} of each agent. Since the threader allows the programmer to create threads similarly to libraries threads, such as threads STL, boost threads, among others. The advantage of the threader is that it comes integrated with Knowledge base, ie each thread contains a reference to Knowledge Base, which is shared, updated by all threads of the agent.
The transport block is responsible for transferring knowledges through the agent network, allowing the exchange of information between the *knowledges* of each agent. Since the threader allows the programmer to create threads similarly to libraries threads, such as threads STL, boost threads, among others. The advantage of the threader is that it comes integrated with Knowledge base, i.e., each thread contains a reference to Knowledge Base, which is shared, updated by all threads of the agent.

Thus, with the integration of threads, transport services and knowledge services, MADARA stands out by allowing the sharing of data between agents and within the agent itself. The data are distributed transparently to the programmer, ie that sets new values and MADARA responsibility by grouping them in UDP packets and decide the best time to send them over the network, which tends to improve use. In addition, each variable mapped on the basis of Knowledge already offers automatically critical region protection through mutexes hence the user can view and change the values in different threads without worry with racing conditions.
Thus, with the integration of threads, transport services and knowledge services, MADARA stands out by allowing the sharing of data between agents and within the agent itself. The data are distributed transparently to the programmer, i.e., that sets new values and MADARA responsibility by grouping them in UDP packets and decide the best time to send them over the network, which tends to improve use. In addition, each variable mapped on the basis of Knowledge already offers automatically critical region protection through mutexes hence the user can view and change the values in different threads without worry with racing conditions.

As can be seen in figure below, the variables are mapped to Knowledge Base by a tuple: key and value. Each key must be unique and allows the programmer to identify a value stored in knowledge. The programmer can invoke explicit queries via the functions call, or you can tell that a variable of the type container is related to a specific key of the Knowledge Base. In the last case, whenever the value is updated, the variable will be automatically updated. The shape of the key has meaning and helps to identify if the value is private or, in case of being sent to other agents, it allows identifying who belongs to that value. Private variable keys begin with a dot, whereas a public variable of the number 4 agent must be prefixed with ``agent.4.``.

Expand All @@ -30,7 +30,7 @@ However, just set a variable is public does not guarantee that it will be delive
:align: center
:width: 400pt

Above, you can see GAMS diagram, which is build on top of MADARA middleware. GAMS heritage all characteristics. Algorithms developed by users are executed by ``Controller`` by running MAPE Loop. So, the main loop of GAMS can be resumed with following sequence diagram:
Above, you can see GAMS diagram, which is build on top of MADARA middleware. GAMS inherits all characteristics. Algorithms developed by users are executed by ``Controller`` by running MAPE Loop. So, the main loop of GAMS can be resumed with following sequence diagram:

.. image:: images/GamsRunLoop.png
:align: center
Expand All @@ -45,7 +45,7 @@ where the MAPE process is mapped as:
* Plan phase: algorithm plan;
* Execute phase: algorithm execution.

The possible values of PlatformAnalyzeStatus are:
The possible values of ``PlatformAnalyzeStatus`` are:

* UNKNOWN = 0,
* OK = 1,
Expand All @@ -60,7 +60,7 @@ The possible values of PlatformAnalyzeStatus are:
* MOVEMENT_AVAILABLE = 2048


The possible values of AlgorithmAnalyzeStatus are:
The possible values of ``AlgorithmAnalyzeStatus`` are:

* UNKNOWN = 0x00000000,
* OK = 0x00000001,
Expand All @@ -71,7 +71,7 @@ The possible values of AlgorithmAnalyzeStatus are:



There is many algorithms to be used in GAMS/MADARA.
There are many algorithms to be used in GAMS/MADARA.

* Formation coverage
* Prioritized Region Coverage
Expand All @@ -89,7 +89,7 @@ There is many algorithms to be used in GAMS/MADARA.
Coordinate systems
------------------

GAMS support two types of coordinate systems: GPS and cartesian. Each coordinate system can have a father, so you can create a tree of coordinate systems. For example, you can specify that you an cartesian coordinate system (named cartesian0) is child of a GPS frame by writing the following code:
GAMS supports two types of coordinate systems: GPS and cartesian. Each coordinate system can have a father, so you can create a tree of coordinate systems. For example, you can specify that an cartesian coordinate system (named ``cartesian0``) is child of a GPS frame by writing the following code:

.. code-block:: bash
Expand All @@ -98,20 +98,20 @@ GAMS support two types of coordinate systems: GPS and cartesian. Each coordinate
gams::pose::CartesianFrame cartesian0(gloc);
gams::pose::position c_loc0(cartesian0, 1, 1);
In the code above, to create a cartesian frame (named cartesian0) you have to define a position into the gps_frame. After that, you can create a point in the cartesian frame, by informing location (1,1) in relation to gps_frame. They will look like this:
In the code above, to create a cartesian frame (named ``cartesian0``) you have to define a position into the ``gps_frame``. After that, you can create a point in the cartesian frame, by informing location (1,1) in relation to ``gps_frame``. They will look like this:

.. image:: images/coordinateSystem.png
:align: center
:width: 400pt

Also you can convert between the coodinate systems. For example, to convert the position (2,0) from cartesian frame (cartesian0) to gps_frame, you should write:
Also you can convert between the coodinate systems. For example, to convert the position (2,0) from cartesian frame (``cartesian0``) to ``gps_frame``, you should write:

.. code-block:: bash
gams::pose::Position c_loc2(cartesian0, 2, 3);
gams::pose::Position gps_loc2 = c_loc2.transform_to(gps_frame);
Also, you can calc the distance between two points even if they are in different coordinate file system. The only restrition is their file systems be related.
Also, you can calculate the distance between two points even if they are in different coordinate file system. The only restrition is that their file systems must be related.

.. code-block:: bash
Expand Down
5 changes: 3 additions & 2 deletions docs/source/gams-madara/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ In this page, we will provide you a quick start with GAMS/MADARA.

Here, we focus into practical use of those tools, to formal concepts, we advise you to read papers available into internet. Also, we can watch some videos online in folowwing link:

.. image:: introduction_madara_gams.jpg
.. image:: images/introduction_madara_gams.jpg
:target: https://www.youtube.com/playlist?list=PLSNlEg26NNpwi4ggcPYU8JvS1aVtV60_z

:align: center
:width: 400pt

.. toctree::

Expand Down

0 comments on commit f228061

Please sign in to comment.