Viam C++ SDK current
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
viam::sdk::impl::NavigationClient Class Reference

gRPC client implementation of a Navigation service. More...

#include <navigation_client.hpp>

+ Inheritance diagram for viam::sdk::impl::NavigationClient:

Public Types

using interface_type = Navigation
 
- Public Types inherited from viam::sdk::Navigation
enum class  Mode : uint8_t { k_unspecified , k_manual , k_waypoint , k_explore }
 Enum affecting this nav service's goal.
 
enum class  MapType : uint8_t { k_unspecified , k_none , k_gps }
 Is the map navigating in GPS or a custom map.
 

Public Member Functions

 NavigationClient (std::string name, std::shared_ptr< grpc::Channel > channel)
 
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.
 
LocationResponse get_location (const ProtoStruct &extra) override
 Get the current location.
 
std::vector< Waypointget_waypoints (const ProtoStruct &extra) override
 Get the waypoints this nav service knows about.
 
void add_waypoint (const geo_point &location, const ProtoStruct &extra) override
 Add a waypoint.
 
void remove_waypoint (const std::string id, const ProtoStruct &extra) override
 Remove a waypoint by ID.
 
std::vector< geo_geometryget_obstacles (const ProtoStruct &extra) override
 Get the obstacles this nav service knows about.
 
std::vector< Pathget_paths (const ProtoStruct &extra) override
 Get the paths this nav service knows about.
 
Properties get_properties () override
 Get this nav service's properties.
 
ProtoStruct do_command (const ProtoStruct &command) override
 Do an arbitrary command.
 
- Public Member Functions inherited from viam::sdk::Navigation
API api () const override
 Returns the API associated with a particular resource.
 
Mode get_mode ()
 
void set_mode (const Mode mode)
 
LocationResponse get_location ()
 
std::vector< Waypointget_waypoints ()
 
void add_waypoint (const geo_point &location)
 
void remove_waypoint (const std::string id)
 
std::vector< geo_geometryget_obstacles ()
 
std::vector< Pathget_paths ()
 
- Public Member Functions inherited from viam::sdk::Service
Name get_resource_name () const override
 Returns the Name for a particular resource.
 
- Public Member Functions inherited from viam::sdk::Resource
 Resource (std::string name)
 
virtual std::string name () const
 Return the resource's name.
 

Additional Inherited Members

- Protected Member Functions inherited from viam::sdk::Navigation
 Navigation (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Service
 Service (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Resource
Name get_resource_name (const std::string &type) const
 

Detailed Description

gRPC client implementation of a Navigation service.

Member Function Documentation

◆ add_waypoint()

void viam::sdk::impl::NavigationClient::add_waypoint ( const geo_point & location,
const ProtoStruct & extra )
overridevirtual

Add a waypoint.

Parameters
locationCoordinate of the new waypoint.

Implements viam::sdk::Navigation.

◆ do_command()

ProtoStruct viam::sdk::impl::NavigationClient::do_command ( const ProtoStruct & command)
overridevirtual

Do an arbitrary command.

Parameters
commandFreeform fields that are service-specific.
Returns
Freeform result of the command.

Implements viam::sdk::Navigation.

◆ get_location()

LocationResponse viam::sdk::impl::NavigationClient::get_location ( const ProtoStruct & extra)
overridevirtual

Get the current location.

Parameters
extraAny additional arguments to the method.
Returns
Current location.

Implements viam::sdk::Navigation.

◆ get_mode()

Mode viam::sdk::impl::NavigationClient::get_mode ( const ProtoStruct & extra)
overridevirtual

Get the current mode.

Parameters
extraAny additional arguments to the method.
Returns
Current mode.

Implements viam::sdk::Navigation.

◆ get_obstacles()

std::vector< geo_geometry > viam::sdk::impl::NavigationClient::get_obstacles ( const ProtoStruct & extra)
overridevirtual

Get the obstacles this nav service knows about.

Parameters
extraAny additional arguments to the method.
Returns
List of shapes.

Implements viam::sdk::Navigation.

◆ get_paths()

std::vector< Path > viam::sdk::impl::NavigationClient::get_paths ( const ProtoStruct & extra)
overridevirtual

Get the paths this nav service knows about.

Parameters
extraAny additional arguments to the method.
Returns
List of paths.

Implements viam::sdk::Navigation.

◆ get_properties()

Properties viam::sdk::impl::NavigationClient::get_properties ( )
overridevirtual

Get this nav service's properties.

Returns
Properties.

Implements viam::sdk::Navigation.

◆ get_waypoints()

std::vector< Waypoint > viam::sdk::impl::NavigationClient::get_waypoints ( const ProtoStruct & extra)
overridevirtual

Get the waypoints this nav service knows about.

Parameters
extraAny additional arguments to the method.
Returns
List of waypoints.

Implements viam::sdk::Navigation.

◆ remove_waypoint()

void viam::sdk::impl::NavigationClient::remove_waypoint ( const std::string id,
const ProtoStruct & extra )
overridevirtual

Remove a waypoint by ID.

Parameters
idThe string ID of the waypoint to remove.
extraAny additional arguments to the method.

Implements viam::sdk::Navigation.

◆ set_mode()

void viam::sdk::impl::NavigationClient::set_mode ( const Mode mode,
const ProtoStruct & extra )
overridevirtual

Set the current mode.

Parameters
modeDesired mode.
extraAny additional arguments to the method.

Implements viam::sdk::Navigation.


The documentation for this class was generated from the following file: