auto-populate machine IDs from env vars and validate sensor config#16
Open
auto-populate machine IDs from env vars and validate sensor config#16
Conversation
Closed
6a13444 to
de03d7f
Compare
machine_id and part_id are now optional in config — if not set, they fall back to VIAM_MACHINE_ID and VIAM_MACHINE_PART_ID env vars injected by the Viam agent. machine_id is still required (either via config or env). Also fixes Config.Validate signature to match updated rdk interface (now returns required deps, optional deps, error). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Before starting a cloudslam session, check that each configured sensor has an appropriate data capture method enabled in the machine part's config. Cameras require NextPointCloud; movement sensors require any enabled capture method. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After stopping a mapping session, fetch the session metadata and return an error with the failure message if the session ended with END_STATUS_FAIL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
machine_id and machine_part_id are now auto-populated from viam-server env vars, so they no longer need to appear in the example config. Update attribute table to reflect optional status and defaults. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JohnN193
commented
Mar 20, 2026
| // CheckSensorsDataCapture verifies that all of the provided sensors have at least one enabled | ||
| // data capture method configured in the machine part's config. Returns an error listing any sensors | ||
| // that are missing enabled capture. | ||
| func (app *AppClient) CheckSensorsDataCapture(ctx context.Context, partID string, sensors []*cloudslamSensorInfo, logger logging.Logger) error { |
Collaborator
Author
There was a problem hiding this comment.
The most common failure for cloudslam was the machine being misconfigured, since we rely on data capture for using cloudslam. Been wanting this check for awhile tbh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Config and validation improvements.
machine_idandmachine_part_idnow fall back toVIAM_MACHINE_ID/VIAM_MACHINE_PART_IDenv vars injected by viam-server — neither needs to appear in the module configNextPointCloudfor cameras; any enabled method for movement sensors)stopDoCommand now surfaces the session's error message when the job ended in failurePart of a series: [PR A] → PR B → [PR C] → [PR D]