gRPC client implementation of a Navigation
service.
More...
#include <navigation_client.hpp>
|
using | interface_type = 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.
|
|
|
| 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< Waypoint > | get_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_geometry > | get_obstacles (const ProtoStruct &extra) override |
| Get the obstacles this nav service knows about.
|
|
std::vector< Path > | get_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.
|
|
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< Waypoint > | get_waypoints () |
|
void | add_waypoint (const geo_point &location) |
|
void | remove_waypoint (const std::string id) |
|
std::vector< geo_geometry > | get_obstacles () |
|
std::vector< Path > | get_paths () |
|
Name | get_resource_name () const override |
| Returns the Name for a particular resource.
|
|
| Resource (std::string name) |
|
virtual std::string | name () const |
| Return the resource's name.
|
|
|
| Navigation (std::string name) |
|
| Service (std::string name) |
|
Name | get_resource_name (const std::string &type) const |
|
gRPC client implementation of a Navigation
service.
◆ add_waypoint()
void viam::sdk::impl::NavigationClient::add_waypoint |
( |
const geo_point & | location, |
|
|
const ProtoStruct & | extra ) |
|
overridevirtual |
◆ do_command()
ProtoStruct viam::sdk::impl::NavigationClient::do_command |
( |
const ProtoStruct & | command | ) |
|
|
overridevirtual |
Do an arbitrary command.
- Parameters
-
command | Freeform 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
-
extra | Any 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
-
extra | Any 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
-
extra | Any 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
-
extra | Any additional arguments to the method. |
- Returns
- List of paths.
Implements viam::sdk::Navigation.
◆ get_properties()
Properties viam::sdk::impl::NavigationClient::get_properties |
( |
| ) |
|
|
overridevirtual |
◆ get_waypoints()
std::vector< Waypoint > viam::sdk::impl::NavigationClient::get_waypoints |
( |
const ProtoStruct & | extra | ) |
|
|
overridevirtual |
Get the waypoints this nav service knows about.
- Parameters
-
extra | Any 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
-
id | The string ID of the waypoint to remove. |
extra | Any 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
-
mode | Desired mode. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Navigation.
The documentation for this class was generated from the following file: