Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
navipy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olivier Bertrand
navipy
Commits
3e0cae2a
Commit
3e0cae2a
authored
7 years ago
by
Olivier Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Update doc
parent
d8e95281
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/source/tutorials.rst
+16
-29
16 additions, 29 deletions
doc/source/tutorials.rst
navipy/__init__.py
+2
-2
2 additions, 2 deletions
navipy/__init__.py
with
18 additions
and
31 deletions
doc/source/tutorials.rst
+
16
−
29
View file @
3e0cae2a
Tutorials
Tutorials
=========
=========
Average
skylin
e vector homing
Average
place-cod
e 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:
1
3
:lines: 3
5
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: 3
2-36
:lines: 3
6-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 i
s 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
--------------------
--------------------
...
...
This diff is collapsed.
Click to expand it.
navipy/__init__.py
+
2
−
2
View file @
3e0cae2a
...
@@ -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/
process
in
g
/a
pcv
.py
.. literalinclude:: example/
bra
in/a
sv_brain
.py
:lines: 3,7-34
:lines: 3,7-34
"""
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment