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-nros11

Reference · Level 2: Building real applications

A project generated with 0.6.0-nros10 builds as it is: nothing needs to be generated again.

Edits you may need to make

  • An image’s profile now reaches a CMake build. nros build sets the C and C++ build type and the Rust runtime’s cargo profile from it, in either spelling (nros-relwithdebinfo or RelWithDebInfo). Before, a CMake build was Release whatever the image said. A profile with no CMake build type is refused, and the message names -- -DCMAKE_BUILD_TYPE=<type>. A Zephyr image that states profile is refused: Zephyr takes its optimisation from Kconfig, so delete the line.

  • A hand-written CMake configure that names its image gets that image’s settings. nano_ros_workspace(SYSTEM <bringup>) with -DNROS_IMAGE=<id> applies the image’s knobs, env rows and domain_id, and is refused when the bringup states such rows but no image is named. nano_ros_add_executable(… BRINGUP <dir> IMAGE <id>) uses the domain the image states instead of 0, and refuses a -DNROS_DOMAIN_ID that names another.

  • A Rust package in a mixed C, C++ and Rust image needs no CMake file. The build registers it from the bringup’s [[component]] row, on a CMake build and in a generated Zephyr application alike, so the same Rust package builds unchanged in a Rust-only image and in a mixed one. You may delete a CMakeLists.txt that only calls nano_ros_node_register(LANGUAGE RUST), with its <build_type>nros_cmake</build_type>; a package with a real CMakeLists.txt of its own keeps it.

  • Create every C node with rclc_executor_node_init. A node made with rclc_node_init_default is not bound to an executor, and a publisher, subscription, service, client, timer or action created on it is now refused with RCL_RET_INVALID_ARGUMENT: the executor would not know which node to announce it under. Replace each rclc_node_init_default(&node, name, namespace, &support) with rclc_executor_node_init(&executor, &node, name, options), after the executor is set up. Code that already binds its nodes this way needs no change.

  • Spell an RTIC image as the bare-metal board plus framework = "rtic". board = "rtic-mps2-an385" still builds the RTIC entry, but that board name is going away. Write board = "mps2-an385-baremetal" with framework = "rtic" instead; the image builds the same entry.

New

  • An image announces only the nodes it declares. ros2 node list shows the nodes of the image’s launch file and no extra node for the image itself. An entity created on the executor rather than on a node is announced under the image’s first declared node; an image that declares no node keeps its one node as before. On zenoh a node appears with its first entity, as on Cyclone DDS.
  • The MPS2-AN385 bare-metal board runs RTIC per image. Add framework = "rtic" to an [image.<id>] on board = "mps2-an385-baremetal" to build the RTIC entry; without it the image builds the direct entry as before.
  • An XRCE node notices when its Agent restarts. About a second after the Agent is back, every publish and spin returns a session-lost error and Executor::session_lost() is true. Drop the executor and open it again to reconnect; the loop is in When the Agent restarts.
  • The Zephyr starter image has the C++ talker built too, beside the C and Rust ones, so the starter’s C++ tab needs no download.

Fixes

  • A C or C++ image that opens its executor over its own storage no longer also reserves the Rust executor’s default storage. That reservation made such images run out of RAM on small boards.
  • Editing a node’s parameter file, or anything else that makes the build call a model stale, now makes nros configure resolve the model again. Before, it said up to date, the build kept the old values, and only deleting build/ got out.
  • nros configure reads the platform file for the target an image runs on, such as <stem>.system.zephyr.yaml, instead of always the POSIX one.
  • A Rust node in a mixed C++ and Rust image reads its launch <param> values with ctx.param(name). Before, every read returned None.
  • A launch parameter that a Rust node reads by name counts as read, so the contract check no longer reports it as declared but unused.
  • A Zephyr image adds every workspace package it depends on, so a support library’s own CMakeLists.txt runs, and its zephyr/module.yml Kconfig symbols can be set from the image’s config fragment. It also finds the workspace’s own message packages without NROS_INTERFACE_SEARCH_PATH, and keeps those modules when nros build adds nano-ros as an extra Zephyr module.
  • The stack check works on cross-built images whose crate names are long, and on a project that pins its own Rust toolchain. If that toolchain lacks its LLVM tools, the message names the rustup command that adds them.
  • A C image built on a host without clang no longer fails its stack check. Without clang the check cannot measure the image, so it now passes with the warning unmeasured: install clang to check this image's stack; install clang to have it checked.
  • A C or C++ app on ThreadX prints nano-ros’s own log lines, such as the one that says why a session did not open. Before, they were dropped.
  • A Zephyr build no longer fails after the link step when a .conf fragment states a pool size above the one the image needs (for example CONFIG_NROS_MAX_PUBLISHERS=13 where 11 is enough), or when the image subscribes to more than one message type.
  • A new Zephyr C talker for nucleo-f767zi builds again: its stamped stack was below the measured floor. The project’s name no longer changes the floor.
  • With zenoh’s split-lock send path on, a message too large for one batch no longer reaches the wire ahead of the batch before it, and a publish no longer waits behind a slow batch write.
  • The C and C++ API headers and the Rust API docs of nros and nros-node state facts in plain words instead of citing internal design numbers.