Skip to content

Commit

Permalink
Update mcap-record
Browse files Browse the repository at this point in the history
  • Loading branch information
TedSjoblom committed Nov 4, 2024
1 parent 02bd4eb commit c87b2ac
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions connectors/mcap/bin/mcap-record
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ def run(session: zenoh.Session, args: argparse.Namespace):

# Uncover from keelson envelope
try:
received_at, enclosed_at, payload = keelson.uncover(
sample.value.payload
)
# received_at, enclosed_at, payload = keelson.uncover(
# sample.value.payload
# )
envelope_obj = keelson.uncover(sample.value.payload)
except DecodeError:
logger.exception(
"Key %s did not contain a valid keelson.Envelope: %s",
Expand All @@ -104,7 +105,7 @@ def run(session: zenoh.Session, args: argparse.Namespace):
if key in channels:
logger.debug("Key %s is already known!", key)
write_message(
writer, channels[key], received_at, enclosed_at, payload
writer, channels[key], envelope_obj["received_at"], envelope_obj["enclosed_at"],envelope_obj["payload"]
)
continue

Expand Down Expand Up @@ -167,7 +168,7 @@ def run(session: zenoh.Session, args: argparse.Namespace):
# Finally, put the sample on the queue
logger.debug("...and writing the actual message to file!")
write_message(
writer, channels[key], received_at, enclosed_at, payload)
writer, channels[key], envelope_obj["received_at"], envelope_obj["enclosed_at"], envelope_obj["payload"])

t = Thread(target=_recorder)
t.daemon = True
Expand Down

0 comments on commit c87b2ac

Please sign in to comment.