Viam C++ SDK current
Loading...
Searching...
No Matches
navigation_client.hpp
1
4#pragma once
5
6#include <grpcpp/channel.h>
7
8#include <viam/api/service/navigation/v1/navigation.grpc.pb.h>
9
11
12namespace viam {
13namespace sdk {
14namespace impl {
15
20 public:
22 NavigationClient(std::string name, std::shared_ptr<grpc::Channel> channel);
23
24 Mode get_mode(const ProtoStruct& extra) override;
25 void set_mode(const Mode mode, const ProtoStruct& extra) override;
26 LocationResponse get_location(const ProtoStruct& extra) override;
27 std::vector<Waypoint> get_waypoints(const ProtoStruct& extra) override;
28 void add_waypoint(const geo_point& location, const ProtoStruct& extra) override;
29 void remove_waypoint(const std::string id, const ProtoStruct& extra) override;
30 std::vector<geo_geometry> get_obstacles(const ProtoStruct& extra) override;
31 std::vector<Path> get_paths(const ProtoStruct& extra) override;
33 ProtoStruct do_command(const ProtoStruct& command) override;
34
35 private:
36 using StubType = service::navigation::v1::NavigationService::StubInterface;
37 std::unique_ptr<StubType> stub_;
38 std::shared_ptr<grpc::Channel> channel_;
39};
40
41} // namespace impl
42} // namespace sdk
43} // namespace viam
Definition navigation.hpp:16
Mode
Enum affecting this nav service's goal.
Definition navigation.hpp:21
virtual std::string name() const
Return the resource's name.
gRPC client implementation of a Navigation service.
Definition navigation_client.hpp:19
LocationResponse get_location(const ProtoStruct &extra) override
Get the current location.
void remove_waypoint(const std::string id, const ProtoStruct &extra) override
Remove a waypoint by ID.
std::vector< geo_geometry > get_obstacles(const ProtoStruct &extra) override
Get the obstacles this nav service knows about.
Properties get_properties() override
Get this nav service's properties.
std::vector< Path > get_paths(const ProtoStruct &extra) override
Get the paths this nav service knows about.
Mode get_mode(const ProtoStruct &extra) override
Get the current mode.
void set_mode(const Mode mode, const ProtoStruct &extra) override
Set the current mode.
std::vector< Waypoint > get_waypoints(const ProtoStruct &extra) override
Get the waypoints this nav service knows about.
ProtoStruct do_command(const ProtoStruct &command) override
Do an arbitrary command.
void add_waypoint(const geo_point &location, const ProtoStruct &extra) override
Add a waypoint.
Defines a Navigation service.
Location and direction.
Definition navigation.hpp:40
A set of attributes for this nav service.
Definition navigation.hpp:52
Definition geometry.hpp:80