Skip to content

Releases

1.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Nov 00:29
29b7d2f

Actions and services whose IDL differs between distributions are merged across them, as
messages already were, on one merge path with one error format; an action's goal, result and
feedback have their constants. Messages and services that are the same in every distribution
generate as in 1.1.1, and so do actions that have no constants; the runtime modules do not
change.

Added

  • Actions whose .action differs between distributions, such as
    nav2_msgs/action/NavigateToPose; they were rejected. Their goal, result and feedback are
    merged like messages: a field that only some distributions have is written and read only for
    them, and the constants are those of every distribution. The five wrappers are shared, and
    typeInfo(for:) returns each distribution's hashes of the parts, the wrappers and the
    SendGoal and GetResult services, as rosidl computes them from that distribution's .action.
    New IRBuilder.build(perDistro:) overload for [String: IDLAction].
  • Services whose .srv differs between distributions, such as nav2_msgs/srv/IsPathValid,
    whose request gains fields in Kilted and Lyrical and whose response gains success in
    Lyrical; they were rejected. The request and the response are merged like messages: a field
    that only some distributions have is written and read only for them, and the constants are
    those of every distribution. <Name>Srv.typeInfo(for:) returns each distribution's request,
    response and service hashes, as rosidl computes them from that distribution's .srv, and
    --verify-hashes checks the service's event type on each distribution too.

Changed

  • An action whose goal, result or feedback field changes type between distributions is
    reported at that field's line in the .action of the first distribution that changes it,
    with the type of every distribution (action 'J' cannot be merged across distributions: goal field 'g' changes type: int32 in [jazzy], int64 in [lyrical]).
  • Messages, services and actions are merged across distributions on one path, and every type
    that cannot be merged is reported in the format above: at the line of the .msg, .srv or
    .action of the distribution that introduces the problem, with the type, its part and, for a
    field that changes type, its type in every distribution. This covers a message field that
    changes type (a bare IRMergeError that named no file), shared fields in a different order,
    and a field that skips a distribution (GeneratorError.modernDistroDivergence, which the
    pipeline no longer throws). A .srv whose parts parse to the same IDL apart from comments and
    layout is no longer rejected and generates as the oldest distribution's .srv, and an invalid
    default or constant in a .srv names the file's path, as in a .msg or .action. A type that
    is the same in every distribution is decided on the parsed IDL, never on a float comparison, so
    a nan default is the same as itself and 0.0 differs from -0.0.
    Services and actions now use the union of the runs' --types lists, as messages already did;
    only programmatic callers that pass a different list per run are affected, and a run with
    nil adds nothing to the union, as for messages.

Fixed

  • A generated action has the constants of its goal, result and feedback (for example
    FollowJointTrajectoryAction.Result.INVALID_GOAL of
    control_msgs/action/FollowJointTrajectory); they were dropped. The three parts are now
    emitted by the message emitter, as the action's wrappers already were.
  • IRMergeError.conflictingFieldType lists the type of every distribution that has the field.
    With three or more distributions it could give the first distribution's type for one that
    changed it, and leave distributions out.

What's Changed

  • ci: publish the GitHub release when a version tag is pushed by @youtalk in #47
  • fix(gen): emit action goal, result and feedback with the message struct emitter by @youtalk in #48
  • fix(gen): report every distribution's type in a field-type conflict by @youtalk in #49
  • feat(gen): merge actions that differ between distributions by @youtalk in #50
  • refactor(gen): merge messages, services and actions across distributions on one path by @youtalk in #52
  • feat(gen): merge services that differ between distributions by @youtalk in #53
  • chore(release): 1.2.0 by @youtalk in #54

Full Changelog: 1.1.1...1.2.0

1.1.1

Choose a tag to compare

@github-actions github-actions released this 29 Oct 20:00
4205570

A fix for the oracle check of large types.

Fixed

  • swift-ros2-gen --verify-hashes no longer hangs on a <Type>.json larger than a pipe
    buffer (64 KiB), such as the files of moveit_msgs/action/MoveGroup: the oracle client
    reads the output of docker run while the container runs instead of after it exits.

What's Changed

  • fix(gen): read oracle output while the container runs by @youtalk in #45
  • chore(release): 1.1.1 by @youtalk in #46

Full Changelog: 1.1.0...1.1.1

1.1.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 19:59
3a24a63

Message fields that differ among the distributions after Humble, with one type hash per
distribution where they differ. Types that differ only on Humble generate as in 1.0.

