88#include < viam/api/service/navigation/v1/navigation.pb.h>
99
1010#include < viam/sdk/common/client_helper.hpp>
11- #include < viam/sdk/common/proto_convert_vector .hpp>
11+ #include < viam/sdk/common/private/repeated_ptr_convert .hpp>
1212#include < viam/sdk/common/proto_value.hpp>
1313#include < viam/sdk/common/utils.hpp>
1414#include < viam/sdk/services/navigation.hpp>
@@ -21,7 +21,7 @@ namespace proto_convert_details {
2121template <>
2222struct from_proto <service::navigation::v1::Path> {
2323 Navigation::Path operator ()(const service::navigation::v1::Path* proto) const {
24- return {proto->destination_waypoint_id (), v2::from_proto (proto->geopoints ())};
24+ return {proto->destination_waypoint_id (), impl::from_repeated_field (proto->geopoints ())};
2525 }
2626};
2727
@@ -72,7 +72,7 @@ Navigation::LocationResponse NavigationClient::get_location(const ProtoStruct& e
7272std::vector<Navigation::Waypoint> NavigationClient::get_waypoints (const ProtoStruct& extra) {
7373 return make_client_helper (this , *stub_, &StubType::GetWaypoints)
7474 .with ([&](auto & request) { *request.mutable_extra () = v2::to_proto (extra); })
75- .invoke ([](auto & response) { return v2::from_proto (response.waypoints ()); });
75+ .invoke ([](auto & response) { return impl::from_repeated_field (response.waypoints ()); });
7676}
7777
7878void NavigationClient::add_waypoint (const geo_point& location, const ProtoStruct& extra) {
@@ -96,13 +96,13 @@ void NavigationClient::remove_waypoint(const std::string id, const ProtoStruct&
9696std::vector<geo_geometry> NavigationClient::get_obstacles (const ProtoStruct& extra) {
9797 return make_client_helper (this , *stub_, &StubType::GetObstacles)
9898 .with ([&](auto & request) { *request.mutable_extra () = v2::to_proto (extra); })
99- .invoke ([](auto & response) { return v2::from_proto (response.obstacles ()); });
99+ .invoke ([](auto & response) { return impl::from_repeated_field (response.obstacles ()); });
100100}
101101
102102std::vector<NavigationClient::Path> NavigationClient::get_paths (const ProtoStruct& extra) {
103103 return make_client_helper (this , *stub_, &StubType::GetPaths)
104104 .with ([&](auto & request) { *request.mutable_extra () = v2::to_proto (extra); })
105- .invoke ([](auto & response) { return v2::from_proto (response.paths ()); });
105+ .invoke ([](auto & response) { return impl::from_repeated_field (response.paths ()); });
106106}
107107
108108NavigationClient::Properties NavigationClient::get_properties () {
0 commit comments