Skip to content
Snippets Groups Projects
Commit 3e0cae2a authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Update doc

parent d8e95281
No related branches found
No related tags found
No related merge requests found
Tutorials Tutorials
========= =========
Average skyline vector homing Average place-code vector homing
----------------------------- --------------------------------
Homing with an average skyline vector consist of deriving the skyline \ Homing with an average skyline vector consist of deriving the skyline \
or an approximation of it from the visual information. For example, \ or an approximation of it from the visual information. For example, \
ultra violet light is mostly present in the sky, and thus by summing \ ultra violet light is mostly present in the sky, and thus by summing \
...@@ -21,66 +21,53 @@ vector, at the goal and current location are compared by simple difference. \ ...@@ -21,66 +21,53 @@ vector, at the goal and current location are compared by simple difference. \
The difference gives the homing vector, i.e. a vector proportional to \ The difference gives the homing vector, i.e. a vector proportional to \
the velocity of the agent. the velocity of the agent.
Our agent needs to have a function to convert its current state to a motion. \
This function, velocity, can be added as follow:
.. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 12-30
On a grid On a grid
~~~~~~~~~ ~~~~~~~~~
By restricting the agent motion on a grid, we can used a database containing \ By restricting the agent motion on a grid, we can used a database containing \
images rendered at pre defined location (the grid nodes). images rendered at pre defined location (the grid nodes).
.. literalinclude:: example/tutorials/asv_homing_grid.py .. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 13 :lines: 35
And initialise the senses of our virtual agent And initialise the senses of our virtual agent
.. literalinclude:: example/tutorials/asv_homing_grid.py .. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 14 :lines: 36
The agent should calculate the average skyline location at its home location \
i.e. the goal location during the homing task.
.. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 17-19
Our agent should have a method to calculate its velocity from the \
current sensory information to reach its home location. The ASV homing \
model is the method, and can be defined as follow:
.. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 41-50
Now we have to initialise an agent moving on a grid (i.e. a GridAgent) Now we have to initialise an agent moving on a grid (i.e. a GridAgent)
.. literalinclude:: example/tutorials/asv_homing_grid.py .. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 24 :lines: 38
at an initial position at an initial position
.. literalinclude:: example/tutorials/asv_homing_grid.py .. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 27-29 :lines: 40-43
a mode of motion corresponding to the grid used in the database a mode of motion corresponding to the grid used in the database
.. literalinclude:: example/tutorials/asv_homing_grid.py .. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 32-36 :lines: 36-50
and the function to calculate the velocity, i.e. the motion of the agent Finally our agent is ready to fly for a number of step or until its velocity is null.
.. literalinclude:: example/tutorials/asv_homing_grid.py .. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 53-54 :lines: 53-54
Note that the position orientation and derivative (posorient_vel) is not \
used by the function, but is required by the GridAgent.
Finally our agent is ready to fly for number of step or until its velocity is null.
.. literalinclude:: example/tutorials/asv_homing_grid.py
:lines: 56-57
In close loop In close loop
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Catchment area of ASV Catchment area of ASV
--------------------- ---------------------
Comparing modalities Comparing modalities
-------------------- --------------------
......
...@@ -28,12 +28,12 @@ an agent, the Brain should have a function called velocity. ...@@ -28,12 +28,12 @@ an agent, the Brain should have a function called velocity.
For example, an stationary agent should always return a null velocity. For example, an stationary agent should always return a null velocity.
.. literalinclude:: example/processing/apcv.py .. literalinclude:: example/brain/static_brain.py
:lines: 3,7-15 :lines: 3,7-15
An agent using an average skyline homing vector, could be build as follow An agent using an average skyline homing vector, could be build as follow
.. literalinclude:: example/processing/apcv.py .. literalinclude:: example/brain/asv_brain.py
:lines: 3,7-34 :lines: 3,7-34
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment