Drake
Drake C++ Documentation
RenderEngineGltfClientParams Struct Reference

Detailed Description

Construction parameters for the MakeRenderEngineGltfClient() to create a client as part of the glTF Render Client-Server API.

#include <drake/geometry/render_gltf_client/render_engine_gltf_client_params.h>

Public Member Functions

template<typename Archive >
void Serialize (Archive *a)
 Passes this object to an Archive. More...
 
std::string GetUrl () const
 Returns the post-processed full url used for client-server communication. More...
 

Public Attributes

std::string base_url {"http://127.0.0.1:8000"}
 The base url of the server communicate with. More...
 
std::string render_endpoint {"render"}
 (Advanced) The server endpoint to retrieve renderings from. More...
 
bool verbose = false
 Whether or not the client should log information about which files are being generated, as well as any information about HTTP communications between the client and server such as HTTP header information, url and port, etc. More...
 
bool cleanup = true
 Whether or not the client should cleanup files generated / retrieved from the server. More...
 

Member Function Documentation

◆ GetUrl()

std::string GetUrl ( ) const

Returns the post-processed full url used for client-server communication.

The full url is constructed as {base_url}/{render_endpoint} where all trailing slashes in base_url and all leading slashes in render_endpoint have been removed.

◆ Serialize()

void Serialize ( Archive *  a)

Passes this object to an Archive.

Refer to YAML Serialization for background.

Member Data Documentation

◆ base_url

std::string base_url {"http://127.0.0.1:8000"}

The base url of the server communicate with.

See GetUrl() for details.

◆ cleanup

bool cleanup = true

Whether or not the client should cleanup files generated / retrieved from the server.

By default (cleanup=true), after a server image response has been loaded into the client's memory, the glTF scene file and images will be deleted. To keep the generated scene files or server response images for inspection purposes, set cleanup=false instead. During the construction process a number of copies and clones are created, when cleanup=false there will be more than one empty temporary directory created that will not be deleted. The path to the temporary directory can be observed by setting RenderEngineGltfClientParams::verbose to true, or inspecting the parent directory described by drake::temp_directory().

◆ render_endpoint

std::string render_endpoint {"render"}

(Advanced) The server endpoint to retrieve renderings from.

See GetUrl() for details.

◆ verbose

bool verbose = false

Whether or not the client should log information about which files are being generated, as well as any information about HTTP communications between the client and server such as HTTP header information, url and port, etc.

Information is logged at the debug level, so your application will need to logging::set_log_level() to "debug".

See also
drake/common/text_logging.h

The documentation for this struct was generated from the following file: