Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
11 changes: 8 additions & 3 deletions docs/source/Vizard/VizardDownload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,19 @@ 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::

.. list-table:: Unity 2020 Asset Download
:widths: 25 30 15 15 15
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 (Vizard 2.1.1 - 2.1.5)
:widths: 15 40 15 15 15
:header-rows: 1

* - Asset Name
- Description
- Summary
-
-
-
Expand Down
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
5 changes: 5 additions & 0 deletions docs/source/Vizard/vizardAdvanced/vizardSettings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ 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



Expand Down
1 change: 1 addition & 0 deletions src/architecture/msgPayloadDefC/CameraConfigMsgPayload.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ 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
}CameraConfigMsgPayload;

#endif
1 change: 1 addition & 0 deletions src/simulation/vizard/vizInterface/vizInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ 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);
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/utilities/vizProtobuffer/vizMessage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ message VizMessage{
double ppAperture = 13; // (Optional) Ratio of the aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is. Valid Setting Range: 0.05 to 32. Value of 0 to leave this option off.
double ppFocalLength = 14; // [mm] (Optional) Value of -1 to calculate the focal length automatically from the field-of-view value set on the camera, otherwise provide positive non-zero value in range. Valid setting range: 1mm to 300mm. Value of 0 to leave this option off.
int64 ppMaxBlurSize = 15; //(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 leave this option off.
int64 renderMode = 16; //(Optional) Value of 0 to render visual image (default), value of 1 to render depth buffer to image

}

Expand All @@ -192,7 +193,7 @@ message VizMessage{
repeated int32 lineColor = 3; //Send desired RGBA as values between 0 and 255
}

message KeepOutInCone{//ONLY NEEDED IF KEEP OUT CONE DESIRED
message KeepOutInCone{//ONLY NEEDED IF KEEP OUT OR KEEP IN CONE DESIRED
// ALL FIELDS CHECKED ONLY IN FIRST MESSAGE
bool isKeepIn = 1; //True -> keep in cone created, False -> keep out cone created
repeated double position = 2; //relative to from body coordinate frame
Expand Down Expand Up @@ -356,7 +357,7 @@ message VizMessage{
TimeStamp currentTime = 1; //CHECKED EVERY MESSAGE
repeated CelestialBody celestialBodies = 2; //CHECKED EVERY MESSAGE
repeated Spacecraft spacecraft = 3; //CHECKED EVERY MESSAGE
repeated CameraConfig cameras = 4; //CHECKED FIRST MESSAGE ONLY
repeated CameraConfig cameras = 4; //CHECKED EVERY MESSAGE
//repeated cameraImage cameraImages = 5;
//repeated ImageRequest imageRequests = 6;
VizSettingsPb settings = 7; //CHECKED FIRST MESSAGE ONLY
Expand Down
13 changes: 12 additions & 1 deletion src/utilities/vizSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,9 @@ def createCameraConfigMsg(viz, **kwargs):
return
global firstSpacecraftName
unitTestSupport.checkMethodKeyword(
['cameraID', 'parentName', 'fieldOfView', 'resolution', 'renderRate', 'cameraPos_B', 'sigma_CB', 'skyBox', 'postProcessingOn', 'ppFocusDistance', 'ppAperture', 'ppFocalLength', 'ppMaxBlurSize', 'updateCameraParameters'],
['cameraID', 'parentName', 'fieldOfView', 'resolution', 'renderRate', 'cameraPos_B',
'sigma_CB', 'skyBox', 'postProcessingOn', 'ppFocusDistance', 'ppAperture', 'ppFocalLength',
'ppMaxBlurSize', 'updateCameraParameters', 'renderMode'],
kwargs)

cameraConfigMsgPayload = messaging.CameraConfigMsgPayload()
Expand Down Expand Up @@ -1037,6 +1039,15 @@ def createCameraConfigMsg(viz, **kwargs):
else:
cameraConfigMsgPayload.cameraID = 0

if 'renderMode' in kwargs:
val = kwargs['renderMode']
if not isinstance(val, int) or val < 0:
print('ERROR: vizSupport: renderMode must be 0 or 1.')
exit(1)
cameraConfigMsgPayload.renderMode = val
else:
cameraConfigMsgPayload.renderMode = 0

cameraConfigMsg = messaging.CameraConfigMsg().write(cameraConfigMsgPayload)
cameraConfigMsg.this.disown()
viz.addCamMsgToModule(cameraConfigMsg)
Expand Down