Skip to content

Commit 7aa0a15

Browse files
authored
Merge pull request #382 from AVSLab/feature/viz_2_1_5_support
Feature/viz 2 1 5 support
2 parents 2e2d7f5 + b042e8a commit 7aa0a15

File tree

14 files changed

+280
-44
lines changed

14 files changed

+280
-44
lines changed

docs/source/Vizard/Vizard.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ About Vizard
2424

2525
**License:** Freeware
2626

27-
**Status:** Version 2.1.4 (Released March 24, 2023)
27+
**Status:** Version 2.1.5 (Released June 28, 2023)
2828

2929
The Vizard Unity-based Basilisk
3030
visualization is able to display in a three-dimensional view the

docs/source/Vizard/VizardDownload.rst

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ The latest Vizard application binaries binaries can be directly downloaded using
1919

2020
The custom Unity asset loading requires Vizard v2.1.1 or later.
2121

22+
.. warning::
23+
24+
The newer version of Linux use a new GUI library that is not supported by the
25+
Vizard File Browser plug-in currently. If you can't select files to open in the GUI
26+
then use the ``loadFile`` command line option discussed in :ref:`vizardCommandLine`
2227

2328
The following optional downloads contain models for a range space objects that are too large to
2429
include in the main Vizard binary. You download the desired binaries for the platform you are using
@@ -40,25 +45,36 @@ On Window, install the bundle contents in::
4045

4146
C:/Users/your_user_name/AppData/LocalLow/Vizard/Vizard/Resources/CustomModels
4247

48+
Download the platform specific bundles file, unzip it, and move the contents to the ``CustomModels`` folder.
49+
50+
.. note::
4351

52+
Vizard does not support sub-folders in the ``CustomModels`` folder. All Unity asset files should
53+
be directly installed in the ``CustomModels`` folder.
4454

45-
.. list-table:: Unity 2020 Asset Download
46-
:widths: 25 30 15 15 15
55+
.. list-table:: Unity 2020 Asset Download (Vizard 2.1.1 - current)
56+
:widths: 15 40 15 15 15
4757
:header-rows: 1
4858

4959
* - Asset Name
50-
- Description
60+
- Summary
5161
-
5262
-
5363
-
54-
* - Asteroids
64+
* - :ref:`assetAsteroids`
5565
- Asteroid model package including high fidelity models of Bennu, Ryugu, Itokawa, as well as some
5666
generic asteroid models
5767
- :download:`macOS<https://hanspeterschaub.info/bskFiles/Assets/asteroids_macOS.zip>`
5868
- :download:`Linux<https://hanspeterschaub.info/bskFiles/Assets/asteroids_Linux.zip>`
5969
- :download:`Windows<https://hanspeterschaub.info/bskFiles/Assets/asteroids_Windows.zip>`
60-
* - Martian Moons
70+
* - :ref:`assetMartianMoons`
6171
- Package including models for Phobos and Deimos
6272
- :download:`macOS<https://hanspeterschaub.info/bskFiles/Assets/martianmoons_macOS.zip>`
6373
- :download:`Linux<https://hanspeterschaub.info/bskFiles/Assets/martianmoons_Linux.zip>`
6474
- :download:`Windows<https://hanspeterschaub.info/bskFiles/Assets/martianmoons_Windows.zip>`
75+
76+
.. toctree::
77+
:hidden:
78+
79+
assetAsteroids
80+
assetMartianMoons

docs/source/Vizard/VizardReleaseNotes.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,21 @@ Release Notes
1111
- Add the rate gyro visualization
1212
- Alternate camera view points relative to non-spacecraft locations (lunar landing site, etc.)
1313
- Add magnetic torque bar visualization
14-
- Add range to target information
1514
- Visualize aerobraking maneuvers
1615

16+
**Version 2.1.5 (June 28, 2023)**
17+
18+
- main camera range to target display (hot key = r, or toggle under Camera menu)
19+
- very far zoom-out of main camera in spacecraft local view when the ``forceStartAtSpacecraftLocalView``
20+
setting is set to 1
21+
- depth map generation available on instrument camera - can only be turned on in ``CameraConfig`` message
22+
- command line start of Vizard with file load (use argument ``-loadFile`` followed by the filepath)
23+
- updated NetMQ plugins to be compatible with Basilisk ZMQ 3.5.0 libraries
24+
- fixed the cause of the effectors appearing to fly-in at start-up
25+
- support for nested toggles for effectors for all HUDS and devices under the Actuator and Devices menus
26+
- Add the ability to visualize ground locations using a simple colored sphere. This allows 1000's of locations
27+
to be visualized. This is set through the ``useSimpleLocationMarkers`` flag.
28+
1729

1830
**Version 2.1.4 (March 24, 2023)**
1931

@@ -50,7 +62,7 @@ Release Notes
5062

5163
**Version 2.1.3 (Jan. 20, 2023)**
5264

53-
- added support for Settings flag ``ForceStartAtSpacecraftLocalView``. If this flag is set to 1, the main camera will stay in the spacecraft local view and has been improved to allow zooming out to very large distances from the camera target spacecraft. Vizard will remain locked in spacecraft local view unless a non-spacecraft camera target is selected.
65+
- added support for Settings flag ``forceStartAtSpacecraftLocalView``. If this flag is set to 1, the main camera will stay in the spacecraft local view and has been improved to allow zooming out to very large distances from the camera target spacecraft. Vizard will remain locked in spacecraft local view unless a non-spacecraft camera target is selected.
5466
- added MultiSphere support to ``VizMessage.proto`` and support visualizing the MultiSpheres on a spacecraft.
5567

