Skip to content

Support raw 7-float mocap payloads in mocap decode#1

Open
micahkc wants to merge 1 commit into
CogniPilot:mainfrom
micahkc:raw-float-mocap-decode
Open

Support raw 7-float mocap payloads in mocap decode#1
micahkc wants to merge 1 commit into
CogniPilot:mainfrom
micahkc:raw-float-mocap-decode

Conversation

@micahkc

@micahkc micahkc commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • csyn_decode_mocap_frame() now accepts a 28-byte payload of little-endian floats (x, y, z, qw, qx, qy, qz) in addition to the existing MocapFrame flatbuffer format. Values are validated with isfinite() and the quaternion is remapped from the sender's frame convention into the autopilot's convention. Any other payload size falls through to the flatbuffer decode as before.
  • Adds one-shot (once per boot) log lines on the UDP rx path and the zros bridge path to make it easier to see whether mocap packets are arriving and decoding.

Motivation

This was required to get mocap working with the existing mocap data publishing, which emits raw float packets rather than MocapFrame flatbuffers. Longer term we may want to change the publisher to emit the flatbuffer format instead (and use the receiver's frame convention), in which case the raw-float path here could be dropped — opening this to get things working and to discuss which side should adapt.

Accept a 28-byte payload of little-endian floats (x, y, z, qw, qx,
qy, qz) in csyn_decode_mocap_frame() alongside the existing
MocapFrame flatbuffer format. Values are validated with isfinite()
and the quaternion is remapped from the sender's frame convention
into the autopilot's convention.

This is required to interoperate with the existing mocap data
publishing, which emits raw float packets rather than flatbuffers.
Also add one-shot log lines on the UDP rx and zros bridge paths to
aid debugging mocap ingest.

Signed-off-by: micahkc <mkcondie01@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant