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

add jobs done file #191

Merged
merged 4 commits into from
Jul 12, 2023
Merged

add jobs done file #191

merged 4 commits into from
Jul 12, 2023

Conversation

JohnN193
Copy link
Collaborator

@JohnN193 JohnN193 commented Jul 11, 2023

adds a jobs done file when the replay camera stops. additionally prevents cartographer from repeating the warning about the job being completed.

Additional issue is this file gets created when all lidar scans are read into the job, but this does not mean that all lidar scans have been processed

unsure of interactions with full mod and interactions with a live replay camera

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jul 11, 2023
@JohnN193 JohnN193 added appimage Build AppImage of PR and removed safe to test This pull request is marked safe to test from a trusted zone labels Jul 11, 2023
@JohnN193 JohnN193 requested review from EshaMaharishi and removed request for EshaMaharishi July 11, 2023 23:50
@JohnN193 JohnN193 added appimage-ignore-tests Build AppImage of PR and ignore tests safe to test and removed appimage Build AppImage of PR labels Jul 11, 2023
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jul 11, 2023
if err != nil {
cartoSvc.logger.Warn(err)
}
jobsDone = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. Could we talk about the requirements for this feature so I can be sure that it gets rolled into full mod?
  2. I don't think it works to track a given session completing at the package level, as variable is shared across viam cartographer instances & persists even after reconfiguration.
  3. I recommend instead (assuming this should be scoped to a given viam cartographer instance & should be reset on restart) to put it on thecartographerService struct.
  4. Also, should Jobs_Done.txt still persist if cartographer is reconfigured?
    cc @EshaMaharishi

Copy link
Collaborator

Choose a reason for hiding this comment

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

It doesn't matter if the jobs done file persists after cartographer is reconfigured since a cloud slam session will only be configured once, but I agree for code cleanliness it's better to scope it to a single configuration

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved the flag into the cartographerService struct, but I did not handle removing the file on reconfig as that is unnecessary for the demo & usage with a replay camera, but I included it in the followup ticket for the file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

followed up offline, in the followup ticket we will switch to using a DoCommand

Copy link
Collaborator

@EshaMaharishi EshaMaharishi left a comment

Choose a reason for hiding this comment

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

Lgtm for the demo, but would you mind filing a ticket to move writing the job_done file to after the final lidar scan has been processed?

viam-cartographer.go Outdated Show resolved Hide resolved
viam-cartographer.go Outdated Show resolved Hide resolved
@JohnN193
Copy link
Collaborator Author

would need to do some looking to see if we have access to cartographer's queue, to see if all data has been processed, but I can make a ticket for that

@JohnN193
Copy link
Collaborator Author

https://viam.atlassian.net/browse/RSDK-3980 ticket to move the job creation file

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jul 12, 2023
Copy link
Contributor

@nroede nroede left a comment

Choose a reason for hiding this comment

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

LGTM

@JohnN193 JohnN193 merged commit 7afd4a1 into viam-modules:main Jul 12, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appimage-ignore-tests Build AppImage of PR and ignore tests safe to test safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants