Skip to content

Actual FPS simplification & unit change [API change] - #12326

Merged
maloel merged 5 commits into
realsenseai:developmentfrom
maloel:actual-fps
Oct 31, 2023
Merged

Actual FPS simplification & unit change [API change]#12326
maloel merged 5 commits into
realsenseai:developmentfrom
maloel:actual-fps

Conversation

@maloel

@maloel maloel commented Oct 27, 2023

Copy link
Copy Markdown
Contributor

RS2_FRAME_METADATA_ACTUAL_FPS is now really the actual FPS, same as shown in the viewer as Hardware FPS, although with better precision:

  • Changes the units of ACTUAL_FPS metadata to be *1000 (e.g., 30.1 fps will be represented as 30100 in metadata)
    • This is NOT backwards-compatible!
    • This greatly improves syncer accuracy at lower FPS (see Improve desyncs on different-FPS streams #12315)
    • NOTE: this likely has implications for rosbag recordings, in that the old values will not be *1000... when tested, they play just fine but show the old values
  • Removes discrete mode for ACTUAL_FPS
    • This was used in non-color (i.e., Depth, IR, etc.) d400_device derivatives; actual FPS will now be correct
  • Removes use of ACTUAL_EXPOSURE as predictor of actual FPS
  • If ACTUAL_FPS cannot be calculated (missing previous frame time, or getting a value ~0) then ACTUAL_FPS value will be missing (i.e., supports() will return false; contrast with the previous behavior, which instead put the stream FPS there)
  • Simplifies metadata parsers: joins the supports() and get() functions into single find()
  • Likewise implements a single virtual frame_interface::find_metadata() to both check and get metadata - should save on performance, especially relevant in the syncer

Related to [RSDSO-19336]

@maloel
maloel requested a review from Nir-Az October 27, 2023 07:41
@Nir-Az

Nir-Az commented Oct 29, 2023

Copy link
Copy Markdown
Collaborator

Can we run a "Semi" RealCI and see jo reggression.
We have to be carefull here.
Also need to make sure ROS is not using this field

@maloel

maloel commented Oct 29, 2023

Copy link
Copy Markdown
Contributor Author

No ACTUAL_FPS in realsense-ros

@maloel

maloel commented Oct 30, 2023

Copy link
Copy Markdown
Contributor Author

Two Semi runs of RealCI came back clean so far.

@Nir-Az Nir-Az changed the title Actual FPS simplification & unit change Actual FPS simplification & unit change [API change] Oct 30, 2023
Comment thread src/ds/d400/d400-auto-calibration.cpp
Comment thread src/ds/d400/d400-factory.cpp
Comment thread src/frame.cpp
Comment thread src/hid-sensor.cpp
Comment thread src/metadata-parser.h
Comment thread src/metadata-parser.h
Comment thread src/metadata-parser.h
Comment thread src/metadata-parser.h

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@maloel

maloel commented Oct 31, 2023

Copy link
Copy Markdown
Contributor Author

We see no regressions on external sync slave setups (which prompted this change):

  • 30-30 FPS 3-second desync every 170 sec (before this PR) is now gone (with this PR)
  • 60-60 behaves well
  • D60-C5 no regression; still no sync at all due to huge spread between D & C arrival times
  • D5-C60 sync happens as expected
    This may or may not be with a faulty external sync setup (currently being investigated).

@maloel

maloel commented Oct 31, 2023

Copy link
Copy Markdown
Contributor Author

RealCI on the D457 ran twice; no new behavior observed.

@maloel
maloel merged commit a6b48b9 into realsenseai:development Oct 31, 2023
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.

2 participants