What's Changed
- RSDK-3589 audit nav service docstrings by @raybjork in #334
- RSDK-6574: Fix use of
time_point
by @lia-viam in #335 - RSDK-9337: Introduce proto API bridge and insulate various geometry and math types from API by @lia-viam in #332
- RSDK-9466 - Remove robot status endpoint from SDK by @cheukt in #338
- Version bump by @lia-viam in #340
New proto API bridge approach
As part of an ongoing project to insulate google protobuf and the Viam API from the ABI and public API of the Viam SDK, we have introduced a new approach for writing and using to_proto
and from_proto
conversions. See https://github.com/viamrobotics/viam-cpp-sdk/blob/main/src/viam/sdk/common/pose.hpp for a worked example.
You have to
- include
viam/sdk/common/proto_convert.hpp
- forward declare the relevant API types
- specialize the
struct
callablesproto_convert_details::to_proto
andproto_convert_details::from_proto
to implement API to SDK interchange.
Note that the detail structs
only refer to API types by pointer to a forward-declared class, so there is no ABI dependency on the Viam API types.
The proto_convert.hpp
header also provides the callables viam::sdk::v2::to_proto
, which returns an API type by value, and viam::sdk::v2::from_proto
which takes an API type by reference to const
. In practice if you need an escape hatch to work with API types directly, you should include the relevant viam/api/...
headers and use the to_proto
and from_proto
callables rather than the struct
templates. The v2
namespace will be removed when this migration is complete and none of the old conversion functions remain.
Full Changelog: releases/v0.0.17...releases/v0.0.18