Set Up the PDK Server
Every PDK client talks to a PDK server, which runs in Docker. Set up and
start the server before you install or run a client. The scripts are in the
server/ folder of the PDK repository.
Note
Each release of the repository names exactly one server image. Use a client with the same major and minor version; see Environment Compatibility.
System requirements
Ubuntu 22.04, x86_64
Your user in the docker group
About 21 GB of free disk: 14 GB for the Docker image, and 7 GB for its download while it is pulled
A desktop session, as the server opens terminal tabs when it starts
The client does not have to run on the same computer. Any client that can reach port 50052 of the server’s computer can connect to it.
TPM 2.0 for licensed services
Point-to-point path, surface finish and mesh operations are licensed, and a license is tied to the TPM 2.0 security chip of the computer running the server (see Activate Licenses). The other services need no chip and no license.
Enable the TPM in the BIOS/UEFI setup. Look for “TPM”, “Security Device”, “Intel PTT” or “AMD fTPM”; most computers built since 2016 have one. Then check it:
ls -l /dev/tpmrm0
If that file exists, the server can use the chip. If it is missing, the server still runs, the licensed services stay switched off, and the server says so when it starts.
GPU (optional)
The server can use an NVIDIA GPU for faster motion planning. It needs:
Set up
From the root of the PDK repository, run once per release:
bash server/setup_server.sh
The script pulls the server image that server/IMAGE names by its digest, so
Docker accepts no other image, and then starts the server’s container. Options:
--gpuUse the NVIDIA GPU.
--accept-eulaAccept the NVIDIA CUDA license without being asked. The image is derived from an NVIDIA CUDA image, so the script asks for it otherwise.
If the pull is interrupted, run the script again: Docker keeps the layers it has already downloaded.
Your workcells and licenses are kept in flexiv_pdk_data/, beside the PDK
repository folder. Every release uses that folder, so keep it when you upgrade.
Start and stop
Start the server:
bash server/run_server.sh
It opens terminal tabs for the planning servers and listens on port 50052. If the computer was restarted since setup, it starts the container again first.
Stop the server with Ctrl+C, then stop its container:
bash server/docker_stop.sh
Check the connection
With a client installed (Install for Python), check that it reaches the server and that their versions work together:
pdk-scene version
It prints both versions and fails if their major or minor versions differ. To
check a server on another computer, add --target HOST:50052. From code,
VersionService.GetVersion gives the same answer; see Services.
Files on the server
The server runs inside its container, so file paths it reads, such as
Mesh.filename, are paths inside the container. Two folders of
flexiv_pdk_data/ are shared with it:
On the server’s computer |
Inside the container |
|---|---|
|
|
|
|
For example, a mesh copied to flexiv_pdk_data/user_data/meshes/part.obj is
loaded with /home/flexiv/user_data/meshes/part.obj.
Upgrade
Check out the new release of the PDK repository and run
bash server/setup_server.sh again. Stop a running server first, as setup
will not replace a running container. Your workcells and licenses in
flexiv_pdk_data/ are kept. Upgrade the client to the same release.
Remove the images of older releases to free disk:
docker image ls ghcr.io/flexivrobotics/flexiv_pdk_server
docker image rm ghcr.io/flexivrobotics/flexiv_pdk_server:<old version>
Server problems
- Setup says the container is running
The server of an earlier setup is still up. Stop it with
bash server/docker_stop.shand run setup again.- The container did not finish starting
Read why with
docker logs flexiv_nebula.- Licensed services are switched off
Check that
/dev/tpmrm0exists. If you enabled the TPM after the container started, stop the server and its container, then runbash server/run_server.shagain so the new container is given the chip.
For problems once the server is running, see Troubleshooting.