Download samples which can be used for and with Remote Command Plugin:
REST_client.py
Provides an object (RESTClient) that can connect to RealityScan using REST and sends commands such as pause, resume, stop, abort, template, and status through HTTP requests.
gRPC_client.py
Provides an object (gRPCClient) with the exact same method names as the RESTClient object, but the communication happens via gRPC.
shell_client.py
Sets up and runs the client side for controlling RS remotely. It allows you to choose between REST or gRPC connections, establishes communication with the servers, and enables you to send RealityScan commands (such as -align), process control commands (like abort, pause, and resume), utility commands (template and overview), and remotely shut down the servers. p. It also supports starting and stopping event notifications. In short, it establishes the connection and serves as a remote control interface for RS.
test_cli_server.py
Sets up and launches RealityScan for remote control. It requests the paths to the app and plugin, automatically registers the plugin, and starts RS as a server using either REST or gRPC. Once running, it allows RealityCapture to receive and respond to remote commands from a client.
Users can receive event notifications from RealityScan (task started, ended …). To set this up, the server (RealityScan) must start sending the events, and both the client and the client must be prepared to receive them. For the first part, the user can use shell_client.py (-notify) to send the proper configuration to the server. For the second part, the user must run a server that receives the events. The following logger samples are sample servers that the user can use as the second part. They receive events and print them.
logger_server_grpc.py
A simple gRPC server that listens for messages from RS and prints them with timestamps.
logger_server_REST.py
A simple REST server that listens for messages from RS and prints them with timestamps.
In both logger_server samples (gRPC and REST), all user commands and results are automatically logged in a .log file for easy reference. Users can also apply the -tag option to track or debug long command sequences, receiving ON_TAG events mid-process for better visibility of execution flow.
Example: -addFolder $(BaseFolder)/images -align -tag ALIGN_ENDED -calculateNormalModel -tag CAL_ENDED -export
test_webapi_client.py
Runs the backend server for the web API that will let users have similar functionality as shell_client.py, but via a browser. It will help users who are keen to make their own web API.
client_shell.py
Provides an interactive client shell for managing RealityScan processes across single or multiple servers. It allows users to connect to servers using either REST or gRPC, define optional base folders, and execute CLI commands.
When multiple servers are active, the shell prompts the user to select which server to run a command on or to apply it to all servers. The -overview command displays a summary of the processing results and generated models for each server, offering a convenient way to review progress and outcomes across an entire fleet setup.
RsRemoteCommandREST.yaml
The RsRemoteCommandREST.yaml file can be viewed more conveniently in, for example, Swagger Editor. Simply drag and drop the file into the page to explore it interactively.