Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

0.6.0-nros12

Reference · Level 2: Building real applications

Codegen is unchanged, so a project generated with 0.6.0-nros11 needs nothing generated again. A project that nros new made with 0.6.0-nros11 does need one edit: its contract states each timer as rate_hz, which this release refuses. Upgrade shows the command that makes it. Beyond that, a project that uses none of the renamed settings or contract spellings below builds as it is. One that uses any of them stops, and the message names the new spelling.

Upgrade

A project built with 0.6.0-nros11 keeps building with 0.6.0-nros11 until you move its pin: its first nros build wrote the release it used to nros-toolchain.toml. Installing 0.6.0-nros12 changes nothing by itself. To move a project, run in its directory:

curl -fsSL https://raw.githubusercontent.com/NEWSLabNTU/nano-ros/main/scripts/install.sh \
    | sh -s -- --version 0.6.0-nros12
nros pin 0.6.0-nros12
nros setup <board>

Then rewrite what this release renamed:

nros configure --migrate
nros configure --migrate: src/…

It rewrites the project’s contracts and system.toml files from the spellings this release renamed, and accepts this release’s sources into the project’s nros-sdk.lock. It prints a line for every key and source it changes. A project made with nros new in 0.6.0-nros11 needs it for its timers: its contract writes each one as rate_hz, one line per timer its node starts with. Then build:

nros build
nros build: next for …

To make the contract edit by hand instead of nros configure --migrate, in each src/<bringup>/system.contract.yaml:

# before
        trigger: { timer: { rate_hz: 1 } }
# after
        trigger: { timer: { rate: 1Hz } }

Pinning a version says what each step does.

What you will notice

  • Many settings have new names. Every built-in setting is now <owner>.<name>, and every memory size is in bytes. An old name is refused, and the message names the new one, with the factor to multiply by when the unit changed. Settings you write lists them.
  • ros2 param and /rosout work on every image, except /rosout from a C node on threadx-linux (see Known issues). Each node serves the six parameter services and publishes /rosout, as an rclcpp node does. An image with no stated parameter count now holds 8 parameters, not 32.
  • String and array parameters need a stated size. The build stops and names the lines to add to system.toml.
  • Old contract spellings are refused, including the rate_hz timers that nros new wrote in 0.6.0-nros11. nros configure --migrate rewrites them.
  • Each C or C++ image has a build directory of its own, named for the image. nros build and nros run find it themselves.
  • A Rust image on a board builds optimized by default, as C and C++ images already did: about half the flash.
  • A linux image joins the domain and router its system.toml states, not domain 0 and the default router.
  • nros build keeps the tool’s output in a log in the build directory, and shows it with its colours and progress bar.

Known issues

  • On threadx-linux, a C node’s /rosout publisher is not created. The image logs one line at boot, /rosout could not be created for node /<name> (Transport(PublisherCreationFailed)), and then runs and publishes normally, but its log records do not reach /rosout. This publisher is new in this release: in 0.6.0-nros11 a C node had none unless it called rclc_rosout_publisher_init, so nothing that worked there stopped working.

  • On XRCE, the largest sample is 65,531 serialized bytes. The Micro XRCE-DDS Agent counts a sample’s DATA submessage, with its 4-byte header, in 16 bits, and a larger one stalls the Agent for every client of its session. This release refuses one at the publish: Rust gets MessageTooLarge, C RCLC_RET_FULL and C++ NROS_CPP_RET_FULL, and nothing is sent. Service requests have the same limit and replies 24 bytes less. A sample a DDS publisher sends through the Agent is not checked by nano-ros, so keep such topics at or below 65,531 bytes too.

  • On Zephyr mps2/an385, a zenoh publish costs about 7 % more time than in the builds of early November, about 50 µs a dispatch of three publishes under QEMU with a fixed instruction count, mostly on a topic the publishing node also subscribes to. Under QEMU’s default -icount shift=auto, one dispatch can read anywhere from about 2 to 65 ms, and that spread is the emulator, not nano-ros.

  • A Rust component that creates a timer or guard condition through NodeRuntime::executor_mut() is not counted when its image is sized from its census, so the image can fail at start with the executor's callback table is full (NROS_EXECUTOR_MAX_CBS). This affects create_guard_condition and the create_timer_* methods reached that way. Declarative timers and every C and C++ timer and guard condition are counted. Create timers with create_timer_for_callback_name in the component’s configure. For each guard condition, raise the callback table in system.toml:

    [image.<id>.knobs.executor]
    max_cbs = <the max_cbs that nros build prints, plus one per guard>
    

    nros build prints the census count in its resolved → … (max_cbs <n>, …) line. If you pin NROS_EXECUTOR_ARENA_BYTES by hand, raise it too. A later release counts these entities.

Edits you may need to make

Settings you write

A setting is refused under its old name wherever it is written: in system.toml ([image.<id>.knobs]), in a board’s or a platform’s [knobs] table, in the build environment, in a Zephyr conf file or -DCONFIG_, and in -DNROS_OVERRIDE_. The environment variable and the Kconfig symbol follow the key: params.max_parameters is NROS_PARAMS_MAX_PARAMETERS and CONFIG_NROS_PARAMS_MAX_PARAMETERS. nros knob list prints every setting under its current name, and nros knob show <name> says where to state it.

An old name stops nros build with a message like this one:

Error: [image.linux.knobs]:
  `[image.linux.knobs.executor] backing_u64s` is retired: write `[image.linux.knobs.executor] backing_bytes` instead (the value x 8: executor.backing_u64s was in 8-byte words)
  • Zenoh. The [knobs.zenoh.wire], [knobs.zenoh.limits] and [knobs.zenoh.tx] tables are gone: their keys are plain [knobs.zenoh] keys, and the sizes end in _bytes.

    OldNew
    wire.batch_multicast_sizebatch_multicast_bytes
    wire.batch_unicast_sizebatch_unicast_bytes
    wire.frag_max_sizefrag_max_bytes
    wire.get_poll_interval_msget_poll_interval_ms
    wire.get_reply_buf_sizeget_reply_buffer_bytes
    wire.rx_task_budget_framesrx_task_budget_frames
    wire.rx_task_budget_rest_usrx_task_budget_rest_us
    limits.keyexpr_string_sizekeyexpr_string_bytes
    limits.connect_foreverconnect_forever
    limits.connect_timeout_msconnect_timeout_ms
    limits.subscriber_ring_depthsubscriber_ring_depth
    limits.service_timeout_ms[knobs.service] timeout_ms (variable unchanged: NROS_SERVICE_TIMEOUT_MS)
    tx.batchtx_batch
    tx.flush_mstx_batch_flush_ms
    tx.split_locktx_split_lock
    service_buffer_sizeservice_buffer_bytes
    graph_cache_sizegraph_cache_bytes
    publisher_tx_buffer_sizepublisher_tx_buffer_bytes
    subscriber_large_sizesubscriber_large_bytes
    subscriber_size_thresholdsubscriber_large_threshold_bytes
    [knobs.graph] max_entities[knobs.zenoh] graph_max_entities
  • Parameters. Every parameter setting is under [knobs.params], and its variable starts NROS_PARAMS_: NROS_MAX_PARAMETERS is now NROS_PARAMS_MAX_PARAMETERS.

    OldNew
    params.max_param_name_lenparams.max_name_bytes
    params.max_string_value_lenparams.max_string_value_bytes
    params.max_byte_array_lenparams.max_byte_array_bytes
    params.max_param_description_lenparams.max_description_bytes
    params.max_param_constraints_lenparams.max_constraints_bytes
    params.param_events_depthparams.events_depth
    [knobs.param] service_inbox_bytes, service_inbox_depth[knobs.params] service_inbox_bytes, service_inbox_depth
  • Memory. The heap and the application task’s stack are one setting each, on every platform, in bytes.

    OldNewValue
    zephyr.heap_sizememory.heap_bytesthe same
    freertos.heap_kbmemory.heap_bytestimes 1024
    freertos.app_stack_kb, threadx.app_stack_kbmemory.app_stack_bytestimes 1024
    NROS_THREADX_BYTE_POOL_KBthreadx.byte_pool_bytestimes 1024
    executor.backing_u64sexecutor.backing_bytestimes 8

    A FreeRTOS heap or application stack must be a whole number of KiB. Any other value is refused, and the message names the nearest valid ones.

  • Other sizes end in _bytes: executor.arena_size, executor.subscription_buffer_size and executor.param_service_buffer_size; log.buffer_size, subscriber.buffer_size and net.buffer_size; and XRCE’s buffer_size, builtin_service_request_buffer_size, service_reply_buffer_size, service_request_buffer_size and subscriber_buffer_size.

  • The network stack’s variables start NROS_NET_: NROS_SMOLTCP_MAX_SOCKETS, _MAX_UDP_SOCKETS, _CONNECT_TIMEOUT_MS, _SOCKET_TIMEOUT_MS and _BUFFER_SIZE are now NROS_NET_MAX_SOCKETS, NROS_NET_MAX_UDP_SOCKETS, NROS_NET_CONNECT_TIMEOUT_MS, NROS_NET_SOCKET_TIMEOUT_MS and NROS_NET_BUFFER_BYTES. The [knobs.net] keys keep their names, apart from buffer_size.

  • Zenoh build switches are settings now: ZPICO_MULTICAST_TRANSPORT is [image.<id>.knobs.zenoh] multicast_transport = true, NROS_ZPICO_DEBUG is NROS_ZENOH_DEBUG, and ZPICO_NO_SMOLTCP is NROS_ZENOH_NO_SMOLTCP, which nros sets itself from transport = "serial".

  • Zephyr Kconfig symbols:

    OldNew
    CONFIG_NROS_ZENOH_LOCATORCONFIG_NROS_LOCATOR
    CONFIG_NROS_CYCLONE_DOMAIN_IDCONFIG_NROS_CYCLONEDDS_DOMAIN_ID
    CONFIG_NROS_CYCLONE_CONFIG_XMLCONFIG_NROS_CYCLONEDDS_CONFIG_XML
    CONFIG_NROS_ZEPHYR_TASK_STACK_SIZECONFIG_NROS_ZEPHYR_TASK_STACK_BYTES
    CONFIG_NROS_ZEPHYR_SCHED_TASK_STACK_SIZE, CONFIG_NROS_ZEPHYR_TIER_STACK_SIZECONFIG_NROS_ZEPHYR_SCHED_TASK_STACK_BYTES
    CONFIG_NROS_ZEPHYR_LEVEL_WORKER_FRAMECONFIG_NROS_ZEPHYR_LEVEL_WORKER_FRAME_BYTES
    CONFIG_NROS_CONSOLE_WHOLE_LINES_BUFFERCONFIG_NROS_CONSOLE_WHOLE_LINES_BUFFER_BYTES
    CONFIG_NROS_EDMA_WARM_RESET_QUIESCECONFIG_NROS_ZEPHYR_EDMA_WARM_RESET_QUIESCE
    CONFIG_NROS_PARAM_STORECONFIG_NROS_PARAMS_STORE
    CONFIG_NROS_SERVICE_BUFFER_SIZECONFIG_NROS_ZENOH_SERVICE_BUFFER_BYTES
    CONFIG_NROS_TRANSPORT_SERIALtransport = "serial" in system.toml, or CONFIG_NROS_ZENOH_LINK_SERIAL=y without one

    A Zephyr project with no system.toml that still sets an old symbol stops at configure, naming the new one.

  • The wall-clock source on Zephyr is a setting of the image. CONFIG_NROS_SNTP_EPOCH and CONFIG_NROS_EPOCH_FROM_ZENOH are retired with no alias. State the source instead:

    [image.<id>.knobs.clock]
    source = "sntp"          # or "zenoh-hlc", or a fallback: "sntp,platform"
    

    CONFIG_NROS_EPOCH_FROM_ZENOH_INTERVAL_MS is now clock.hlc_interval_ms. sntp.server and sntp.timeout_ms keep their names. A package of your own that names its settings clock.* must rename them: clock is now a built-in owner.

  • A nano-ros setting passed as a CMake -D is refused, in any spelling (-DNROS_..., -DCONFIG_NROS_..., or an old name), whether through --cmake-args=, an @file or [image.<id>.build] cmake_args. Move it to the image’s [image.<id>.knobs.<owner>] table; the error names the table and the key. On Zephyr, --cmake-args=-DNROS_OVERRIDE_<ID>=<value> is still the override for one build.

  • A setting for one platform only is refused on an image of another platform. Today that is [image.<id>.knobs.zenoh] socket_timeout_ms, which only Zephyr images read: remove it from the others.

  • runtime.let_buffer_size (NROS_LET_BUFFER_SIZE) is gone: it sized nothing. Delete it.

The environment an image runs with

The domain, the router and the node name of an image come from its system.toml (domain_id, locator). The build never reads them from its own environment any more:

  • A build with NROS_DOMAIN_ID set stops, naming [system] domain_id.
  • A build that finds NROS_LOCATOR or NROS_NODE_NAME set prints a note and goes on.

A hosted image reads these names when it runs, and they win over system.toml:

VariableWhat it sets
ROS_DOMAIN_IDthe ROS 2 domain
NROS_LOCATORthe router or peer to dial
NROS_NODE_NAME, NROS_NODE_NAMESPACEthe node’s name and namespace

A linux image now uses the domain_id and locator its system.toml states when these are unset. Before, it joined domain 0 and dialled the middleware’s default. When the environment overrides a stated value, the image says so at boot, for example ROS_DOMAIN_ID=5 overrides system.toml's domain_id=42.

Three run-time variables are renamed. A hosted image started with an old one set stops and names the new one:

OldNew
XRCE_SERIAL_BAUDNROS_XRCE_SERIAL_BAUD
NROS_CYCLONE_MATCH_TIMEOUT_MSNROS_CYCLONEDDS_MATCH_TIMEOUT_MS
NROS_RMW_CYCLONEDDS_SKIP_PREFIXNROS_CYCLONEDDS_SKIP_PREFIX

