Skip to content

Enhance metadata test to verify sensor timestamp - #12642

Merged
Nir-Az merged 3 commits into
realsenseai:developmentfrom
Nir-Az:enable-snsr-ts-test
Feb 8, 2024
Merged

Enhance metadata test to verify sensor timestamp#12642
Nir-Az merged 3 commits into
realsenseai:developmentfrom
Nir-Az:enable-snsr-ts-test

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Feb 8, 2024

Copy link
Copy Markdown
Collaborator

We expect frame timestamp to be different than sensor timestamp.

Sensor timestamp should be around frame timestamp - (actual exposure / 2), for sanity we just check it is increasing and not equal to the frame timestamp

Tracked on [RSDEV-401]

@Nir-Az
Nir-Az requested a review from OhadMeir February 8, 2024 08:19
@Nir-Az
Nir-Az changed the base branch from master to development February 8, 2024 08:43
@Nir-Az Nir-Az closed this Feb 8, 2024
@Nir-Az Nir-Az reopened this Feb 8, 2024
@Nir-Az

Nir-Az commented Feb 8, 2024

Copy link
Copy Markdown
Collaborator Author

Excluded D457 as it is not supported

Comment thread unit-tests/live/metadata/test-alive.py Outdated
test.check(is_value_keep_increasing(rs.frame_metadata_value.frame_timestamp))
test.finish()

# Test #3 Increasing frame timestamp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sensor timestamp

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment on lines 83 to 84
def is_value_keep_increasing(metadata_value, number_frames_to_test=50) -> bool:
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need to update prev_metadata_value each iteration

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Wow, how did it work before??

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Will fix

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment thread unit-tests/live/metadata/test-alive.py Outdated
testing_profiles[p] = s


def is_metadata_values_different(metadata_type_1, metadata_type_2, number_frames_to_test=50) -> bool:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are_metadata_values_different
Also in the comment - Check that the given 2 metadata types values are different

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment thread unit-tests/live/metadata/test-alive.py Outdated
def is_metadata_values_different(metadata_type_1, metadata_type_2, number_frames_to_test=50) -> bool:
"""
Check that the given 2 metadata types value is different, it is handy when we expect different timetags / counters and such
:param metadata_type_1: first valuse that we need to check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

valuse --> value

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

#############################################################################################
# get metadata depth units value and make sure it's non zero and equal to the depth sensor matching option value
test.start("checking depth units on metadata")
test.start("checking sensor timestanp on metadata")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typo
Also looks like this did not need to change. Please check again.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, will revert

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

@Nir-Az
Nir-Az merged commit 5f083eb into realsenseai:development Feb 8, 2024
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