Viam C++ SDK current
|
gRPC client implementation of a Motion
service.
More...
#include <motion_client.hpp>
Public Types | |
using | interface_type = Motion |
Public Types inherited from viam::sdk::Motion | |
enum class | plan_state : uint8_t { k_in_progress , k_stopped , k_succeeded , k_failed } |
Describes the possible states a plan can be in. | |
Public Member Functions | |
MotionClient (std::string name, std::shared_ptr< grpc::Channel > channel) | |
bool | move (const pose_in_frame &destination, const Name &component_name, const std::shared_ptr< WorldState > &world_state, const std::shared_ptr< constraints > &constraints, const ProtoStruct &extra) override |
Moves any compononent on the robot to a specified destination. | |
std::string | move_on_map (const pose &destination, const Name &component_name, const Name &slam_name, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< GeometryConfig > &obstacles, const ProtoStruct &extra) override |
Moves any component on the robot to a specific destination on a SLAM map. | |
std::string | move_on_globe (const geo_point &destination, const boost::optional< double > &heading, const Name &component_name, const Name &movement_sensor_name, const std::vector< geo_geometry > &obstacles, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< geo_geometry > &bounding_regions, const ProtoStruct &extra) override |
Moves any component on the robot to a specific destination on a globe. | |
pose_in_frame | get_pose (const Name &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms, const ProtoStruct &extra) override |
Get the pose of any component on the robot. | |
void | stop_plan (const Name &component_name, const ProtoStruct &extra) override |
Stop a currently executing motion plan. | |
Motion::plan_with_status | get_latest_plan (const Name &component_name, const ProtoStruct &extra) override |
Returns the plan and state history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::pair< Motion::plan_with_status, std::vector< Motion::plan_with_status > > | get_latest_plan_with_replan_history (const Name &component_name, const ProtoStruct &extra) override |
Returns the plan, state history, and replan history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
Motion::plan_with_status | get_plan (const Name &component_name, const std::string &execution_id, const ProtoStruct &extra) override |
Returns the plan and state history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::pair< Motion::plan_with_status, std::vector< Motion::plan_with_status > > | get_plan_with_replan_history (const Name &component_name, const std::string &execution_id, const ProtoStruct &extra) override |
Returns the plan, state history, and replan history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::vector< Motion::plan_status_with_id > | list_active_plan_statuses (const ProtoStruct &extra) override |
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an executing that changed its state within the last 24 hours. | |
std::vector< Motion::plan_status_with_id > | list_plan_statuses (const ProtoStruct &extra) override |
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an execution that changed its state within the last 24 hours. | |
ProtoStruct | do_command (const ProtoStruct &command) override |
Send/receive arbitrary commands to the resource. | |
plan_with_status | get_latest_plan (const Name &component_name) |
Returns the plan and state history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
virtual plan_with_status | get_latest_plan (const Name &component_name, const ProtoStruct &extra)=0 |
Returns the plan and state history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::pair< plan_with_status, std::vector< plan_with_status > > | get_latest_plan_with_replan_history (Name component_name) |
Returns the plan, state history, and replan history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
virtual std::pair< plan_with_status, std::vector< plan_with_status > > | get_latest_plan_with_replan_history (const Name &component_name, const ProtoStruct &extra)=0 |
Returns the plan, state history, and replan history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
plan_with_status | get_plan (const Name &component_name, const std::string &execution_id) |
Returns the plan and state history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
virtual plan_with_status | get_plan (const Name &component_name, const std::string &execution_id, const ProtoStruct &extra)=0 |
Returns the plan and state history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::pair< plan_with_status, std::vector< plan_with_status > > | get_plan_with_replan_history (const Name &component_name, const std::string &execution_id) |
Returns the plan, state history, and replan history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
virtual std::pair< plan_with_status, std::vector< plan_with_status > > | get_plan_with_replan_history (const Name &component_name, const std::string &execution_id, const ProtoStruct &extra)=0 |
Returns the plan, state history, and replan history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
pose_in_frame | get_pose (const Name &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms) |
Get the pose of any component on the robot. | |
virtual pose_in_frame | get_pose (const Name &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms, const ProtoStruct &extra)=0 |
Get the pose of any component on the robot. | |
std::vector< plan_status_with_id > | list_active_plan_statuses () |
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an execution that changed its state within the last 24 hours. | |
virtual std::vector< plan_status_with_id > | list_active_plan_statuses (const ProtoStruct &extra)=0 |
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an executing that changed its state within the last 24 hours. | |
std::vector< plan_status_with_id > | list_plan_statuses () |
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an executing that changed its state within the last 24 hours. | |
virtual std::vector< plan_status_with_id > | list_plan_statuses (const ProtoStruct &extra)=0 |
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an execution that changed its state within the last 24 hours. | |
bool | move (const pose_in_frame &destination, const Name &name, const std::shared_ptr< WorldState > &world_state, const std::shared_ptr< constraints > &constraints) |
Moves any compononent on the robot to a specified destination. | |
virtual bool | move (const pose_in_frame &destination, const Name &name, const std::shared_ptr< WorldState > &world_state, const std::shared_ptr< constraints > &constraints, const ProtoStruct &extra)=0 |
Moves any compononent on the robot to a specified destination. | |
std::string | move_on_globe (const geo_point &destination, const boost::optional< double > &heading, const Name &component_name, const Name &movement_sensor_name, const std::vector< geo_geometry > &obstacles, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< geo_geometry > &bounding_regions) |
Moves any component on the robot to a specific destination on a globe. | |
virtual std::string | move_on_globe (const geo_point &destination, const boost::optional< double > &heading, const Name &component_name, const Name &movement_sensor_name, const std::vector< geo_geometry > &obstacles, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< geo_geometry > &bounding_regions, const ProtoStruct &extra)=0 |
Moves any component on the robot to a specific destination on a globe. | |
std::string | move_on_map (const pose &destination, const Name &component_name, const Name &slam_name, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< GeometryConfig > &obstacles) |
Moves any component on the robot to a specific destination on a SLAM map. | |
virtual std::string | move_on_map (const pose &destination, const Name &component_name, const Name &slam_name, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< GeometryConfig > &obstacles, const ProtoStruct &extra)=0 |
Moves any component on the robot to a specific destination on a SLAM map. | |
void | stop_plan (const Name &component_name) |
Stop a currently executing motion plan. | |
virtual void | stop_plan (const Name &component_name, const ProtoStruct &extra)=0 |
Stop a currently executing motion plan. | |
Public Member Functions inherited from viam::sdk::Motion | |
API | api () const override |
Returns the API associated with a particular resource. | |
bool | move (const pose_in_frame &destination, const Name &name, const std::shared_ptr< WorldState > &world_state, const std::shared_ptr< constraints > &constraints) |
Moves any compononent on the robot to a specified destination. | |
std::string | move_on_map (const pose &destination, const Name &component_name, const Name &slam_name, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< GeometryConfig > &obstacles) |
Moves any component on the robot to a specific destination on a SLAM map. | |
std::string | move_on_globe (const geo_point &destination, const boost::optional< double > &heading, const Name &component_name, const Name &movement_sensor_name, const std::vector< geo_geometry > &obstacles, const std::shared_ptr< motion_configuration > &motion_configuration, const std::vector< geo_geometry > &bounding_regions) |
Moves any component on the robot to a specific destination on a globe. | |
pose_in_frame | get_pose (const Name &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms) |
Get the pose of any component on the robot. | |
void | stop_plan (const Name &component_name) |
Stop a currently executing motion plan. | |
plan_with_status | get_latest_plan (const Name &component_name) |
Returns the plan and state history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::pair< plan_with_status, std::vector< plan_with_status > > | get_latest_plan_with_replan_history (Name component_name) |
Returns the plan, state history, and replan history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
plan_with_status | get_plan (const Name &component_name, const std::string &execution_id) |
Returns the plan and state history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::pair< plan_with_status, std::vector< plan_with_status > > | get_plan_with_replan_history (const Name &component_name, const std::string &execution_id) |
Returns the plan, state history, and replan history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization. | |
std::vector< plan_status_with_id > | list_plan_statuses () |
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an executing that changed its state within the last 24 hours. | |
std::vector< plan_status_with_id > | list_active_plan_statuses () |
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an execution that changed its state within the last 24 hours. | |
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::Motion | |
Motion (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 |
gRPC client implementation of a Motion
service.
|
overridevirtual |
Send/receive arbitrary commands to the resource.
Command | the command to execute. |
Implements viam::sdk::Motion.
|
inline |
Returns the plan and state history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
|
overridevirtual |
Returns the plan and state history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Returns the plan and state history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
overridevirtual |
Returns the plan, state history, and replan history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Returns the plan, state history, and replan history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Returns the plan, state history, and replan history of the most recent execution to move a component. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
|
inline |
Returns the plan and state history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
execution_id | The execution id of the requested plan. |
|
overridevirtual |
Returns the plan and state history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
execution_id | The execution id of the requested plan. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Returns the plan and state history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
execution_id | The execution id of the requested plan. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Returns the plan, state history, and replan history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
execution_id | The execution id of the requested plan. |
|
overridevirtual |
Returns the plan, state history, and replan history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
execution_id | The execution id of the requested plan. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Returns the plan, state history, and replan history of the requested plan. Returns a result if the last execution is still executing, or changed state within the last 24 hours without an intervening robot reinitialization.
component_name | The name of the component which the MoveOnGlobe request asked to move. |
execution_id | The execution id of the requested plan. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Get the pose of any component on the robot.
component_name | The component whose pose is being requested. |
destination_frame | The reference frame in which the component's pose should be provided. |
supplemental_transforms | Pose information on any additional reference frames that are needed to compute the component's pose. |
|
overridevirtual |
Get the pose of any component on the robot.
component_name | The component whose pose is being requested. |
destination_frame | The reference frame in which the component's pose should be provided. |
supplemental_transforms | Pose information on any additional reference frames that are needed to compute the component's pose. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Get the pose of any component on the robot.
component_name | The component whose pose is being requested. |
destination_frame | The reference frame in which the component's pose should be provided. |
supplemental_transforms | Pose information on any additional reference frames that are needed to compute the component's pose. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an execution that changed its state within the last 24 hours.
|
overridevirtual |
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an executing that changed its state within the last 24 hours.
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an executing that changed its state within the last 24 hours.
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an executing that changed its state within the last 24 hours.
|
overridevirtual |
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an execution that changed its state within the last 24 hours.
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are executing, or are part of an execution that changed its state within the last 24 hours.
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
overridevirtual |
Moves any compononent on the robot to a specified destination.
destination | Where to move the component to. |
name | Name of the component to be moved. |
world_state | Obstacles to avoid and transforms to add to the robot for the duration of the move. |
constraints | Constraints to apply to how the robot will move. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Moves any compononent on the robot to a specified destination.
destination | Where to move the component to. |
name | Name of the component to be moved. |
world_state | Obstacles to avoid and transforms to add to the robot for the duration of the move. |
constraints | Constraints to apply to how the robot will move. |
|
virtual |
Moves any compononent on the robot to a specified destination.
destination | Where to move the component to. |
name | Name of the component to be moved. |
world_state | Obstacles to avoid and transforms to add to the robot for the duration of the move. |
constraints | Constraints to apply to how the robot will move. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Moves any component on the robot to a specific destination on a globe.
destination | The destination to move to. |
heading | Optional compass heading to achieve at the destination in degrees [0-360). |
component_name | The name of the component to move. |
movement_sensor_name | The name of the movement sensor used to check robot location. |
obstacles | Obstacles to be considered for motion planning. |
motion_configuration | Optional set of motion configuration options. |
bounding_regions | Set of obstacles which the robot must remain within while navigating. |
|
overridevirtual |
Moves any component on the robot to a specific destination on a globe.
destination | The destination to move to. |
heading | Optional compass heading to achieve at the destination in degrees [0-360). |
component_name | The name of the component to move. |
movement_sensor_name | The name of the movement sensor used to check robot location. |
obstacles | Obstacles to be considered for motion planning. |
motion_configuration | Optional set of motion configuration options. |
bounding_regions | Set of obstacles which the robot must remain within while navigating. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Moves any component on the robot to a specific destination on a globe.
destination | The destination to move to. |
heading | Optional compass heading to achieve at the destination in degrees [0-360). |
component_name | The name of the component to move. |
movement_sensor_name | The name of the movement sensor used to check robot location. |
obstacles | Obstacles to be considered for motion planning. |
motion_configuration | Optional set of motion configuration options. |
bounding_regions | Set of obstacles which the robot must remain within while navigating. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Moves any component on the robot to a specific destination on a SLAM map.
destination | The destination to move to. |
component_name | The component to move. |
slam_name | The name of the slam service from which the SLAM map is requested. |
motion_configuration | Optional set of motion configuration options. |
|
overridevirtual |
Moves any component on the robot to a specific destination on a SLAM map.
destination | The destination to move to. |
component_name | The component to move. |
slam_name | The name of the slam service from which the SLAM map is requested. |
motion_configuration | Optional set of motion configuration options. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Moves any component on the robot to a specific destination on a SLAM map.
destination | The destination to move to. |
component_name | The component to move. |
slam_name | The name of the slam service from which the SLAM map is requested. |
motion_configuration | Optional set of motion configuration options. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
inline |
Stop a currently executing motion plan.
component_name | the component of the currently executing plan to stop. |
|
overridevirtual |
Stop a currently executing motion plan.
component_name | the component of the currently executing plan to stop. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.
|
virtual |
Stop a currently executing motion plan.
component_name | the component of the currently executing plan to stop. |
extra | Any additional arguments to the method. |
Implements viam::sdk::Motion.