A build directory from the previous release

Build directories configured with 0.6.0-nros11 keep working:

  • nros build and nros run find a C or C++ image’s new directory, named for the image, and remove the old one’s build files. A small leftover directory holding the old configure’s resolve files may remain; you can delete it. A script that names the old path needs the new one: build/posix-zenoh-linux-demo_bringup/cmake/linux_entry is now build/posix-zenoh-linux-demo_bringup-linux/cmake/linux_entry.
  • A Zephyr build directory remembers each -DCONFIG_ it was once given. When one of them is a retired name, the next configure drops it with a warning that names the value and what to set instead.
  • A retired name you still pass is refused, naming the new spelling.
  • A program registered under an EXECUTABLE gets a new name (see Images and packages): rebuild those directories.
  • A build directory for fvp-aemv8r-smp configured before the Arm FVP was found caches ARMFVP-NOTFOUND. Configure it again once the model is found.

Contracts

  • A system contract written with the old spellings is refused. Each error names the line and its new spelling. nros configure --migrate rewrites a project’s contracts in one step, or edit each line by hand. The renames are:

    • functions: is now capabilities:.
    • A hazard’s enters: is now leaves:.
    • A manifest-level paths: is now event_chains:.
    • min_rate_hz, max_rate_hz and rate_hz are now min_rate, max_rate and rate, written with a unit (100Hz).
    • A contract’s supervision: moves to the target’s platform file.
    • policy: is now the checker’s --deny <rule>.
    • integrity_levels: is now use: of a profile.
    • max_transport on an endpoint or a service is now a link.
    • observes: written as a string is now { input }.
    • early.drop is now early.decrease.

    The system model is now schema 6, and contracts.scope_paths is now contracts.event_chains. Older models still load.

  • A contract’s QoS values and launch arguments are checked. reliability, durability, history and liveliness must name a ROS 2 value. A typo such as transient-local is refused, and the error names the key, the value and the values allowed. system_default and best_available are accepted. A contract whose arguments fail is now an error[manifest-args]; before, the contract was dropped without a word. Arguments fail on a required argument not passed, a value outside its choices:, or a QoS $(var …) outside the allowed set. Fix the value the error names.

