Skip to content

Conversation

ds58
Copy link
Contributor

@ds58 ds58 commented Jun 20, 2025

No description provided.

ZEDSVOLogger zedSVOLogger = new ZEDSVOLogger();

zedSVOLogger.start(svoFile, datFile,
zedSVOLogger.connect(svoFile, datFile,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent remaining parameters

Copy link
Member

@calvertdw calvertdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Good cleanup too

// on the robot at the moment both the sensor & controller are running
long sensorTimestamp = sl_get_current_timestamp(cameraID);
long controllerTimestamp = sensorTimestamp - controllerZeroInSensorFrame;
timestampWriter.write("%d %d %s%n".formatted(controllerTimestamp, sensorTimestamp, svoPrefix));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pointing out that the timestampWriter could be null if an exception was thrown in the connect method, and that's not handled here. Unlikely to happen, but worth noting

try
{
// We assume both the sensor on board & controller real time thread clocks
// run at the same speed to try an resolve delay and time stretching issues.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// run at the same speed to try an resolve delay and time stretching issues.
// run at the same speed to try and resolve delay and time stretching issues.

Comment on lines +127 to +128
// Wait some time before trying to grab again
ThreadTools.park(5.0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know how this affects the resulting SVO file? I'd imagine it'd be stuck on the previous frame for some time, but maybe it doesn't handle it well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah might come back to this, I think for now its fine

@ihmc-rosie ihmc-rosie merged commit 61c1a4f into develop Aug 29, 2025
2 checks passed
@ihmc-rosie ihmc-rosie deleted the zedsdk-5.x branch August 29, 2025 20:21
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.

5 participants