5668

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
2+
.. _assetAsteroids:
3+
4+
5+
Asteroids
6+
=========
7+
8+
The following models are available inside this bundle and can be applied in Vizard by using
9+
the associated ModelKey. A few of the models are associated with more than one ModelKey
10+
and either key can be used to apply the model.
11+
12+
.. note::
13+
14+
The ModelKeys are case sensitive.
15+
16+
.. list-table:: Asteroids Asset Description
17+
:widths: 20 20 10 30 20
18+
:header-rows: 1
19+
20+
* - Model Description
21+
- Model Key(s)
22+
- Size
23+
- Model Source
24+
- Texture Source
25+
* - 5535 Anne Frank
26+
- AnneFrank, asteroid6
27+
- 236 KB
28+
- Provided by Matt Wronkiewicz to: http://www.celestiamotherlode.net/catalog/asteroids.html
29+
- Provided by Bob Hegwood at: http://www.celestiamotherlode.net/addon/addon_1167.html
30+
* - Bacchus
31+
- Bacchus, asteroid7
32+
- 94 KB
33+
- Provided by Jack Higgins to: http://www.celestiamotherlode.net/catalog/asteroids.html
34+
- https://assetstore.unity.com/packages/2d/textures-materials/rock-textures-4k-179128
35+
* - Bennu
36+
- Bennu
37+
- 85.3 MB
38+
- https://solarsystem.nasa.gov/resources/
39+
- n/a
40+
* - Eros
41+
- Eros, asteroid5
42+
- 126 KB
43+
- Provided by Grant Hutchison to: http://www.celestiamotherlode.net/catalog/asteroids.html
44+
- Provided by Grant Hutchison to: http://www.celestiamotherlode.net/catalog/asteroids.html
45+
* - FreeDemoRock
46+
- asteroid1
47+
- 46 KB
48+
- https://assetstore.unity.com/packages/3d/free-demo-rock-53146#publisher
49+
- https://assetstore.unity.com/packages/3d/free-demo-rock-53146#publisher
50+
* - Golevka
51+
- Golevka, asteroid3
52+
- 201 KB
53+
- https://nasa3d.arc.nasa.gov/detail/golevka
54+
- https://nasa3d.arc.nasa.gov/detail/mar1kuu2
55+
* - 25143 Itokawa
56+
- Itokawa
57+
- 1.8 MB
58+
- https://3d-asteroids.space/asteroids/25143-Itokawa
59+
- https://3d-asteroids.space/asteroids/25143-Itokawa
60+
* - 269 Justitia Coarse
61+
- justitia
62+
- 33.3 MB
63+
- https://astro.troja.mff.cuni.cz/projects/damit/asteroid_models/view/4966
64+
- https://assetstore.unity.com/packages/2d/textures- materials/terrain-textures-4k-179139#description
65+
* - 269 Justitia HiFi
66+
- 269, justHiFi4
67+
- 28.3 MB
68+
- University of Colorado ORCA Lab
69+
- https://assetstore.unity.com/packages/2d/textures- materials/terrain-textures-4k-179139#description
70+
* - Kleopatra
71+
- Kleopatra, asteroid4
72+
- 206 KB
73+
- https://nasa3d.arc.nasa.gov/detail/kleopatra
74+
- https://assetstore.unity.com/packages/2d/textures- materials/rock-textures-4k-179128
75+
* - Ryugu
76+
- Ryugu
77+
- 134 MB
78+
- Ryugu Shape Model by the shape model team (JAXA/ University of Aizu/ Kobe University) of
79+
the JAXA Hayabusa2 Project Science Team and is made available at the following site by the
80+
JAXA Hayabusa2 program: https://planetarium.jp/ryugu/
81+
- n/a
82+
* - Toutatis
83+
- Toutatis, asteroid2
84+
- 594 KB
85+
- https://nasa3d.arc.nasa.gov/detail/toutatis
86+
- https://assetstore.unity.com/packages/2d/textures- materials/rock-textures-4k-179128
87+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
.. _assetMartianMoons:
3+
4+
5+
Martian Moons
6+
=============
7+
8+
The following models are available inside this bundle and can be applied in Vizard by using
9+
the associated ModelKey. A few of the models are associated with more than one ModelKey
10+
and either key can be used to apply the model.
11+
12+
.. note::
13+
14+
The ModelKeys are case sensitive.
15+
16+
.. list-table:: Martian Moons Asset Description
17+
:widths: 20 20 10 30 20
18+
:header-rows: 1
19+
20+
* - Model Description
21+
- Model Key(s)
22+
- Size
23+
- Model Source
24+
- Texture Source
25+
* - Deimos
26+
- Deimos
27+
- 1.2Mb
28+
- https://solarsystem.nasa.gov/resources/
29+
- http://www.celestiamotherlode.net/
30+
* - Phobos
31+
- Phobos
32+
- 1.0Mb
33+
- https://solarsystem.nasa.gov/resources/
34+
- http://www.celestiamotherlode.net/

docs/source/Vizard/vizardAdvanced/vizardCommandLine.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ To launch an instance of the `Vizard <vizard>`_ application from the command lin
1313

1414
The `Vizard <vizard>`_ application supports the following command line arguments:
1515

16+
#. To launch `Vizard <vizard>`_ application and automatically load a playback binary Vizard data file,
17+
use the ``-loadFile`` argument followed by the filepath::
18+
19+
open /Applications/Vizard.app --args -loadFile ~/filepath/filename.bin
20+
1621
#. To launch `Vizard <vizard>`_ application in opNav mode, use the ``-opNav`` argument followed
1722
by the TCP address `Vizard <vizard>`_ should connect to::
1823

