Start/A Simulated Robot

🐢 A Simulated Robot

Start a simulated turtle with one line of Docker and drive it from the console. It connects to Fleetless exactly as a real robot does.

Who this is for

You have no robot at hand, or the one you have is too precious to try an app on. The turtle is a ROS 2 robot in one Docker image, with the bridge inside: live values, alerts, a publisher to drive it with, services, actions, two cameras and a model.

You need:

1. Create the robot

In the console, open Robots and choose Connect robot. Name the robot, turtle will do, and choose Create robot.

The next step of the dialog shows the token (frt_…), once, above the commands that install the bridge on a robot. Copy the token and skip the commands: the bridge is in the image. Tick I saved the token and choose Next; the last step waits for the turtle.

A lost token is replaced by rotating it, as Getting Started says.

2. Start the turtle

One line, the same in bash, PowerShell and cmd, with your token in place of frt_...:

sh
docker run --rm -it --name turtle -p 127.0.0.1:8765:8765 -v turtle-state:/state -e FLEETLESS_TOKEN=frt_... ghcr.io/fleetless/turtle-sim

The first run downloads the image, most of a gigabyte: a whole ROS 2 is in it. A few seconds after the turtle has started, the dialog says turtle is online, and Open turtle leads to the robot’s page.

The view is at http://localhost:8765: the garden from above, the turtle and its laser, and beside them the cell and the square the turtle is in. Keep it open next to the console. It shows what every command below does.

Ctrl-C stops the turtle, and the same line starts it again: back on the pad, with a full battery and the same robot in the console. To keep the token out of the shell history, put FLEETLESS_TOKEN=frt_... into a file and pass it with --env-file. That line and a docker-compose.yaml for the same container are in the README’s three steps.

3. Publish the configuration

The robot exposes nothing until it is told what. The image ships a complete fleetless.yaml: the view links it, at http://localhost:8765/fleetless.yaml, and the browser saves it as turtle.fleetless.yaml. The repository has the same file as fleetless/turtle.fleetless.yaml.

On the robot’s Configuration tab, choose Upload fleetless.yaml, the arrow pointing up, and pick the file. Then Save draft, then Publish, and Publish once more in the dialog that lists what the version adds.

That dialog also lists one warning per entry: Type '…' has not been introspected on this robot yet. It is the finding unknown_type, for standard ROS types as much as for the turtle’s own, and it blocks nothing. The file publishes, the bridge applies it within seconds, and Data and Controls fill up.

What to try

Each row on the robot’s Controls tab has one button: Send for the publisher, Run for an action, Call for a service. It opens a panel with the parameters and the same button again.

  • Drive it. Send on drive sends one message. With linear_speed: 0.5 the turtle drives for half a second, a quarter of a metre, and stops by itself; angular_speed turns it. Send it four times and the view’s square turns from A1 to B1.
  • Send it to a square. Run on drive_to_square with square: H9 starts a job. The turtle plans a path, reports how far it has left, and after half a minute the job ends succeeded, with the reason reached in its result.
  • Dock it. dock takes no parameter. It takes the turtle to the charging pad in square A1, and the job ends when the turtle stands on it: the reason is docked, and mode turns charging.
  • Look through its eyes. Data shows the two cameras under Cameras, a still every five seconds: top, the map around the turtle, and eye, what it sees from 0.1 m above the lawn. Click one and Start live view makes it video.
  • Look at the model. On Model, choose Add a URDF, then Download from robot, and pick joint_states as the datapoint driving the joints. Then drive: the legs walk.
  • Put a rock in its way. Call on reset puts the turtle back on the pad, looking east. Then set_block with cell_x: 20, cell_y: 8 and occupied ticked lays a rock in front of it: drive on and collisions counts, send the turtle to C1 and it goes round. Another reset takes the rock away.
  • Ask a model. Connect an AI tool to https://mcp.fleetless.dev, as MCP describes, and ask what the robot exposes. Then have it take the turtle to the pond and back to the pad. Asked for square M5, which is all pond, it gets a failed job whose result says why: target_occupied.

What it is not

The turtle is a circle on a grid of 256 × 256 cells, its odometry is exact and its cameras are drawn, not filmed: a real robot is not this lucky. A simulator has no safety function. The turtle stops 0.5 s after the last command, and the failsafe of drive sends a zero Twist when no client has published for 500 ms, but neither is one: read the Safety notice before the robot is real.

Next

  • Exposing a Robot — what the five kinds in the turtle’s file are, and who may use them.
  • fleetless.yaml — the format of the file you just published, key by key.
  • MCP — what an AI tool reaches, and how its sign-in works.
  • turtle-sim — the README has every slug, topic, message and variable, and how to draw a map of your own.