Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not hard-code camera frame rate #176

Merged
merged 6 commits into from
Sep 17, 2024
Merged

Do not hard-code camera frame rate #176

merged 6 commits into from
Sep 17, 2024

Conversation

luator
Copy link
Member

@luator luator commented Sep 17, 2024

Description

Since the camera frame rate can be configured now, it should not be hard-coded anywhere.

  • trifinger_backend: Here we can use get_sensor_info() of the driver to get its frame rate.
  • trifinger_data_backend: Since the driver is not instantiated within this script, it's not possible to get the frame rate directly from it. Instead, use the camera Settings class to read the settings and get the frame rate from there. Note that this only works as long as the driver is using the default settings discovery and is not passed a file explicitly!

How I Tested

By running the two scripts and checking the resulting timeseries/logger buffer sizes when changing the camera frame rate.

@luator luator added the enhancement New feature or request label Sep 17, 2024
@luator luator self-assigned this Sep 17, 2024
Move the argument parsing to a separate function to reduce complexity of
the main function.
Compute camera time series length dynamically to cover the full
robot time series window.  This is to ensure that for each robot
observation in the buffer there is also a camera observation.
Instead of hard-coding it in the script, use the new `get_sensor_info()`
method of the driver to get the camera frame rate.

The frame rate is specified for each of the three cameras, but since
they are syncronised, they are all the same, so we can simply take the
value from the first camera in the list.
@luator luator force-pushed the fkloss/camera_settings branch from 577243a to fae465f Compare September 17, 2024 15:38
@luator luator merged commit 4f2ec8b into master Sep 17, 2024
7 checks passed
@luator luator deleted the fkloss/camera_settings branch September 17, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant