-
Notifications
You must be signed in to change notification settings - Fork 3
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
Make camera settings configurable & more #38
Commits on May 28, 2024
-
build: Set CMAKE_CXX_STANDARD_REQUIRED
This is needed for clangd LSP working properly.
Configuration menu - View commit details
-
Copy full SHA for 57b0d83 - Browse repository at this point
Copy the full SHA 57b0d83View commit details -
Add CameraSettings struct and function to load from file
Add struct `CameraSettings` which is supposed to hold all configurable settings of the cameras (currently frame rate and the path to the pylon settings file). Further add functions to get default values and to load from TOML files. To avoid having to either pass around the path to the TOML file in higher-level scripts or to assume a hard-coded default path, use an environment variable TRICAMERA_CONFIG_FILE to specify the path. Note: This commit only adds the struct but does not yet use it. It is the first step in getting rid of the hard-coded frame rate.
Configuration menu - View commit details
-
Copy full SHA for 5f35b9c - Browse repository at this point
Copy the full SHA 5f35b9cView commit details -
I realised that frame rate and the pylon settings file are actually used by different classes (TriCameraDriver and PylonDriver), so having them together in one structure was a bit messy. This commit rewrites the settings implementation to use a separate struct for each module/class that needs configuration but still bundles the loading in one central `Settings` class. Configuration for the different classes is expected to be in separate sections of the same TOML file: ```toml [pylon_driver] pylon_settings_file = "path/to/pylon_settings_file.txt" [tricamera_driver] frame_rate_fps = 10 ``` While the TOML file is parsed as a whole in the constructor, the structs for the different sections are only instantiated on demand, when the corresponding getter is called.
Configuration menu - View commit details
-
Copy full SHA for 580c7de - Browse repository at this point
Copy the full SHA 580c7deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c9b0b9 - Browse repository at this point
Copy the full SHA 1c9b0b9View commit details -
Use `Settings` to get path to the Pylon settings file.
Configuration menu - View commit details
-
Copy full SHA for a098807 - Browse repository at this point
Copy the full SHA a098807View commit details -
Use Settings in TriCameraDriver
Expect a `Settings` instance as argument (optional, by default use the "load file from env variable"-constructor). Use it to set the `rate` at which images are fetched. Also pass it on to PylonDriver instances, so the file is only read once. This now technically allows to change the frame rate of the TriCameraDriver. Note however, that currently the rate of 10Hz is still assumed in some other parts of the code, so changing it via the configuration may not yet work properly in all cases.
Configuration menu - View commit details
-
Copy full SHA for 406fa95 - Browse repository at this point
Copy the full SHA 406fa95View commit details
Commits on May 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 21513fc - Browse repository at this point
Copy the full SHA 21513fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for d89dcf7 - Browse repository at this point
Copy the full SHA d89dcf7View commit details -
fix: Open camera when no device_user_id is given & refactor
Move the code for connecting to a Pylon camera out of the constructor of PylonDriver to a standalone function. This allows reusing the code. While doing this, I noticed that the steps to open the camera and start grabbing images where accidentally done in the `else`-block handling the case when a DeviceUserID is specified. I remember that connecting to a camera without user id did work in the past, probably due to that. Moving the relevant function calls out of the if/else should fix it.
Configuration menu - View commit details
-
Copy full SHA for 72114de - Browse repository at this point
Copy the full SHA 72114deView commit details
Commits on Jun 5, 2024
-
Add executable pylon_dump_camera_settings
This is a simple tool to load the current settings of a Pylon camera and print it to stdout (so it can be piped into a file). This makes it easier to produce a new Pylon settings file for use with PylonDriver.
Configuration menu - View commit details
-
Copy full SHA for 0f06620 - Browse repository at this point
Copy the full SHA 0f06620View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f94f93 - Browse repository at this point
Copy the full SHA 6f94f93View commit details -
(check_camera_sharpness) Do not assume camera rate
The previous implementation seemed to assume a hard-coded frame rate of 10 fps. This wasn't even correct as PylonDriver uses the camera frame rate which is configured via the Pylon settings file (currently 100fps). Instead add a parameter "--update-freq" (still defaulting to 10) and use that to compute the sleep duration of `cv2.waitKey`. Behaviour should be mostly the same as before (with default values, the sleep duration just changes from 90 to 100) but no explicit camera frame rate is assumed anymore.
Configuration menu - View commit details
-
Copy full SHA for 5e15d49 - Browse repository at this point
Copy the full SHA 5e15d49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a1f605 - Browse repository at this point
Copy the full SHA 0a1f605View commit details -
Configuration menu - View commit details
-
Copy full SHA for 320d86a - Browse repository at this point
Copy the full SHA 320d86aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83ea941 - Browse repository at this point
Copy the full SHA 83ea941View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2bed6f4 - Browse repository at this point
Copy the full SHA 2bed6f4View commit details -
More informative error if config file parsing fails
Add some more context to the error message that is shown when parsing the configuration file fails. Add fmt library for more convenient string formatting.
Configuration menu - View commit details
-
Copy full SHA for 392c8f7 - Browse repository at this point
Copy the full SHA 392c8f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f444e3 - Browse repository at this point
Copy the full SHA 1f444e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 77a977b - Browse repository at this point
Copy the full SHA 77a977bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40adfa2 - Browse repository at this point
Copy the full SHA 40adfa2View commit details
Commits on Jun 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9b3a6da - Browse repository at this point
Copy the full SHA 9b3a6daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 570001e - Browse repository at this point
Copy the full SHA 570001eView commit details -
build: Remove ament_export_libraries and _include_directories
According to the [documentation](https://docs.ros.org/en/humble/How-To-Guides/Ament-CMake-Documentation.html#installing), those macros are not needed for target-based installs and should thus normally not be used anymore.
Configuration menu - View commit details
-
Copy full SHA for ceb2f23 - Browse repository at this point
Copy the full SHA ceb2f23View commit details
Commits on Jun 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9cc988b - Browse repository at this point
Copy the full SHA 9cc988bView commit details
Commits on Aug 5, 2024
-
Add script tricamera_monitor_rate.py
Add a script that fetches TriCamera observations to analyse the frame rate. This is mostly meant for developers (for testing/debugging) but might also be useful for users to verify their settings are loaded correctly.
Configuration menu - View commit details
-
Copy full SHA for e643965 - Browse repository at this point
Copy the full SHA e643965View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3927d86 - Browse repository at this point
Copy the full SHA 3927d86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37e0dee - Browse repository at this point
Copy the full SHA 37e0deeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74b4518 - Browse repository at this point
Copy the full SHA 74b4518View commit details