Added

  • Message fields that differ among the distributions after Humble. Pass a package once per
    distribution and the generator merges the IDL into one type: a field that only some
    distributions have is written and read only for them (encoder.schemaDistro >= .lyrical),
    is decoded as its IDL default elsewhere, and says so in its doc comment. A message, service
    or action whose hash differs among distributions, including one that only reaches such a
    type (even one read for more distributions than the type itself), gets typeInfo(for:) with
    one hash per change; typeInfo stays the Jazzy one. A
    distribution with no IDL passed (Rolling) takes the newest passed distribution that is not
    newer (IRBuilder.schemaDistro(for:read:)). Types that differ only on Humble generate as
    before.
  • ROS2Distro is Comparable in release order, Rolling greatest.
  • CDREncoder(distro:), CDRDecoder(data:distro:) and schemaDistro on both, and
    schemaDistroName in SwiftROS2CDR. The existing initializers keep the 1.0 behaviour
    (Humble when legacy, otherwise Jazzy).
  • typeInfo(for:) requirements on ROS2MessageType, ROS2ServiceType and ROS2Action, with
    default implementations that return typeInfo without its hashes on Humble, and
    withoutTypeHashes on the three type info structs. swift-ros2 needs them to send the
    layout and hash of the distribution it runs against.
  • SwiftEmitter.emitServiceUmbrella(…, hashesByDistro:, …) and ServiceHashes.
  • The generated oracle corpus encodes and decodes the samples of OracleSamples.samples(for:)
    with that distribution's message schemas (OracleSamples.all keeps the default ones), and
    RosidlOracleCorpus round-trips both sets.

Changed

  • Fields that two distributions have in a different order are rejected (IRBuildError); the
    merged type used the first distribution's order for all of them.
  • GeneratorError.modernDistroDivergence now reports a field missing from a distribution
    between two that have it; any other difference among modern distributions is supported.
  • RIHS01.hash(_:for:registry:) projects a merged type onto the distribution it was read for
    that gives its shape (see above) when asked for a distribution it was not read for.
  • swift-ros2-gen --verify-hashes --distros <d> reads every --input distribution and checks
    every type on every selected distribution (default: every distribution of the inputs but
    Humble) with the hash its generated typeInfo(for:) returns there, including distributions
    its package was not read for (Rolling); a type missing from a distribution its package was
    read for is skipped there. The interface-oracles.yml hash oracle passes every
    generated distribution (Scripts/generator-args.sh without an argument) with
    --distros <row>, so it verifies the hashes the generated code carries rather than one
    distribution's IDL alone.

Fixed

  • A message with no fields in some distributions writes and reads rosidl's
    structure_needs_at_least_one_member byte in exactly those distributions (Humble splits
    included), matching its hash; the codec wrote nothing there.
  • A field a later distribution adds in the middle of a message is placed where that
    distribution has it, not at the end.
  • IRBuilder.populateActionHashes(_:distro:extraRegistry:) projects the types an action
    references onto distro instead of hashing every field any distribution has.

What's Changed

  • feat(messages): order distributions and carry the schema distro in the CDR codec by @youtalk in #37
  • feat(messages): typeInfo(for:) requirements with defaults by @youtalk in #38
  • fix(gen): merge field order per distribution and reject reordered fields by @youtalk in #39
  • fix(gen): project action hashes per distribution by @youtalk in #40
  • feat(gen): fields that differ among modern distributions by @youtalk in #41
  • feat(oracle): verify the emitted per-distribution hashes and CDR shapes by @youtalk in #42
  • chore(release): 1.1.0 by @youtalk in #44

Full Changelog: 1.0.1...1.1.0

1.0.1

Choose a tag to compare

@youtalk youtalk released this 17 Oct 02:48
649deb6

Patch release: the reusable interface-oracles.yml workflow upgrades the oracle image's packages after installing apt-packages, so callers that install extra packages no longer fail against an older published osrf/ros image (#35). The package code is unchanged since 1.0.0.

1.0.0

Choose a tag to compare

@youtalk youtalk released this 16 Oct 06:52
07c4efa

First stable release of swift-ros2-rosidl: the XCDR v1 CDR codec, the ROS 2 message, service and action protocols, the runtime interface packages, and the swift-ros2-gen generator with its SwiftPM build plugin. The public API is now covered by semantic versioning.

The code is unchanged since 1.0.0-rc.3, which passed live interop through swift-ros2 against ROS 2 Humble, Jazzy, Kilted and Lyrical hosts over Zenoh and DDS. The README walkthrough was corrected in #34.

See CHANGELOG.md for the changes since the 1.0.0-rc.1 extraction.

