Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/Vizard/Vizard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ About Vizard

**License:** Freeware

**Status:** Version 2.1.4 (Released March 24, 2023)
**Status:** Version 2.1.5 (Released June 28, 2023)

The Vizard Unity-based Basilisk
visualization is able to display in a three-dimensional view the
Expand Down
26 changes: 21 additions & 5 deletions docs/source/Vizard/VizardDownload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ The latest Vizard application binaries binaries can be directly downloaded using

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

.. warning::

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

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

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

Download the platform specific bundles file, unzip it, and move the contents to the ``CustomModels`` folder.

.. note::

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

.. list-table:: Unity 2020 Asset Download
:widths: 25 30 15 15 15
.. list-table:: Unity 2020 Asset Download (Vizard 2.1.1 - current)
:widths: 15 40 15 15 15
:header-rows: 1

* - Asset Name
- Description
- Summary
-
-
-
* - Asteroids
* - :ref:`assetAsteroids`
- Asteroid model package including high fidelity models of Bennu, Ryugu, Itokawa, as well as some
generic asteroid models
- :download:`macOS<https://hanspeterschaub.info/bskFiles/Assets/asteroids_macOS.zip>`
- :download:`Linux<https://hanspeterschaub.info/bskFiles/Assets/asteroids_Linux.zip>`
- :download:`Windows<https://hanspeterschaub.info/bskFiles/Assets/asteroids_Windows.zip>`
* - Martian Moons
* - :ref:`assetMartianMoons`
- Package including models for Phobos and Deimos
- :download:`macOS<https://hanspeterschaub.info/bskFiles/Assets/martianmoons_macOS.zip>`
- :download:`Linux<https://hanspeterschaub.info/bskFiles/Assets/martianmoons_Linux.zip>`
- :download:`Windows<https://hanspeterschaub.info/bskFiles/Assets/martianmoons_Windows.zip>`

.. toctree::
:hidden:

assetAsteroids
assetMartianMoons
16 changes: 14 additions & 2 deletions docs/source/Vizard/VizardReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ Release Notes
- Add the rate gyro visualization
- Alternate camera view points relative to non-spacecraft locations (lunar landing site, etc.)
- Add magnetic torque bar visualization
- Add range to target information
- Visualize aerobraking maneuvers

**Version 2.1.5 (June 28, 2023)**

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


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

Expand Down Expand Up @@ -50,7 +62,7 @@ Release Notes

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

- 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.
- 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.
- added MultiSphere support to ``VizMessage.proto`` and support visualizing the MultiSpheres on a spacecraft.


Expand Down
87 changes: 87 additions & 0 deletions docs/source/Vizard/assetAsteroids.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

.. _assetAsteroids:


Asteroids
=========

The following models are available inside this bundle and can be applied in Vizard by using
the associated ModelKey. A few of the models are associated with more than one ModelKey
and either key can be used to apply the model.

.. note::

The ModelKeys are case sensitive.

.. list-table:: Asteroids Asset Description
:widths: 20 20 10 30 20
:header-rows: 1

* - Model Description
- Model Key(s)
- Size
- Model Source
- Texture Source
* - 5535 Anne Frank
- AnneFrank, asteroid6
- 236 KB
- Provided by Matt Wronkiewicz to: http://www.celestiamotherlode.net/catalog/asteroids.html
- Provided by Bob Hegwood at: http://www.celestiamotherlode.net/addon/addon_1167.html
* - Bacchus
- Bacchus, asteroid7
- 94 KB
- Provided by Jack Higgins to: http://www.celestiamotherlode.net/catalog/asteroids.html
- https://assetstore.unity.com/packages/2d/textures-materials/rock-textures-4k-179128
* - Bennu
- Bennu
- 85.3 MB
- https://solarsystem.nasa.gov/resources/
- n/a
* - Eros
- Eros, asteroid5
- 126 KB
- Provided by Grant Hutchison to: http://www.celestiamotherlode.net/catalog/asteroids.html
- Provided by Grant Hutchison to: http://www.celestiamotherlode.net/catalog/asteroids.html
* - FreeDemoRock
- asteroid1
- 46 KB
- https://assetstore.unity.com/packages/3d/free-demo-rock-53146#publisher
- https://assetstore.unity.com/packages/3d/free-demo-rock-53146#publisher
* - Golevka
- Golevka, asteroid3
- 201 KB
- https://nasa3d.arc.nasa.gov/detail/golevka
- https://nasa3d.arc.nasa.gov/detail/mar1kuu2
* - 25143 Itokawa
- Itokawa
- 1.8 MB
- https://3d-asteroids.space/asteroids/25143-Itokawa
- https://3d-asteroids.space/asteroids/25143-Itokawa
* - 269 Justitia Coarse
- justitia
- 33.3 MB
- https://astro.troja.mff.cuni.cz/projects/damit/asteroid_models/view/4966
- https://assetstore.unity.com/packages/2d/textures- materials/terrain-textures-4k-179139#description
* - 269 Justitia HiFi
- 269, justHiFi4
- 28.3 MB
- University of Colorado ORCA Lab
- https://assetstore.unity.com/packages/2d/textures- materials/terrain-textures-4k-179139#description
* - Kleopatra
- Kleopatra, asteroid4
- 206 KB
- https://nasa3d.arc.nasa.gov/detail/kleopatra
- https://assetstore.unity.com/packages/2d/textures- materials/rock-textures-4k-179128
* - Ryugu
- Ryugu
- 134 MB
- Ryugu Shape Model by the shape model team (JAXA/ University of Aizu/ Kobe University) of
the JAXA Hayabusa2 Project Science Team and is made available at the following site by the
JAXA Hayabusa2 program: https://planetarium.jp/ryugu/
- n/a
* - Toutatis
- Toutatis, asteroid2
- 594 KB
- https://nasa3d.arc.nasa.gov/detail/toutatis
- https://assetstore.unity.com/packages/2d/textures- materials/rock-textures-4k-179128

34 changes: 34 additions & 0 deletions docs/source/Vizard/assetMartianMoons.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

.. _assetMartianMoons:


Martian Moons
=============

The following models are available inside this bundle and can be applied in Vizard by using
the associated ModelKey. A few of the models are associated with more than one ModelKey
and either key can be used to apply the model.

.. note::

The ModelKeys are case sensitive.

.. list-table:: Martian Moons Asset Description
:widths: 20 20 10 30 20
:header-rows: 1

* - Model Description
- Model Key(s)
- Size
- Model Source
- Texture Source
* - Deimos
- Deimos
- 1.2Mb
- https://solarsystem.nasa.gov/resources/
- http://www.celestiamotherlode.net/
* - Phobos
- Phobos
- 1.0Mb
- https://solarsystem.nasa.gov/resources/
- http://www.celestiamotherlode.net/
5 changes: 5 additions & 0 deletions docs/source/Vizard/vizardAdvanced/vizardCommandLine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ To launch an instance of the `Vizard <vizard>`_ application from the command lin

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

#. To launch `Vizard <vizard>`_ application and automatically load a playback binary Vizard data file,
use the ``-loadFile`` argument followed by the filepath::

open /Applications/Vizard.app --args -loadFile ~/filepath/filename.bin

#. To launch `Vizard <vizard>`_ application in opNav mode, use the ``-opNav`` argument followed
by the TCP address `Vizard <vizard>`_ should connect to::

Expand Down
41 changes: 41 additions & 0 deletions docs/source/Vizard/vizardAdvanced/vizardSettings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ default setting for that behavior.
* - ``showLocationLabels``
- int
- Value of 0 (protobuffer default) to use viz default, -1 for false, 1 for true
* - ``useSimpleLocationMarkers``
- int
- Value of 0 (protobuffer default) to use simplified Location markers when number
of locations is greater than 100, -1 to force use of full-featured Location, 1 to
force use of simplified Location (no cones, range, or communication lines)
* - ``atmospheresOff``
- int
- Toggle to disable the atmosphere effect on celestial bodies, Value of 0 (protobuffer default to use
Expand Down Expand Up @@ -662,6 +667,42 @@ The following table illustrates the possible variables for the
-
- No
- If true, commands camera to update Instrument Camera to current message's parameters
* - ``renderMode``
- int
-
- No
- Value of 0 to render visual image (default), value of 1 to render depth buffer to image
* - ``depthMapClippingPlanes``
- double(2)
- m
- No
- 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.


If the ``renderMode`` is set to 1 the camera outputs a depth map.
Depth maps rendered by an Instrument Camera utilize Unity’s ``Linear01Depth`` shader helper macro inside
Vizard’s DepthMap shader. The macro linearizes the non-linear internal depth texture whose precision
is configuration and platform dependent to return a value between 0 and 1 where 1 is the maximum depth.
Vizard’s DepthMap shader takes the value returned and encodes it as an RGB color. The far clipping plane
of the Instrument Camera determines the maximum depth of the rendered texture and can be set as part of
the camera configuration.

.. warning::

The internal depth texture values are more accurate for objects closer to the camera. Error in
the calculated depth increases with distance from the camera.


To decode the depth for a specific pixel, sample its RGB color values :math:`(r,g,b)` and calculate the depth as as:

.. math::

depth = (farClippingPlane)(\frac{\frac{\frac{b} {256} +g} {256} + r} {256})

If the depth is equal to or greater than the far clipping plane of the instrument camera,
the pixel color will be white (255, 255, 255).




Expand Down
6 changes: 3 additions & 3 deletions examples/scenarioIntegrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,17 @@ def run(show_plots, integratorCase):
show_plots (bool): Determines if the script should display plots
integratorCase (bool): Specify what type of integrator to use in the simulation

======= ============================
================= ============================
String Definition
======= ============================
================= ============================
'rk4' RK4 - default
'rkf45' RKF45
'rkf78' RKF78
'rk2' RK2
'euler' Euler or RK1
'rk3' RK3
'bogackiShampine' Bogacki-Shampine adaptive
======= ============================
================= ============================

"""

Expand Down
2 changes: 2 additions & 0 deletions src/architecture/msgPayloadDefC/CameraConfigMsgPayload.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ typedef struct {
double ppFocalLength; //!< [m] (Optional) Valid setting range: 0.001m to 0.3m. Value of 0 to turn off this parameter entirely.
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.
int updateCameraParameters; //!< If true, commands camera to update Instrument Camera to current message's parameters
int renderMode; //!< (Optional) Value of 0 to render visual image (default), value of 1 to render depth buffer to image
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.
}CameraConfigMsgPayload;

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ def run(doUnitTests, show_plots, integratorCase):
simulationTimeStep = macros.sec2nano(120.)
dynProcess.addTask(scSim.CreateNewTask(simTaskName, simulationTimeStep))

# if this scenario is to interface with the BSK Viz, uncomment the following lines
# unitTestSupport.enableVisualization(scSim, dynProcess, simProcessName, 'earth') # The Viz only support 'earth', 'mars', or 'sun'

#
# setup the simulation tasks/objects
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ VizSettings
double spacecraftSizeMultiplier = -1; //!< Control the display size of spacecraft in the Planet and Solar System Views, values greater than 0, use negative value to use viz default
double spacecraftHelioViewSizeMultiplier = -1; //!< Control the display size of spacecraft in the Solar System View, values greater than 0, use negative value to use viz default
int forceStartAtSpacecraftLocalView = -1; //!< Require Vizard to start up in spacecraft-view on start up
int useSimpleLocationMarkers = 0; //!< Value of 0 (protobuffer default) to use simplified Location markers when number of locations is greater than 100, -1 to force use of full-featured Location, 1 to force use of simplified Location (no cones, range, or communication lines)

int32_t showLocationCommLines = 0; //!< Value of 0 (protobuffer default) to use viz default, -1 for false, 1 for true
int32_t showLocationCones = 0; //!< Value of 0 (protobuffer default) to use viz default, -1 for false, 1 for true
Expand Down
10 changes: 9 additions & 1 deletion src/simulation/vizard/vizInterface/vizInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ void VizInterface::WriteProtobuffer(uint64_t CurrentSimNanos)
vizSettings->set_spacecraftsizemultiplier(this->settings.spacecraftSizeMultiplier);
vizSettings->set_spacecrafthelioviewsizemultiplier(this->settings.spacecraftHelioViewSizeMultiplier);
vizSettings->set_forcestartatspacecraftlocalview(this->settings.forceStartAtSpacecraftLocalView);
vizSettings->set_usesimplelocationmarkers(this->settings.useSimpleLocationMarkers);
vizSettings->set_showlocationcommlines(this->settings.showLocationCommLines);
vizSettings->set_showlocationcones(this->settings.showLocationCones);
vizSettings->set_showlocationlabels(this->settings.showLocationLabels);
Expand Down Expand Up @@ -974,7 +975,8 @@ void VizInterface::WriteProtobuffer(uint64_t CurrentSimNanos)
camera->add_resolution(this->cameraConfigBuffers[camCounter].resolution[j]);
}
camera->add_cameradir_b(unityCameraMRP[j]);
camera->add_camerapos_b(this->cameraConfigBuffers[camCounter].cameraPos_B[j]); }
camera->add_camerapos_b(this->cameraConfigBuffers[camCounter].cameraPos_B[j]);
}
camera->set_renderrate(this->cameraConfigBuffers[camCounter].renderRate); // Unity expects nano-seconds between images
camera->set_cameraid(this->cameraConfigBuffers[camCounter].cameraID);
camera->set_fieldofview(this->cameraConfigBuffers[camCounter].fieldOfView*R2D); // Unity expects degrees
Expand All @@ -986,6 +988,12 @@ void VizInterface::WriteProtobuffer(uint64_t CurrentSimNanos)
camera->set_ppfocallength(this->cameraConfigBuffers[camCounter].ppFocalLength*1000.); // Unity expects mm
camera->set_ppmaxblursize(this->cameraConfigBuffers[camCounter].ppMaxBlurSize);
camera->set_updatecameraparameters(this->cameraConfigBuffers[camCounter].updateCameraParameters);
camera->set_rendermode(this->cameraConfigBuffers[camCounter].renderMode);
if (this->cameraConfigBuffers[camCounter].depthMapClippingPlanes[0] > 0.0) {
for (int j=0; j<2; j++) {
camera->add_depthmapclippingplanes(this->cameraConfigBuffers[camCounter].depthMapClippingPlanes[j]);
}
}
}
}

Expand Down
Loading