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

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

#include <motion_client.hpp>

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

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_idlist_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_idlist_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_idlist_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_idlist_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_idlist_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_idlist_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_idlist_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_idlist_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
 

Detailed Description

gRPC client implementation of a Motion service.

Member Function Documentation

◆ do_command()

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

Send/receive arbitrary commands to the resource.

Parameters
Commandthe command to execute.
Returns
The result of the executed command.

Implements viam::sdk::Motion.

◆ get_latest_plan() [1/3]

plan_with_status viam::sdk::Motion::get_latest_plan ( const Name & component_name)
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
Returns
the plan and status of the most recent execution to move the requested component

◆ get_latest_plan() [2/3]

Motion::plan_with_status viam::sdk::impl::MotionClient::get_latest_plan ( const Name & component_name,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
extraAny additional arguments to the method.
Returns
the plan and status of the most recent execution to move the requested component

Implements viam::sdk::Motion.

◆ get_latest_plan() [3/3]

virtual plan_with_status viam::sdk::Motion::get_latest_plan ( const Name & component_name,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
extraAny additional arguments to the method.
Returns
the plan and status of the most recent execution to move the requested component

Implements viam::sdk::Motion.

◆ get_latest_plan_with_replan_history() [1/3]

std::pair< Motion::plan_with_status, std::vector< Motion::plan_with_status > > viam::sdk::impl::MotionClient::get_latest_plan_with_replan_history ( const Name & component_name,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
extraAny additional arguments to the method.
Returns
a pair of (1) the plan and status and (2) the replan history of the most recent execution to move the requested component

Implements viam::sdk::Motion.

◆ get_latest_plan_with_replan_history() [2/3]

virtual std::pair< plan_with_status, std::vector< plan_with_status > > viam::sdk::Motion::get_latest_plan_with_replan_history ( const Name & component_name,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
extraAny additional arguments to the method.
Returns
a pair of (1) the plan and status and (2) the replan history of the most recent execution to move the requested component

Implements viam::sdk::Motion.

◆ get_latest_plan_with_replan_history() [3/3]

std::pair< plan_with_status, std::vector< plan_with_status > > viam::sdk::Motion::get_latest_plan_with_replan_history ( Name component_name)
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
Returns
a pair of (1) the plan and status and (2) the replan history of the most recent execution to move the requested component

◆ get_plan() [1/3]

plan_with_status viam::sdk::Motion::get_plan ( const Name & component_name,
const std::string & execution_id )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
execution_idThe execution id of the requested plan.
Returns
the plan and status of the requested execution's move the requested component

◆ get_plan() [2/3]

Motion::plan_with_status viam::sdk::impl::MotionClient::get_plan ( const Name & component_name,
const std::string & execution_id,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
execution_idThe execution id of the requested plan.
extraAny additional arguments to the method.
Returns
the plan and status of the requested execution's move the requested component

Implements viam::sdk::Motion.

◆ get_plan() [3/3]

virtual plan_with_status viam::sdk::Motion::get_plan ( const Name & component_name,
const std::string & execution_id,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
execution_idThe execution id of the requested plan.
extraAny additional arguments to the method.
Returns
the plan and status of the requested execution's move the requested component

Implements viam::sdk::Motion.

◆ get_plan_with_replan_history() [1/3]

std::pair< plan_with_status, std::vector< plan_with_status > > viam::sdk::Motion::get_plan_with_replan_history ( const Name & component_name,
const std::string & execution_id )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
execution_idThe execution id of the requested plan.
Returns
a pair of (1) the plan and status and (2) the replan history of the most recent execution to move the requested component

◆ get_plan_with_replan_history() [2/3]

std::pair< Motion::plan_with_status, std::vector< Motion::plan_with_status > > viam::sdk::impl::MotionClient::get_plan_with_replan_history ( const Name & component_name,
const std::string & execution_id,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
execution_idThe execution id of the requested plan.
extraAny additional arguments to the method.
Returns
a pair of (1) the plan and status and (2) the replan history of the most recent execution to move the requested component

Implements viam::sdk::Motion.

◆ get_plan_with_replan_history() [3/3]

virtual std::pair< plan_with_status, std::vector< plan_with_status > > viam::sdk::Motion::get_plan_with_replan_history ( const Name & component_name,
const std::string & execution_id,
const ProtoStruct & extra )
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.

Parameters
component_nameThe name of the component which the MoveOnGlobe request asked to move.
execution_idThe execution id of the requested plan.
extraAny additional arguments to the method.
Returns
a pair of (1) the plan and status and (2) the replan history of the most recent execution to move the requested component

Implements viam::sdk::Motion.

◆ get_pose() [1/3]

pose_in_frame viam::sdk::Motion::get_pose ( const Name & component_name,
const std::string & destination_frame,
const std::vector< WorldState::transform > & supplemental_transforms )
inline

Get the pose of any component on the robot.

Parameters
component_nameThe component whose pose is being requested.
destination_frameThe reference frame in which the component's pose should be provided.
supplemental_transformsPose information on any additional reference frames that are needed to compute the component's pose.
Returns
The pose of the component.

◆ get_pose() [2/3]

pose_in_frame viam::sdk::impl::MotionClient::get_pose ( const Name & component_name,
const std::string & destination_frame,
const std::vector< WorldState::transform > & supplemental_transforms,
const ProtoStruct & extra )
overridevirtual

Get the pose of any component on the robot.

Parameters
component_nameThe component whose pose is being requested.
destination_frameThe reference frame in which the component's pose should be provided.
supplemental_transformsPose information on any additional reference frames that are needed to compute the component's pose.
extraAny additional arguments to the method.
Returns
The pose of the component.

Implements viam::sdk::Motion.

◆ get_pose() [3/3]

virtual pose_in_frame viam::sdk::Motion::get_pose ( const Name & component_name,
const std::string & destination_frame,
const std::vector< WorldState::transform > & supplemental_transforms,
const ProtoStruct & extra )
virtual

Get the pose of any component on the robot.

Parameters
component_nameThe component whose pose is being requested.
destination_frameThe reference frame in which the component's pose should be provided.
supplemental_transformsPose information on any additional reference frames that are needed to compute the component's pose.
extraAny additional arguments to the method.
Returns
The pose of the component.

Implements viam::sdk::Motion.

◆ list_active_plan_statuses() [1/3]

std::vector< plan_status_with_id > viam::sdk::Motion::list_active_plan_statuses ( )
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.

Returns
a vector of plan statuses.

◆ list_active_plan_statuses() [2/3]

std::vector< Motion::plan_status_with_id > viam::sdk::impl::MotionClient::list_active_plan_statuses ( const ProtoStruct & extra)
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.

Parameters
extraAny additional arguments to the method.
Returns
a vector of plan statuses.

Implements viam::sdk::Motion.

◆ list_active_plan_statuses() [3/3]

virtual std::vector< plan_status_with_id > viam::sdk::Motion::list_active_plan_statuses ( const ProtoStruct & extra)
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.

Parameters
extraAny additional arguments to the method.
Returns
a vector of plan statuses.

Implements viam::sdk::Motion.

◆ list_plan_statuses() [1/3]

std::vector< plan_status_with_id > viam::sdk::Motion::list_plan_statuses ( )
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.

Returns
a vector of plan statuses.

◆ list_plan_statuses() [2/3]

std::vector< Motion::plan_status_with_id > viam::sdk::impl::MotionClient::list_plan_statuses ( const ProtoStruct & extra)
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.

Parameters
extraAny additional arguments to the method.
Returns
a vector of plan statuses.

Implements viam::sdk::Motion.

◆ list_plan_statuses() [3/3]

virtual std::vector< plan_status_with_id > viam::sdk::Motion::list_plan_statuses ( const ProtoStruct & extra)
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.

Parameters
extraAny additional arguments to the method.
Returns
a vector of plan statuses.

Implements viam::sdk::Motion.

◆ move() [1/3]

bool viam::sdk::impl::MotionClient::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 )
overridevirtual

Moves any compononent on the robot to a specified destination.

Parameters
destinationWhere to move the component to.
nameName of the component to be moved.
world_stateObstacles to avoid and transforms to add to the robot for the duration of the move.
constraintsConstraints to apply to how the robot will move.
extraAny additional arguments to the method.
Returns
Whether or not the move was successful.

Implements viam::sdk::Motion.

◆ move() [2/3]

bool viam::sdk::Motion::move ( const pose_in_frame & destination,
const Name & name,
const std::shared_ptr< WorldState > & world_state,
const std::shared_ptr< constraints > & constraints )
inline

Moves any compononent on the robot to a specified destination.

Parameters
destinationWhere to move the component to.
nameName of the component to be moved.
world_stateObstacles to avoid and transforms to add to the robot for the duration of the move.
constraintsConstraints to apply to how the robot will move.
Returns
Whether or not the move was successful.

◆ move() [3/3]

virtual bool viam::sdk::Motion::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 )
virtual

Moves any compononent on the robot to a specified destination.

Parameters
destinationWhere to move the component to.
nameName of the component to be moved.
world_stateObstacles to avoid and transforms to add to the robot for the duration of the move.
constraintsConstraints to apply to how the robot will move.
extraAny additional arguments to the method.
Returns
Whether or not the move was successful.

Implements viam::sdk::Motion.

◆ move_on_globe() [1/3]

std::string viam::sdk::Motion::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 )
inline

Moves any component on the robot to a specific destination on a globe.

Parameters
destinationThe destination to move to.
headingOptional compass heading to achieve at the destination in degrees [0-360).
component_nameThe name of the component to move.
movement_sensor_nameThe name of the movement sensor used to check robot location.
obstaclesObstacles to be considered for motion planning.
motion_configurationOptional set of motion configuration options.
bounding_regionsSet of obstacles which the robot must remain within while navigating.
Returns
The execution ID of the move_on_globe request.

◆ move_on_globe() [2/3]

std::string viam::sdk::impl::MotionClient::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 )
overridevirtual

Moves any component on the robot to a specific destination on a globe.

Parameters
destinationThe destination to move to.
headingOptional compass heading to achieve at the destination in degrees [0-360).
component_nameThe name of the component to move.
movement_sensor_nameThe name of the movement sensor used to check robot location.
obstaclesObstacles to be considered for motion planning.
motion_configurationOptional set of motion configuration options.
bounding_regionsSet of obstacles which the robot must remain within while navigating.
extraAny additional arguments to the method.
Returns
The execution_id of the move_on_globe request.

Implements viam::sdk::Motion.

◆ move_on_globe() [3/3]

virtual std::string viam::sdk::Motion::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 )
virtual

Moves any component on the robot to a specific destination on a globe.

Parameters
destinationThe destination to move to.
headingOptional compass heading to achieve at the destination in degrees [0-360).
component_nameThe name of the component to move.
movement_sensor_nameThe name of the movement sensor used to check robot location.
obstaclesObstacles to be considered for motion planning.
motion_configurationOptional set of motion configuration options.
bounding_regionsSet of obstacles which the robot must remain within while navigating.
extraAny additional arguments to the method.
Returns
The execution_id of the move_on_globe request.

Implements viam::sdk::Motion.

◆ move_on_map() [1/3]

std::string viam::sdk::Motion::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 )
inline

Moves any component on the robot to a specific destination on a SLAM map.

Parameters
destinationThe destination to move to.
component_nameThe component to move.
slam_nameThe name of the slam service from which the SLAM map is requested.
motion_configurationOptional set of motion configuration options.
Returns
The execution ID of the move_on_map request.

◆ move_on_map() [2/3]

std::string viam::sdk::impl::MotionClient::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 )
overridevirtual