1.0.0-rc.3

1.0.0-rc.3 Pre-release
Pre-release

Choose a tag to compare

@youtalk youtalk released this 16 Oct 00:20
946a073

Last release candidate before the 1.0.0 API freeze.

  • Removed dead public API before the freeze (#21) and trimmed CDRSerializationError to the cases generated code throws (#23).
  • Malformed IDL is reported with file and line instead of trapping (#22); generated encode() throws for invalid fixed-array/bounded-sequence lengths (#23).
  • Bounded strings are length-checked on encode and decode (#30); wstring fields are rejected until implemented (#31).
  • Generator cleanup: one IDL walk, one Source label rule, no SwiftROS2CDR import in service umbrellas (#24, #25, #26); drift guards, DocC for every target, cached CI toolchains (#27, #28, #29).

See CHANGELOG.md.

1.0.0-rc.2

1.0.0-rc.2 Pre-release
Pre-release

Choose a tag to compare

@youtalk youtalk released this 14 Oct 22:43
d6c919b

Second release candidate.

  • ROS2ServiceTypeInfo.serviceTypeHash and ROS2ActionTypeInfo.sendGoalServiceTypeHash / getResultServiceTypeHash: service-level type hashes, which rmw_zenoh_cpp uses to key services and action services (additive; defaults are nil) (#17).
  • swift-ros2-gen emits and --verify-hashes checks service-level, _Event and action-level hashes; ActionMsgs and RclInterfaces are regenerated (#17).
  • swift-ros2-gen reports unresolved array element types as an error instead of crashing (#19).
  • README: generating, packaging and publishing a message module end to end (#18).

See CHANGELOG.md.

1.0.0-rc.1

1.0.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@youtalk youtalk released this 14 Oct 05:50
382d958

1.0.0-rc.1

  • Extracted from swift-ros2 2.3.2 (CDR, message protocols, runtime interfaces, swift-ros2-gen)
    with its history; the 2.3.2 state is commit be8a4ae5f2e8b5499b6bb199d60684a29ae481f8 of this repository.
  • ROS2Distro moved here from SwiftROS2Wire; wire-only members stay in swift-ros2.
  • Removed the RCL marshalling and registry emitters, Pipeline.generateRclMarshalling and the --emit-rcl-marshalling CLI flags (RCL is a swift-ros2 runtime concern).
  • Runtime interfaces are generated as one module per ROS package (BuiltinInterfaces, UniqueIdentifierMsgs, ActionMsgs, RclInterfaces).
  • swift-ros2-gen --dependency <pkg>=<path>@<distro> takes packages that are referenced but not emitted.
  • swift-ros2-gen --module <pkg>=<Module> overrides the module name of a package.
  • Generated files import the modules of the packages they reference (derived imports).
  • Distro-safe typeInfo(for:): Humble gets the legacy schema and every later distribution the modern hash; a field that differs among modern distributions stops generation.
  • ROS names equal to a Swift standard-library type get a Msg suffix, now including DurationMsg, RangeMsg and ClockMsg.
  • The generator emits CDR oracle samples, and a Swift round-trip check verifies them. Each
    sample lists the distributions whose IDL has its type, and the corpus executable takes a
    distribution argument (<corpus> <output-dir> <distro>) that writes only that
    distribution's samples; interface-oracles.yml passes the row's distribution.
  • Services and actions of a package read from several distributions carry the distributions
    that have them, as messages do: an action that only a later distribution has is generated
    (it was read from the first distribution only), an action whose shape differs between
    distributions is rejected like a service, and --verify-hashes checks service halves and
    action parts in each distribution that has them.
  • Upstream IDL is pinned in idl.lock and fetched by Scripts/fetch-idl.sh into a gitignored cache (no submodules); generated Swift is committed.
  • Reusable interface-oracles.yml workflow for hash and CDR oracles in interface repositories, with an apt-packages input.
  • Empty action goals, results and feedback encode and decode rosidl's structure_needs_at_least_one_member byte, as empty messages and service halves already did; before, they wrote no body and rosidl subscribers rejected them.

Known issues

  • wstring (bounded or not) is encoded like string (UTF-8, NUL-terminated), which no RMW accepts: Fast-CDR-based RMWs (rmw_fastrtps_cpp, rmw_zenoh_cpp) and Jazzy's rmw_cyclonedds_cpp expect a UTF-16 code-unit count followed by one 4-byte unit per UTF-16 code unit, and Lyrical's rmw_cyclonedds_cpp expects a byte count followed by 2-byte units.