Support raw 7-float mocap payloads in mocap decode#1
Open
micahkc wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 existingMocapFrameflatbuffer format. Values are validated withisfinite()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.Motivation
This was required to get mocap working with the existing mocap data publishing, which emits raw float packets rather than
MocapFrameflatbuffers. 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.