Parameters

  • A string or array parameter needs its size stated, whether a node declares it in its code or the contract declares it under params:. The build stops, naming the image, each missing line and a suggested floor. Add the lines to the image in system.toml:

    [image.<id>.knobs.params]
    max_string_value_bytes = 16   # the longest string value
    max_array_len = 4             # the longest bool, integer or double array
    max_string_array_len = 4      # the longest string array
    max_byte_array_bytes = 256    # the longest byte array (only for a byte_array)
    service_inbox_bytes = 4096    # the largest set_parameters request
    

    A board can state them in its own [knobs.params] instead. When the image’s nodes state no parameter-service shapes, the build prints the service_inbox_bytes line commented out, for you to fill in.

  • A string_array has its own element bound, max_string_array_len. max_array_len now bounds only bool, integer and double arrays.

  • An image with no stated parameter count holds 8 parameters, not 32: every image that declares no params: in its contract. The 32 slots took 285,696 bytes of RAM; 8 take 71,424. A ninth declaration stops the boot.

  • A parameter the store has no room for stops the boot. Before, the node ran on its compiled default and the launch or YAML value was lost without a word. Now:

    • In C++, declare_parameter<T>(name, default) latches NROS_CPP_RET_FULL on the node, and the entry halts boot.
    • In C, rclc_add_parameter and rclc_parameter_declare_* return RCLC_RET_FULL for a full store, where they used to return RCL_RET_ERROR. Code that compares against RCL_RET_ERROR needs the new value.
    • Every language logs a line naming the node, the parameter, the store’s size and the setting that sizes it.

    To make room, declare the parameters under params: in each node’s contract, which sizes the store from that count, or set [image.<id>.knobs.params] max_parameters.

  • In C++, a parameter whose launch or YAML value has another type than its declaration stops the boot. Before, declare_parameter<T>(name, default) returned the code default without a word, so the node ran on a value its launch file did not state. The usual case is an integer written for a double: kp: 1 for a parameter declared double. The boot log names the node, the parameter, the value and the fix, for example parameter "kp" is declared double but the launch value is the integer 1; write 1.0 in the YAML. Before you upgrade, check your launch and YAML files for integers written where the code declares a double. Upstream rclcpp throws on the same mismatch.

  • list_parameters filters by prefix and depth as rclcpp does.

    • A prefix matches itself, or itself followed by .: robot no longer selects robotics.
    • depth counts the separators after the prefix: with prefix robot, depth 1 no longer returns robot.arm, and depth 2 does.
    • With no prefix, depth N returns names with fewer than N separators.
    • Depth 0 still returns every name below the prefix.
  • In Rust, nros_params::ParameterDescriptor has no name field. The store keeps the name once, in the parameter, which saves 64 bytes a slot. nros_node::parameter_services::to_rcl_descriptor takes the name as its first argument. ParameterDescriptor::new(name, type) is unchanged.

