From 3e0cae2a691f7d6997b78fd75d8df5fd0064ef23 Mon Sep 17 00:00:00 2001 From: "Olivier J.N. Bertrand" <olivier.bertrand@uni-bielefeld.de> Date: Wed, 7 Feb 2018 17:00:01 +0100 Subject: [PATCH] Update doc --- doc/source/tutorials.rst | 45 ++++++++++++++-------------------------- navipy/__init__.py | 4 ++-- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/doc/source/tutorials.rst b/doc/source/tutorials.rst index 5cec029..da5d1ca 100644 --- a/doc/source/tutorials.rst +++ b/doc/source/tutorials.rst @@ -1,8 +1,8 @@ Tutorials ========= -Average skyline vector homing ------------------------------ +Average place-code vector homing +-------------------------------- Homing with an average skyline vector consist of deriving the skyline \ or an approximation of it from the visual information. For example, \ 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. \ The difference gives the homing vector, i.e. a vector proportional to \ 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 ~~~~~~~~~ + By restricting the agent motion on a grid, we can used a database containing \ images rendered at pre defined location (the grid nodes). .. literalinclude:: example/tutorials/asv_homing_grid.py - :lines: 13 + :lines: 35 And initialise the senses of our virtual agent .. literalinclude:: example/tutorials/asv_homing_grid.py - :lines: 14 - -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 + :lines: 36 Now we have to initialise an agent moving on a grid (i.e. a GridAgent) .. literalinclude:: example/tutorials/asv_homing_grid.py - :lines: 24 + :lines: 38 at an initial position .. 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 .. 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 :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 ~~~~~~~~~~~~~ Catchment area of ASV --------------------- + Comparing modalities -------------------- diff --git a/navipy/__init__.py b/navipy/__init__.py index 3e7156c..11aa540 100644 --- a/navipy/__init__.py +++ b/navipy/__init__.py @@ -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. -.. literalinclude:: example/processing/apcv.py +.. literalinclude:: example/brain/static_brain.py :lines: 3,7-15 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 """ -- GitLab