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
fa405968
Commit
fa405968
authored
7 years ago
by
Olivier Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Add blender test function to check install blender+navipy
parent
43a8f6af
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/database.rst
+33
-0
33 additions, 0 deletions
doc/source/tutorials/database.rst
navipy/sensors/blendnavipy_test.py
+12
-0
12 additions, 0 deletions
navipy/sensors/blendnavipy_test.py
with
45 additions
and
0 deletions
doc/source/tutorials/database.rst
0 → 100644
+
33
−
0
View file @
fa405968
How to generate a database using blender
----------------------------------------
.. literalinclude:: examples/blenddemo_beesampling.py
:lines: 7, 8
First we configure the rendering module
.. literalinclude:: examples/blenddemo_beesampling.py
:lines: 11, 12
With the toolbox at disposition we just need to configure the \
BeeSampling to render images on a regular 3D grid.
.. literalinclude:: examples/blenddemo_beesampling.py
:lines: 13,16-23
If we want to use the distance to objects, we need to tell the \
BeeSampling what is the maximum distance to objects in the environment.\
Otherwise the distance can go until infinity, and since the image are \
compressed in the database, all distances to object will be equal to \
zero:
.. literalinclude:: examples/blenddemo_beesampling.py
:lines: 27-28
Finally we can generate the database.
.. literalinclude:: examples/blenddemo_beesampling.py
:dedent: 4
:lines: 31-32
(:download:`Source code <examples/blenddemo_beesampling.py>`)
(:download:`Blender world <../../../navipy/resources/forest_world.blend>`)
This diff is collapsed.
Click to expand it.
navipy/sensors/blendnavipy_test.py
0 → 100644
+
12
−
0
View file @
fa405968
"""
A small script to test if navipy can run under blender
"""
try
:
import
navipy
# noqa F401
except
ModuleNotFoundError
:
# noqa F821
raise
NameError
(
'
navipy could not be imported within blender scripting tool.
'
+
'
This script should be run with the command blendnavipy.
'
+
'
If you did, you need to check that either the virtual
'
+
'
environment can be activated under blender, or that
'
+
'
the path can be reached by blender
'
)
print
(
'
Blender has been successfully imported
'
)
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