Images and packages

  • Every image serves the stock ROS 2 node interfaces, on every board: the six parameter services (ros2 param list, get, set, describe), and /rosout. An image that cannot afford them sets node_interfaces = "none" in [system], [image_defaults] or [image.<id>]. A board with room for one service only, such as the Raspberry Pi Pico W, must opt out: its build stops and names the switch. An ament package built through CMake gets them unless it sets NROS_FEATURES itself. /rosout is VOLATILE, where rclcpp’s is TRANSIENT_LOCAL, and a node does not subscribe to /parameter_events.
  • A registered component’s program is named for its EXECUTABLE, not its package, as rclcpp_components_register_node names one executable per node. nros_components_register_node(... EXECUTABLE talker DEPLOY threadx) now builds talker. Update the scripts, flash commands and run lines that load the old name. A package may now register several components under different EXECUTABLE names; two under the same name are refused. On Zephyr a package still builds one program.
  • A C or C++ component package whose project() name differs from its package.xml <name> is refused at configure. The message names both values and both files. Rename one so they match, as ament expects.
  • A Rust image derives its sched tasks’ spin_period as C and C++ images do: from the task’s tightest timer, instead of 1 ms. A spin_period longer than that timer is refused at build time, naming the task, both periods and the [tasks.<name>] spin_period to change.
  • A Rust image on a board builds optimized by default. Before, it built cargo’s dev profile when the image stated no profile. It now builds release with fat LTO, as C and C++ images already did: the mps2-an385 FreeRTOS talker drops from 914,880 bytes of flash to about 500,000. A host image still builds dev. For a debug build on a board, run nros build <image> --profile=dev, or set profile = "dev" on the image.
  • A C or C++ FreeRTOS image on zenoh gets a 512 KiB default heap, derived the way a Rust image’s is, instead of the old 3 MiB fallback. That is about 2.5 MiB less RAM per image. The C talker template peaks at about 90 KB. A larger image prints its own peak on its nros: heap peak boot line; one that needs more sets [image.<id>.knobs.memory] heap_bytes.
  • The ThreadX byte pool is derived, no longer a fixed 4 MiB: the application thread’s stack plus the middleware’s measured working set (about 0.8 MiB for zenoh and 1.6 MiB for Cyclone DDS on the RISC-V board). An image that declares sched tasks states its pool with [image.<id>.knobs.memory] heap_bytes; one that does not stops at boot, naming the setting and the bytes it was short.
  • A Zephyr zenoh image with CONFIG_NROS_ZENOH_MULTI_THREAD=n is refused at configure. It used to build and then fail at boot. Leave the option on, as it is by default.

Platform ports and the C ABI

  • A custom platform port defines nros_platform_wall_clock_state() beside nros_platform_time_now_ns(), returning whether its wall clock is synced and which source answers it. A port without it fails to link, naming the symbol. A port with no real-time clock returns { false, NROS_WALL_CLOCK_SOURCE_PLATFORM, 0 }; a Rust port implements PlatformTime::wall_clock_state.
  • The RMW backend’s C enums are int-sized on every target. On arm-none-eabi they used to be one byte in C and four in Rust. Rebuild a C or C++ RMW backend for an ARM EABI target against the new headers. A switch with no default: over one of these enums needs a case for the new *_FORCE_INT_WIDTH_ enumerator to stay -Wswitch clean.
  • An FD frame on a CAN handle whose fd_active is false returns NROS_PLATFORM_CAN_ENOFD, where it returned NROS_PLATFORM_CAN_EINVAL.

The Arm FVP

nano-ros no longer installs the Arm FVP (FVP_BaseR_AEMv8R): nros setup --tool arm-fvp is gone. Install the AEMv8-R FVP from Arm (x86_64 Linux) and libatomic1, then set ARMFVP_BIN_PATH, set ARM_FVP_DIR, or put the model on PATH. nros doctor says whether it is found, and through which setting.

Behaviour that changed

  • nros build keeps the tool’s output. The tool runs on a terminal that nros build holds, so its colours and cargo’s progress bar look as they do when you run it yourself. The output is also written to cargo.log, cmake.log or west.log in the image’s build directory, replaced on each build. Ctrl-C stops the tool and everything it started, and nros build exits with the tool’s own status.

  • On Zephyr, the wall clock is resolved before anything spins. Every sched task waits at its first spin until boot has resolved the clock, so no message is stamped before it, and timers start counting when that wait ends. A task that does not finish its setup within 30 s fails the boot, naming it. Code that waits between its setup and its first spin calls Executor::restart_timing (C: nros_cpp_executor_restart_timing).

  • On the freertos-posix board, the wall clock reads the host’s time by default. It read 0 unless a source was stated.

  • nros build checks a ThreadX-on-Linux image’s application stack against the peak it was measured at, and fails naming memory.app_stack_bytes when the stack is smaller.

  • A Rust Zephyr image with no measured stack row is held to its board’s measured main-stack floor instead of a fixed 32 KiB. The Nucleo-F767ZI’s default Rust main stack is 33,368 bytes.

  • nros build says where it found each Zephyr os_config fragment of an image: the bringup’s board directory, the west application, or the bringup.

  • On a host board, a zenoh open that makes one attempt times out its TCP connect after 1 s. This covers linux, native_sim, freertos-posix and threadx-linux when no connect budget is stated. The connect used to block until the kernel gave up, about two minutes for an unreachable router. It now fails in about 1 s, and the zenoh handshake after it keeps its 10 s. A router on the same host is not affected: its connect completes in under a millisecond. A router across a lossy or slow network can be: if the first SYN is lost, the open now fails at boot with zenoh open: no session with tcp/<router> in one attempt (connect_timeout_ms=0). State a budget, and the open retries within it:

    [image.<id>.knobs.zenoh]
    connect_timeout_ms = 30000
    

Code you can delete

  • Logging to /rosout takes no extra code. In an image built with the rosout capability, the executor creates one /rosout publisher per node and sends each log record from that node’s publisher, as rcl does. Rust nros::rosout::pump and C++ rclcpp::rosout::Publisher are deprecated: both still work, but they add a second publisher, so delete them. C’s rclc_rosout_publisher_init and rclc_rosout_pump stay, for a node made with rclc_node_init_default.

New commands and options

  • nros build --cmake-args=<args> passes arguments to every CMake configure of the build: a CMake image’s, a west image’s and a CMake package’s. The = is required. One value can hold several arguments, split with plain shell quoting (--cmake-args="-DA=1 -DB='x y'"), and the flag repeats. --cmake-args=@<file> reads one argument per line, with # comments. Allowed: -D, -U, -W*, --log-level, --log-context and --debug-find. A name nros build sets itself, and -DCONFIG_* (which goes in the image’s conf), are refused, and the error says where the setting goes. colcon’s spelling, --cmake-args -DA=1, is refused with your arguments shown rewritten.
  • [image.<id>.build] cmake_args = [...] in system.toml states an image’s own CMake arguments, checked the same way. They follow [image_defaults.build] cmake_args, and --cmake-args= comes after both.
  • [image_defaults.build] cmake_args also reaches the metadata probe, which runs once for the whole workspace before any image builds. Put a path the probe needs there, such as -DEigen3_DIR=... for a library of your own: --cmake-args= and an image’s own cmake_args do not reach it. A change to the list probes again.
  • nros build --cargo-args=<args> passes arguments to every cargo command of a cargo image, split, repeated and read from @<file> like --cmake-args=. Allowed: --features, --no-default-features, --all-features, -v, -q, --timings, --locked, --offline and --frozen. In a workspace, name a feature with its package (--features=<pkg>/<feat>). A feature the build chooses itself (the RMW, the platform, a board or capability feature) is refused: choose those in system.toml.
  • nros build --profile=<name> builds with that profile instead of the image’s profile, for one build. It takes the same values as [image.<id>] profile: a cargo profile or a CMake build type. A single-package cargo project now honours profile too; before, it was dropped without a word.
  • An application trace marker: rclc_trace_marker(id, arg) in C, rclcpp::trace_marker in C++ and nros::trace_marker::emit_app_marker in Rust send an event through the installed callback trace sink, on the same clock as the executor’s callback events. Ids 1 to 15 are yours; 0 and the executor’s ids are refused with an error. On Zephyr the default sink writes the CTF stream; on FreeRTOS, POSIX, NuttX and ThreadX the event goes to a sink the application installs.

New boards

  • s32z270-rtu0-zephyr, a Zephyr board for the NXP S32Z270 RTU0 Cortex-R52. It builds and links; no emulator models it. A board’s west_board may now carry a board revision (board@rev/soc/variant), so no -DBOARD_REVISION is needed.
  • s32z270-freertos-rtd, the S32Z270 RTU on NXP’s FreeRTOS port, built from a provisioned NXP kernel (NXP_FREERTOS_S32ZE_DIR) and RTD (S32_RTD_PATH). Name the board instead of setting FREERTOS_DIR and FREERTOS_PORT. The network glue is not part of it yet.