docs/source/Vizard/vizardAdvanced/vizardSettings.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ default setting for that behavior.
184184
* - ``showLocationLabels``
185185
- int
186186
- Value of 0 (protobuffer default) to use viz default, -1 for false, 1 for true
187+
* - ``useSimpleLocationMarkers``
188+
- int
189+
- Value of 0 (protobuffer default) to use simplified Location markers when number
190+
of locations is greater than 100, -1 to force use of full-featured Location, 1 to
191+
force use of simplified Location (no cones, range, or communication lines)
187192
* - ``atmospheresOff``
188193
- int
189194
- Toggle to disable the atmosphere effect on celestial bodies, Value of 0 (protobuffer default to use
@@ -662,6 +667,42 @@ The following table illustrates the possible variables for the
662667
-
663668
- No
664669
- If true, commands camera to update Instrument Camera to current message's parameters
670+
* - ``renderMode``
671+
- int
672+
-
673+
- No
674+
- Value of 0 to render visual image (default), value of 1 to render depth buffer to image
675+
* - ``depthMapClippingPlanes``
676+
- double(2)
677+
- m
678+
- No
679+
- Set the bounds of rendered depth map by setting the near and far clipping planes when
680+
in renderMode=1 (depthMap mode). Default values of 0.1 and 100.
681+
682+
683+
If the ``renderMode`` is set to 1 the camera outputs a depth map.
684+
Depth maps rendered by an Instrument Camera utilize Unity’s ``Linear01Depth`` shader helper macro inside
685+
Vizard’s DepthMap shader. The macro linearizes the non-linear internal depth texture whose precision
686+
is configuration and platform dependent to return a value between 0 and 1 where 1 is the maximum depth.
687+
Vizard’s DepthMap shader takes the value returned and encodes it as an RGB color. The far clipping plane
688+
of the Instrument Camera determines the maximum depth of the rendered texture and can be set as part of
689+
the camera configuration.
690+
691+
.. warning::
692+
693+
The internal depth texture values are more accurate for objects closer to the camera. Error in
694+
the calculated depth increases with distance from the camera.
695+
696+
697+
To decode the depth for a specific pixel, sample its RGB color values :math:`(r,g,b)` and calculate the depth as as:
698+
699+
.. math::
700+
701+
depth = (farClippingPlane)(\frac{\frac{\frac{b} {256} +g} {256} + r} {256})
702+
703+
If the depth is equal to or greater than the far clipping plane of the instrument camera,
704+
the pixel color will be white (255, 255, 255).
705+
665706

666707

667708

examples/scenarioIntegrators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,17 @@ def run(show_plots, integratorCase):
171171
show_plots (bool): Determines if the script should display plots
172172
integratorCase (bool): Specify what type of integrator to use in the simulation
173173
174-
======= ============================
174+
================= ============================
175175
String Definition
176-
======= ============================
176+
================= ============================
177177
'rk4' RK4 - default
178178
'rkf45' RKF45
179179
'rkf78' RKF78
180180
'rk2' RK2
181181
'euler' Euler or RK1
182182
'rk3' RK3
183183
'bogackiShampine' Bogacki-Shampine adaptive
184-
======= ============================
184+
================= ============================
185185
186186
"""
187187

src/architecture/msgPayloadDefC/CameraConfigMsgPayload.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ typedef struct {
4141
double ppFocalLength; //!< [m] (Optional) Valid setting range: 0.001m to 0.3m. Value of 0 to turn off this parameter entirely.
4242
int ppMaxBlurSize; //!< (Optional) Convolution kernel size of the bokeh filter, which determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required). Depth textures Value of 1 for Small, 2 for Medium, 3 for Large, 4 for Extra Large. Value of 0 to turn off this parameter entirely.
4343
int updateCameraParameters; //!< If true, commands camera to update Instrument Camera to current message's parameters
44+
int renderMode; //!< (Optional) Value of 0 to render visual image (default), value of 1 to render depth buffer to image
45+
double depthMapClippingPlanes[2]; //!< (Optional) [m] Set the bounds of rendered depth map by setting the near and far clipping planes when in renderMode=1 (depthMap mode). Default values of 0.1 and 100.
4446
}CameraConfigMsgPayload;
4547

4648
#endif

src/simulation/dynamics/Integrators/_UnitTest/test_Integrators.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ def run(doUnitTests, show_plots, integratorCase):
8282
simulationTimeStep = macros.sec2nano(120.)
8383
dynProcess.addTask(scSim.CreateNewTask(simTaskName, simulationTimeStep))
8484

85-
# if this scenario is to interface with the BSK Viz, uncomment the following lines
86-
# unitTestSupport.enableVisualization(scSim, dynProcess, simProcessName, 'earth') # The Viz only support 'earth', 'mars', or 'sun'
87-
8885
#
8986
# setup the simulation tasks/objects
9087
#

0 commit comments

Comments
 (0)