Moves any component on the robot to a specific destination on a SLAM map.

Parameters
destinationThe destination to move to.
component_nameThe component to move.
slam_nameThe name of the slam service from which the SLAM map is requested.
motion_configurationOptional set of motion configuration options.
extraAny additional arguments to the method.
Returns
The execution ID of the move_on_map request.

Implements viam::sdk::Motion.

◆ move_on_map() [3/3]

virtual std::string viam::sdk::Motion::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 )
virtual

Moves any component on the robot to a specific destination on a SLAM map.

Parameters
destinationThe destination to move to.
component_nameThe component to move.
slam_nameThe name of the slam service from which the SLAM map is requested.
motion_configurationOptional set of motion configuration options.
extraAny additional arguments to the method.
Returns
The execution ID of the move_on_map request.

Implements viam::sdk::Motion.

◆ stop_plan() [1/3]

void viam::sdk::Motion::stop_plan ( const Name & component_name)
inline

Stop a currently executing motion plan.

Parameters
component_namethe component of the currently executing plan to stop.

◆ stop_plan() [2/3]

void viam::sdk::impl::MotionClient::stop_plan ( const Name & component_name,
const ProtoStruct & extra )
overridevirtual

Stop a currently executing motion plan.

Parameters
component_namethe component of the currently executing plan to stop.
extraAny additional arguments to the method.

Implements viam::sdk::Motion.

◆ stop_plan() [3/3]

virtual void viam::sdk::Motion::stop_plan ( const Name & component_name,
const ProtoStruct & extra )
virtual

Stop a currently executing motion plan.

Parameters
component_namethe component of the currently executing plan to stop.
extraAny additional arguments to the method.

Implements viam::sdk::Motion.


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