Bump viam-cpp-sdk to 0.38.1 and drop Reconfigurable - #80
Merged
Conversation
viam-cpp-sdk removed viam::sdk::Reconfigurable in v0.35.0 (viamrobotics/viam-cpp-sdk#630). viam-server now rebuilds a resource on a config change instead of calling reconfigure, so the interface, the override, and the three includes of reconfigurable.hpp all go away. The include in discovery.hpp was already unused. The ordering is safe: ModuleService::ReconfigureResource calls ResourceManager::replace_one, which runs do_remove(name) before do_add(name, create_resource()), so the old instance is destructed before the replacement is constructed. The constructor already redoes everything reconfigure did -- configure, configureDevice, startDevice, and the serial_by_resource mapping. Two cleanups only reconfigure performed do not survive that on their own, so move them into ~Orbbec(): config_by_serial().erase(...) otherwise a stale entry leaks whenever the serial_number attribute changes frame_set_by_serial().erase(...) otherwise the rebuilt instance can find a frame from the previous configuration and report "no recent frame: check connection" The second is a regression risk rather than hygiene: it was added by 77d353c ("RSDK-11302 bug fix reconfigure causes no recent frame error") precisely to stop that error, so deleting reconfigure without moving it would reopen that bug. The erase runs after stopDevice so the pipeline is already stopped and no further frames can land. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two more interface changes surfaced once the reconfigurable.hpp fatal include error stopped masking them. get_image is gone from the Camera interface, and CameraServer no longer serves a GetImage RPC at all -- its handlers are DoCommand, GetImages, GetPointCloud, GetGeometries, GetProperties and GetStatus. Nothing could reach our implementation any more and nothing called it internally, so remove it rather than keep it as an unreachable method. get_images already covers the color stream and has since #45. get_status is a new pure virtual on both Camera and Discovery, which is what made Orbbec and OrbbecDiscovery abstract: error: invalid new-expression of abstract class type 'orbbec::Orbbec' error: invalid new-expression of abstract class type 'discovery::OrbbecDiscovery' The SDK prescribes no schema -- its own mocks return an arbitrary struct -- so Orbbec reports the identifying state it already tracks: serial number, detected model, firmware version, and whether the pipeline is streaming. OrbbecDiscovery has no state of its own and returns an empty struct rather than enumerating the bus on every status poll. Also corrects a log label in get_point_cloud that read "[get_image]", which now names a function that no longer exists. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
viam-cpp-sdk removed Camera::get_image and its CameraServer no longer serves a GetImage RPC, so DecodeImageFromCamera has nothing to reach on this module. Ask Images() for just the color source instead, which keeps the test's intent -- retrieve one image and check it is the colour stream -- and additionally covers filter_source_names, which nothing exercised before. Source names are "color" and "depth", as documented in the README. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Nicolas Palpacuer (NickPPC)
force-pushed
the
migrate/remove-reconfigurable
branch
from
July 29, 2026 15:30
2874ab8 to
629de8a
Compare
Nicolas Palpacuer (NickPPC)
requested review from
a team and
Vijay Vuyyuru (vijayvuyyuru)
July 29, 2026 15:37
Vijay Vuyyuru (vijayvuyyuru)
approved these changes
Jul 29, 2026
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.
Summary
Supersedes #77. That PR bumps
viam-cpp-sdk0.20.1 -> 0.38.1 but does not build, because the SDK removedviam::sdk::Reconfigurablein v0.35.0 (viamrobotics/viam-cpp-sdk#630):This branches off #77's commit and adds the migration on top, so it carries the bump and actually compiles. I opened it against
mainrather than pushing ontochore/upgrade-viam-depsbecause that branch belongs to theviam-overwatchbot and would likely be force-updated out from under the work.Changes
public viam::sdk::Reconfigurableand thereconfiguredeclaration; drop the include; document why the constructor/destructor now carry the load.Orbbec::reconfiguredefinition; move two cleanups into~Orbbec().Why deleting reconfigure is safe
Reconfigurable's own deprecation notice states the new contract:Nothing can call our
reconfigureany more —reconfigureappears in zero files in v0.38.1.The rebuild ordering is destroy-then-construct, so our destructor runs before the replacement constructor.
ModuleService::ReconfigureResource->ResourceManager::replace_one:with a deliberate scope above it dropping the
shared_ptrrefcount so the destructor really does run first. That matters for us becausestopDevicekeys off the serial number and stops a pipeline shared via process-global maps — construct-first ordering would have had the dying instance stop the new instance's pipeline.The constructor already redoes everything
reconfiguredid:configure,configureDevice,startDevice, and theserial_by_resourcemapping.stopDevicedeliberately leaves thedevices_by_serialentry in place (stopped, not erased), so the constructor still finds the device.The part that isn't mechanical
Two cleanups existed only in
reconfigure, so deleting it drops them silently. Both moved into~Orbbec():config_by_serial().erase(...)serial_numberattribute changesframe_set_by_serial().erase(...)The second is a regression risk, not hygiene. It was added by
77d353c— "RSDK-11302 bug fix reconfigure causes no recent frame error" — specifically to prevent that error. Left out, a stale frameset surviving the rebuild trips the 1-second staleness guard:which is exactly the reported bug. The window is short (~33ms at 30fps) and the guard rejects rather than serves the stale frame, so it is a misleading error rather than bad data — but it would have quietly reopened a fixed ticket. The erase runs after
stopDevice, so the pipeline is already stopped and no further frames can land after it.Testing
src/verified present in v0.38.1 — no further missing-header breaks behind the one that was masking everything.Reconfigurable/reconfigureremain insrc/.ColumnLimit.fatal erroron a missing include stops the translation unit, so API changes across 18 releases may still be hiding behind it; I would not be surprised by a second round.For reviewers
tests/astra2_test.gohas a"Reconfigure camera"subtest callingBuiltInReconfigure. I left it alone: it alreadyt.Skips when the interface is absent andcontinues on error, and it is hardware-in-the-loop so I could not run it. Worth deciding whether it should now assert the rebuild path or be dropped.chore/upgrade-viam-depsso chore(deps): bump Viam SDKs #77 stays the merge vehicle. I avoided that only because of the bot force-push risk.conanfile.pydefinesvalidate()twice, identically.Claude Code Prompts Used
🤖 Generated with Claude Code