02 / Get Started

Get started

Install the developer tools, check your first task file and run it in a symbolic simulation. This takes a few minutes and needs no robot, no external simulator and no ROS 2.

Requirements

  • Python 3.11 or newer
  • Git, to get the example files

The package has no runtime dependencies. It is tested on Ubuntu and Windows with Python 3.11 and 3.13.

1. Install

RoboLang 0.11.0 is published on PyPI. Installing into a virtual environment is recommended.

python -m pip install robolang

The example files and test worlds used below are in the repository. Check out the release tag so they match the installed version:

git clone --branch v0.11.0 https://github.com/rokorobot/RoboLang.git
cd RoboLang

Then confirm the command is available:

robolang --version
Output
robolang 0.11.0 (language 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3 and 2.4, IR schema 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11 and 1.12, mission IR 1.0, 1.1, 1.2, 1.3 and 1.4)

Without the clone, robolang example writes a sample task and a world file for it into the current directory, so validate and simulate work from PyPI alone. The steps below use the repository's files.

2. Validate a task file

The repository includes a small example. From the clone, run:

robolang validate examples/pick_and_place.rob
Output
examples/pick_and_place.rob:5:23: warning[W401]: 'max_speed' has no unit; write 'm/s' or 'rad/s'. A unitless limit is deprecated and is never treated as an enforced limit
examples/pick_and_place.rob: valid RoboLang 1.1 (1 task, 1 warning)
Validation covers the text of the program only. It does not make a task safe to run on a robot.

Three things to notice in that output:

  • The file is valid. validate checked its syntax, names, types and values.
  • There is one warning, W401. The example writes max_speed 0.5 with no unit, which the language still accepts but has deprecated. Writing 0.5 m/s removes the warning. Warnings do not make a file invalid.
  • The last line is printed every time: validation covers the text of the program only. It does not make a task safe to run on a robot.

3. Inspect what it describes

robolang inspect examples/pick_and_place.rob
Output
examples/pick_and_place.rob:5:23: warning[W401]: 'max_speed' has no unit; write 'm/s' or 'rad/s'. A unitless limit is deprecated and is never treated as an enforced limit
examples/pick_and_place.rob
RoboLang 1.1 | IR schema 1.0 | 1 task

task demo_pick_and_place
  parameters:
    robot r
    object box
    location src
    location dst
    region cell
  safety:
    max_speed 0.5  (no unit: deprecated; declared only, never treated as an enforced limit)
  preconditions:
    robot_ready r
    region_clear cell
  plan:
    1. move r to src
    2. grasp r box
    3. move r to dst
    4. place r box at dst
    5. communicate r to "fleet" with "TASK_COMPLETE"

This is a description only. Nothing was executed.

inspect validates first, then prints the tasks in the file. Nothing is run. To get the same information as JSON for another program, add --json:

robolang inspect examples/pick_and_place.rob --json

The JSON is tagged with its schema version. The Examples page shows the result, and the IR schema specification defines it. Use --task NAME to show a single task from a file that contains several.

4. Simulate it

simulate runs a validated task against a world file that declares the robots, objects, regions and sensors. The repository includes one:

robolang simulate examples/pick_and_place.rob --world tests/fixtures/simulation/worlds/base.json
Output (standard error)
examples/pick_and_place.rob:5:23: warning[W401]: 'max_speed' has no unit; write 'm/s' or 'rad/s'. A unitless limit is deprecated and is never treated as an enforced limit
simulation only: run sim-74e8880dc9812881e439341b29b04ee31e11ba6839023b4ac26431d42ed26b09: SUCCEEDED

The summary line goes to standard error and the full run record, as JSON, to standard output. The run record lists every state, precondition and step and the final world. The same source, world, task and --seed always give the same record and run ID. The simulation is symbolic: no motion planning, kinematics, collisions or physics, and a simulated success is not evidence that a task is safe on hardware. The Examples page shows the record and a failing run.

5. Check a goal

From language 1.3 a task declares a goal, and a run succeeds only when every goal condition is true in the final world. examples/handover.rob is a 1.3 task: an arm brings a box to a handoff point, and a mobile robot carries it on once the zone is clear. Its bindings are in examples/world.json.

robolang simulate examples/handover.rob --world examples/world.json
Output (standard error)
simulation only: run sim-70f08163c77bb0d98b645068d07b66f7c501d3d30d82ab2b7ba8b2ed059f4fd0: SUCCEEDED

The run record lists each goal condition with its result. A run whose steps all succeed but whose goal is false ends FAILED with S301; the Examples page shows one. Use --bind P=ID to bind task parameters on the command line instead of in the world file.

6. Delegate the goal (experimental)

delegate sends only the task's goal to a simulated robot as a signed Core 0.1 message (Core 0.2 with --core 0.2). The robot matches it to a plan in its own library, runs it and reports an outcome with evidence, and the planner checks that evidence before it accepts success.

robolang delegate examples/handover.rob --world examples/world.json --from rl:agent:planner-1 --to rl:robot:arm1 --plans examples/plans
Output (standard error)
simulation only: delegate rl:goal:handover → rl:robot:arm1: succeeded (verified)

7. Run the reference simulation (experimental)

arch02 runs one case of the RFC-001 reference scenario. An AI planner stub asks a fixed arm to deliver a container, the arm hands custody to a mobile robot, and every message is a checked Core 0.1 document.

robolang arch02 --scenario tests/fixtures/arch02/scenario.json --cases tests/fixtures/arch02/cases.json --case happy_path
Output (standard error)
simulation only: run arch02-b15d8830279932950822877f5de7252f6f3aef2b2623f385369f736a9207cb82: planner-1 recorded succeeded

This is simulation only: one process, a symbolic world, no network and simulation-only signatures. The same scenario, case and seed give a byte-identical run record. Other cases in the same file, such as v06_partition_before_release, inject faults.

Exit status

validate and inspect return the same exit status, so they can be used in scripts and CI.

StatusMeaning
0The file is valid. Warnings do not change this.
1The file is not valid. Diagnostics are printed to stderr.
2Bad arguments, an unreadable file or an unknown task name.

simulate reports how the run ended (for a --mission run, see the note below the table):

StatusMeaning
0The run succeeded.
1The source file is not valid.
2Usage error.
3The world file is not valid.
4The run failed.
5The run was cancelled.

A mission that ended completed or bounded returns 0, one that failed returns 4 and one that was stopped returns 5.

export-goal and delegate use the same codes 1 to 3, and add 6 when the goal has no Core form. delegate returns 0 only for a verified success, 4 for a failed or unknown outcome and 7 when the robot or a participant rejects the goal. arch02 returns 0 when the case ran, whatever outcome it recorded, 2 for a usage error and 3 for an invalid scenario or cases file.

Version numbers

robolang --version prints the distribution, language and IR schema versions. They identify different things and change independently.

Version Current What it identifies
Distribution 0.11.0 The installable Python package, published on PyPI. Still an alpha.
Language 1.1 to 2.4 The syntax and rules of .rob files. A file without a marker is 1.1; a later version needs its marker, for example robolang 2.4;.
Task IR and Mission IR 1.0 to 1.12 / 1.0 to 1.4 The shape of the JSON printed by inspect --json: Task IR 1.0 for a 1.1 source up to 1.12 for a 2.4 source, and Mission IR for a file with missions (1.0 for 2.0, 1.1 for 2.1, 1.2 for 2.2, 1.3 for 2.3, 1.4 for 2.4).
World file and run record 1.0 to 1.9 / 1.0 to 1.12 The input and output of simulate. The run record version also follows the language: 1.0 for a 1.1 source up to 1.12 for a 2.4 source. A mission writes a mission record (1.0 to 1.4) with one run record per task run.
Core 0.1 and 0.2 The experimental message and capability contracts used by export-goal, delegate and arch02. Core 0.1 is the default; --core 0.2 opts in on simulate, export-goal and delegate.

So "RoboLang 2.4" refers to the language, while the software you installed is the alpha distribution 0.11.0.

Without installing

The same commands run straight from the clone, with no install at all:

python src/robolang validate examples/pick_and_place.rob

What is installed. The installed package is the robolang tooling only: lexer, parser, validator, IR reader, the symbolic simulator, the Core 0.1 and 0.2 checks, the goal bridge and the reference simulation, behind the eight commands reference, example, validate, inspect, simulate, export-goal, delegate and arch02. The repository also contains the experimental ROS 2 / Gazebo backend, which is not installed, and an older v1 prototype interpreter, kept as historical source and not supported. The core README explains the split.

Next

  • Examples: valid and invalid task files and simulations, with real tool output.
  • Language reference: where the grammar and rules are specified.
  • Contribute: report a problem or suggest a change.