Plynth Sandbox
Plynth connects robots to buildings' doors and elevators, under each building owner's rules. This sandbox is a simulated building your robots' software can ride today, through the same API a real building uses.
Five minutes to your first ride
- Get a key. Design partners: open the sign-in link Plynth sent you, choose a password, and on your company's page take each robot's secret with Get Secret. It's shown once, with a file,
plynth-sandbox.env, that holds the address, the robot ID and the secret.
Try it now
Get a key of your own for a day: one robot that rides the elevator and goes through the doors here. No sign-up, and nothing about you is kept. Drills, positions and help come with a company's own keys.
Or from a terminal: curl -X POST https://sandbox.plynth.build/docs/keys -H "Accept: application/json"
- Download the test kit. Python 3.9 or later, nothing to install.
curl -sO https://sandbox.plynth.build/docs/robot-kit.zip && unzip -q robot-kit.zip && cd robot-kit
- Check your key. It says whether the gateway accepts it, whose robot it is, whether your clock is right, and which doors and elevators the robot may use.
python3 -m plynth.hello --env ../plynth-sandbox.env
- Ride the elevator and go through the door. The conformance check runs a door passage, an elevator ride followed on the stream, refusals, notices and emergency drills, and says what passed.
python3 -m plynth.conformance --env ../plynth-sandbox.env --report conformance.json
Your first call in code
The kit's client signs for you. Load your key into the environment first, from inside robot-kit: set -a; . ../plynth-sandbox.env; set +a.
import os, uuid
from plynth.client import RobotClient
robot = RobotClient(os.environ["GATEWAY_URL"], os.environ["GATEWAY_ROBOT_ID"], os.environ["GATEWAY_ROBOT_SECRET"])
trip = str(uuid.uuid4()) # a new ID for each trip; sending it again is safe
print(robot.request(trip, "door")) # state OPEN_COMMANDED: go through
print(robot.report(trip, "passed")) # state PASSED, done: true
In any other language, Signing requests has the exact recipe, a worked example to test against, and code in shell, Python, JavaScript and C++.
What's in the building
- An elevator bank
lift, cars A and B, floors 1 to 3. Its car comes by itself. - A door
dooron floor 1, and a badge doorsecure-dooron floor 2 into a gas-protected server room. - Emergency drills your software can start and confirm (
POST /v1/drills). A drill reaches only your company's robots. - Scenario doors and elevators that always refuse or fail one way (
door-closed,door-hours,door-approval,door-jam,door-busy,lift-slow,lift-recall,lift-dropout), so you can write a handler for each before any site visit: the list.
The building resets every night at 03:00 UTC. The sandbox has its limits, and what the simulation doesn't do.
Next
- Connecting your robots: passages, refusals, the stream, notices, emergencies and positions.
- Going live: what to build first, and what a building checks before your robots work there.
- Getting certified: the sandbox grades your own software, and every check passed is a certificate a building can check.
- Safety: what the gateway does and never does, and what stays with your robot.
- API reference: every call, field and answer.
- Errors and reason codes.
- The kit: robot-kit.zip, the wheel for
pip install, SHA-256 sums, its changelog. Apache License 2.0. - ROS 2: plynth-ros2.zip, a node that rides and an Open-RMF lift and door adapter, on the kit's client.
Your own keys
A robot ID and secret for each of your robots: your trips seen by your company alone, drills included. Plynth sets them up for design partners; ask the person who sent you here.