Viam C++ SDK current
Loading...
Searching...
No Matches
navigation_client.hpp
1
4#pragma once
5
6#include <viam/api/service/navigation/v1/navigation.grpc.pb.h>
7
8#include <viam/sdk/rpc/dial.hpp>
10
11namespace viam {
12namespace sdk {
13namespace impl {
14
19 public:
21 NavigationClient(std::string name, const ViamChannel& channel);
22
23 const ViamChannel& channel() const {
24 return *channel_;
25 }
26
27 Mode get_mode(const ProtoStruct& extra) override;
28 void set_mode(const Mode mode, const ProtoStruct& extra) override;
29 LocationResponse get_location(const ProtoStruct& extra) override;
30 std::vector<Waypoint> get_waypoints(const ProtoStruct& extra) override;
31 void add_waypoint(const geo_point& location, const ProtoStruct& extra) override;
32 void remove_waypoint(const std::string id, const ProtoStruct& extra) override;
33 std::vector<geo_geometry> get_obstacles(const ProtoStruct& extra) override;
34 std::vector<Path> get_paths(const ProtoStruct& extra) override;
36 ProtoStruct do_command(const ProtoStruct& command) override;
37
38 private:
39 using StubType = service::navigation::v1::NavigationService::StubInterface;
40 std::unique_ptr<StubType> stub_;
41 const ViamChannel* channel_;
42};
43
44} // namespace impl
45} // namespace sdk
46} // namespace viam
Definition navigation.hpp:16
Mode
Enum affecting how this nav service's goal is specified.
Definition navigation.hpp:21
virtual std::string name() const
Return the resource's name.
Definition dial.hpp:25
gRPC client implementation of a Navigation service.
Definition navigation_client.hpp:18
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 of the component configured with this nav service.
Definition navigation.hpp:40
A set of attributes for this nav service.
Definition navigation.hpp:52
Definition geometry.hpp:79