Other new features

  • RCLCPP_<LEVEL>_THROTTLE(logger, clock, ms, ...) compiles and throttles, measuring its window on the clock you pass, as rclcpp does. That clock can be *get_clock(), a steady clock, a system clock, or a ROS time clock driven by /clock. The first record at a call site is logged, then at most one per ms. RCLCPP_<LEVEL>_ONCE, _SKIPFIRST and _SKIPFIRST_THROTTLE are new at every level. All of them work on freestanding targets and take no lock. The C throttle gains rclc_log_throttle_admit_at, which takes the clock reading from the caller.
  • A C or C++ image carries only the parts of the API it calls. Before, every image kept the whole C and C++ API: a talker that only publishes still carried the action server and client. The mps2-an385 FreeRTOS C talker drops from 631,440 to about 424,000 bytes of flash.
  • An image of C and Rust components, with no C++ source, configures on the CMake road and on Zephyr. Before, nros build and nros configure --census stopped with “node pkg ... exec ... is lang rust (a rust component), not c”.

Fixes

  • A list parameter from a launch <param from> file, or written as value="[1, 2]", reaches the node as an array of doubles, integers, bools or strings, instead of one comma-joined string. A list that mixes types is refused at boot with a log line, as ROS refuses it. [] seeds nothing, so the declared default stands.
  • ros2 param list and ros2 param dump see every parameter of a node. Before, list_parameters stopped at 64 names without saying so, and get_parameters refused a request for more than 64.
  • The C and C++ metadata probe holds 1,024 parameters, so a component that declares more than the 32-slot default (an Autoware controller declares about 150) is probed instead of running on compiled defaults.
  • A board package inside your workspace (src/<board>/nros-board.toml) is found by the west configure that nros build starts, so a Zephyr image on that board builds without NROS_EXTRA_BOARD_PATH.
  • A build directory follows the nros that builds it. Before, a directory first configured by another nros kept running that binary and failed with “in-tree nros CLI is STALE”. A bare cmake re-configure still uses the cached tool, but now stops at once, naming the tool and both versions, when that tool’s codegen version is one the tree does not accept.
  • A Zephyr C++ image built with newlib on a 64-bit Arm board, such as fvp-aemv8r-smp, can call fabsl and copysignl, so code that reaches Eigen’s long-double abs builds without a -Dfabsl define of its own.
  • A new C project from nros new for the nucleo-f767zi Zephyr board builds again: its main stack is now 118,424 bytes.
  • A Zephyr image whose nodes serve the parameter or lifecycle services (several nodes, or two managed nodes on XRCE-DDS) no longer boots and then stalls when its heap runs out. The heap is now derived from those node counts instead of a fixed default. An image with one node keeps the heap it had, and a heap stated with [image.<id>.knobs.memory] heap_bytes still wins.
  • A failed C or C++ metadata probe is reported as a failure, naming the node, the first error line and the log. Before, the image was built on default sizes without a word. NROS_PROBE_FAILURE=warn (the default for an interactive build) finishes with a warning line, and NROS_PROBE_FAILURE=refuse makes nros sync and nros configure fail. Set refuse in CI.
  • A failed probe now reports its cause: the linker’s first undefined reference line instead of ld returned 1 exit status, and a CMake error’s message instead of its header alone.
  • A component that declares no publisher, subscription, timer, service, action or parameter is refused by the metadata probe with a sentence naming it, instead of a bare “exit 254”.
  • A Zephyr configure with no seed from nros configure finishes in two passes, as its message says. Before, it failed twice first.
  • A FreeRTOS, NuttX or ThreadX C or C++ image writes compile_commands.json when its stack floor is checked, so the stack walk is tighter: the new FreeRTOS C talker walks 130,424 bytes instead of 147,060. A project that sets CMAKE_EXPORT_COMPILE_COMMANDS keeps its choice.
  • A Rust Zephyr image uses much less main-thread stack for a graph query (listing names and types: about 20 KB to 3.5 KB) and for a parameter declaration (about 25 KB to 8 KB). A graph query also no longer stops at 64 names, and returns names in sorted order, as the ROS 2 RMWs do.
  • A Rust package in a workspace with no bringup builds after an nros build --dry-run plan of it. Before, the build failed with “cannot update the lock file … because –frozen was passed”.
  • The API docs and C headers of the RMW layer, the zenoh RMW, nros-board-common and nros-orchestration-ir state facts in plain words instead of citing internal design numbers.