Viam C++ SDK current
|
Classes | |
struct | LocationResponse |
Location and direction of the component configured with this nav service. More... | |
struct | Path |
A user-provided destination and a set of geopoints to get there. More... | |
struct | Properties |
A set of attributes for this nav service. More... | |
struct | Waypoint |
A location with an id handle that can be used to uniquely identify and remove it. More... | |
Public Types | |
enum class | Mode : uint8_t { k_unspecified , k_manual , k_waypoint , k_explore } |
Enum affecting how this nav service's goal is specified. | |
enum class | MapType : uint8_t { k_unspecified , k_none , k_gps } |
Enum affecting the format of the map used with this nav service. | |
Public Member Functions | |
API | api () const override |
Returns the API associated with a particular resource. | |
virtual Mode | get_mode (const ProtoStruct &extra)=0 |
Get the current mode. | |
virtual void | set_mode (const Mode mode, const ProtoStruct &extra)=0 |
Set the current mode. | |
virtual LocationResponse | get_location (const ProtoStruct &extra)=0 |
Get the current location. | |
virtual std::vector< Waypoint > | get_waypoints (const ProtoStruct &extra)=0 |
Get the waypoints this nav service knows about. | |
virtual void | add_waypoint (const geo_point &location, const ProtoStruct &extra)=0 |
Add a waypoint. | |
virtual void | remove_waypoint (const std::string id, const ProtoStruct &extra)=0 |
Remove a waypoint by ID. | |
virtual std::vector< geo_geometry > | get_obstacles (const ProtoStruct &extra)=0 |
Get the obstacles this nav service knows about. | |
virtual std::vector< Path > | get_paths (const ProtoStruct &extra)=0 |
Get the paths this nav service knows about. | |
virtual Properties | get_properties ()=0 |
Get this nav service's properties. | |
virtual ProtoStruct | do_command (const ProtoStruct &command)=0 |
Do an arbitrary command. | |
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. | |
void | set_log_level (log_level) const |
Set the log level for log messages originating from this Resource. | |
Protected Member Functions | |
Navigation (std::string name) | |
![]() | |
Service (std::string name) | |
![]() | |
Name | get_resource_name (const std::string &type) const |
Additional Inherited Members | |
![]() | |
LogSource | logger_ |
|
pure virtual |
Add a waypoint.
location | Coordinate of the new waypoint. |
Implemented in viam::sdk::impl::NavigationClient.
|
overridevirtual |
Returns the API
associated with a particular resource.
Implements viam::sdk::Resource.
|
pure virtual |
Do an arbitrary command.
command | Freeform fields that are service-specific. |
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Get the current location.
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Get the current mode.
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Get the obstacles this nav service knows about.
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Get the paths this nav service knows about.
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Get this nav service's properties.
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Get the waypoints this nav service knows about.
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Remove a waypoint by ID.
id | The string ID of the waypoint to remove. |
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::NavigationClient.
|
pure virtual |
Set the current mode.
mode | Desired mode. |
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::NavigationClient.