Deploy to production
Needs first: Configure an image
Use this page to take an image from a workspace to the machine or board it runs on, verify it from ROS 2, and check it is ready to ship.
The order is the same on every target: build the image, put it where it
runs, then verify ROS 2 communication. On a host or an emulator nros run
does the last two; on hardware nros flash --monitor does.
Before you start
- A workspace whose images build, and the boards provisioned
(
nros setupat the workspace root). - For a zenoh image, ROS 2’s router; see ROS 2 and the zenoh router.
Steps
-
Build every image the workspace declares:
nros build --allAfter each image,
nros buildprints the artifact and the board’s own next command. Where each target family’s artifact lands is in Build outputs. -
Check how the image will run.
--dry-run --whyprints the run plan, and where each fact came from, without running anything:nros run host_node_bringup:linux --dry-run --whyimage = "host_node_bringup:linux" verb = "run" [runner] package = "nros_runner_native" name = "native" [console] kind = "stdio" [link] kind = "tcp" locator = "tcp/127.0.0.1:7447" rmw = "zenoh" host_peer = "zenoh-router" -
Run a host or emulator image, with a smoke test.
nros runbuilds it if it is stale, starts the router its link needs, streams the console, and with--expectexits successfully when the line appears:nros run host_node_bringup:linux --expect 'Publishing:' -
Flash a real board, and watch its console on the same port:
nros flash <bringup>:<image> --monitor --expect 'Publishing:'nros flashruns the board’s human steps (a jumper, a reset), flashes through the board’s flash method, and watches the console.nros monitorattaches to a board that is already running. A board with no flash method stays on the vendor’s own tools. -
Verify from ROS 2. With the router running and ROS 2 sourced:
export RMW_IMPLEMENTATION=rmw_zenoh_cpp ros2 topic list ros2 topic echo /chatter std_msgs/msg/String --qos-reliability best_effortIf discovery works but samples do not arrive, check the domain ID, the router endpoint, QoS reliability and the board’s network.
-
Check readiness for production, below, on your own board.
Check readiness for production
The in-tree tests run reference boards, mostly under emulation, where cycle counters read zero and wall-clock percentiles track the host’s load. What you ship has to be measured on your silicon, at its clock and load. Count the boxes per group; a group missing two or more is not ready.
Timing, measured on the board
- End-to-end P99 latency, publisher to callback, within your budget.
- Worst-case stack depth per sched task
(Analyze timing), and the platform’s
stack-overflow detection on (FreeRTOS
configCHECK_FOR_STACK_OVERFLOW, Zephyr stack sentinels, NuttXCONFIG_DEBUG_STACK). - Timer overruns under sustained load (timer overrun policy).
- Heap use over 24 hours at nominal load, and no allocation on a hot path.
Platform and network
- Multicast discovery fires on your RTOS and driver, if you use Cyclone DDS.
- The platform clock extends a narrow hardware counter to a monotonic 64-bit value (a 32-bit millisecond count wraps at 49.7 days).
- The image recovers from 5% packet loss, a 30-second partition, and a restart of the router or agent.
- Critical sections are short.
Middleware and interop
- The release pinned with
nros pin, so the backend versions are the tested ones (nros toolchain list --availableprints them), and a plan to move the pin: only the newest release is supported, and fixes are not backported (Release support). -
nros doctor --reportoutput filed with the build: the release, each board’s support status and every pinned tool, dated. - The release image built with the release profile, and its digest
recorded. The same pin, lock and ROS 2 packages give the same bytes
from any project directory, as long as nano-ros itself is installed at
the same path (a container gives you both);
nros builddefaults to the debug profile (Build profiles). - Every QoS policy you use is supported by your backend; an unsupported one is reported at entity creation.
- A stock ROS 2 node receives what the image publishes, with each custom message, and QoS profiles match.
- Every nano-ros RTOS in your fleet sees every other.
Safety and operations
- A timeout on every blocking call; nano-ros has no wait-forever form.
- The E2E CRC attached, if you use the
safety-e2efeature (Safety). - A hardware watchdog wired; the executor reports overruns but pets none.
- A log sink chosen (Log and observe a board), time synchronization, and a bootloader and update strategy, none of which nano-ros ships.
- The licenses accepted: nano-ros is MIT OR Apache-2.0, and each component an image compiles in carries its own (Third-party code). nano-ros has no commercial support entity, so plan for in-house expertise.
Example
A workspace with a host image and a board image, built, smoke-tested, then flashed:
nros build --all
nros run host_node_bringup:linux --expect 'Publishing:'
nros flash <bringup>:<image> --monitor --expect 'Publishing:'
Run an image: nros run
nros run builds the image if it is stale, starts what its link needs, and
streams the console, for host images and emulators. --expect '<line>' exits
successfully when that line appears. On a real board it refuses and names the
flashing step instead; Flash a real board
covers nros flash, nros monitor and nros bench.
Run plans
Before it runs anything, nros run resolves a run plan: which launcher,
which console and which link, and where each fact came from. The facts come
from five levels, highest first: the command line, the image, your machine’s
bench file, the board’s descriptor, and the runner’s defaults.
--dry-run --why prints the plan without running it, as in step 2. Each
platform page under Platforms reads its
board’s plan.
If it doesn’t work
nros runrefuses and names a flashing step. The image’s board is hardware. Usenros flash --monitor.- The image starts but never prints. A zenoh image blocks opening its
session until it reaches the router. Check the router runs, on the
endpoint in the run plan’s
[link]. nros flashcannot find the board. Runnros bench scanwith the board attached, or pass--port.
See also
- Troubleshoot: failures by symptom.
- Build outputs: artifacts and the vendor commands that take them.
nrosCLI: every flag ofrun,flash,monitorandbench.