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

Added ability to retrieve camera cal during log playback #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaz-jlh
Copy link
Contributor

@jaz-jlh jaz-jlh commented May 9, 2019

This is using the environment variable LOG_PATH which should only be set during playback.

https://github.com/build-week/hover-jet/wiki/Playing-Back-Logs

@jaz-jlh jaz-jlh requested a review from jpanikulam May 9, 2019 00:56
@@ -62,7 +62,11 @@ std::optional<int> CameraManager::follow_v4l_path(const std::string& path) const
const std::string v4l_path = fs::canonical(path, ec).string();
const int index = v4l_path.back() - '0'; // note that this will break for >10 cameras
if (ec) {
return std::nullopt;
if (getenv("LOG_PATH")) { // if LOG_PATH is set, we can assume that we're in playback mode and the video index won't be used
Copy link
Member

Choose a reason for hiding this comment

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

JAZ!@!!!!!!

Copy link
Member

Choose a reason for hiding this comment

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

Some thoughts:

  • Ideally, all of the code paths would be the same, online and offline, so they can't accidentally diverge
  • Most consumers of the calibration don't need to actually interact with the camera, and the camerabq never needs the calibration -- those could be two different access paths
  • Apparently you can directly open captures via the v4l path, so you may be able to remove the camera number munging

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, I'll take closer look when I'm back in town!

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