6#include <grpcpp/channel.h> 
    8#include <viam/api/service/motion/v1/motion.grpc.pb.h> 
   10#include <viam/sdk/services/motion.hpp> 
   24              const std::string& component_name,
 
   25              const std::shared_ptr<WorldState>& world_state,
 
   27              const ProtoStruct& extra) 
override;
 
   30                            const std::string& component_name,
 
   31                            const std::string& slam_name,
 
   33                            const std::vector<GeometryConfig>& obstacles,
 
   34                            const ProtoStruct& extra) 
override;
 
   37                              const boost::optional<double>& heading,
 
   38                              const std::string& component_name,
 
   39                              const std::string& movement_sensor_name,
 
   40                              const std::vector<geo_geometry>& obstacles,
 
   42                              const std::vector<geo_geometry>& bounding_regions,
 
   43                              const ProtoStruct& extra) 
override;
 
   46                           const std::string& destination_frame,
 
   47                           const std::vector<WorldState::transform>& supplemental_transforms,
 
   48                           const ProtoStruct& extra) 
override;
 
   50    void stop_plan(
const std::string& component_name, 
const ProtoStruct& extra) 
override;
 
   53                                             const ProtoStruct& extra) 
override;
 
   55    std::pair<Motion::plan_with_status, std::vector<Motion::plan_with_status>>
 
   58                                        const ProtoStruct& extra) 
override;
 
   61                                      const std::string& execution_id,
 
   62                                      const ProtoStruct& extra) 
override;
 
   64    std::pair<Motion::plan_with_status, std::vector<Motion::plan_with_status>>
 
   66                                 const std::string& execution_id,
 
   67                                 const ProtoStruct& extra) 
override;
 
   70        const ProtoStruct& extra) 
override;
 
   74    ProtoStruct 
do_command(
const ProtoStruct& command) 
override;
 
   98    using StubType = service::motion::v1::MotionService::StubInterface;
 
   99    std::vector<Motion::plan_status_with_id> list_plan_statuses_(
bool only_active_plans,
 
  100                                                                 const ProtoStruct& extra);
 
  101    std::pair<Motion::plan_with_status, std::vector<Motion::plan_with_status>> get_plan_(
 
  102        const std::string& component_name,
 
  103        boost::optional<std::string> execution_id,
 
  105        const ProtoStruct& extra);
 
  106    std::unique_ptr<StubType> stub_;
 
  107    std::shared_ptr<grpc::Channel> channel_;
 
 
The Motion service coordinates motion planning across all components of a given robot....
Definition motion.hpp:69
std::pair< plan_with_status, std::vector< plan_with_status > > get_latest_plan_with_replan_history(const std::string &component_name)
Returns the plan, state history, and replan history of the most recent execution to move a component....
Definition motion.hpp:366
pose_in_frame get_pose(const std::string &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms)
Get the pose of any component on the robot.
Definition motion.hpp:309
void stop_plan(const std::string &component_name)
Stop a currently executing motion plan.
Definition motion.hpp:332
std::string move_on_globe(const geo_point &destination, const boost::optional< double > &heading, const std::string &component_name, const std::string &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.
Definition motion.hpp:263
std::pair< plan_with_status, std::vector< plan_with_status > > get_plan_with_replan_history(const std::string &component_name, const std::string &execution_id)
Returns the plan, state history, and replan history of the requested plan. Returns a result if the la...
Definition motion.hpp:410
plan_with_status get_latest_plan(const std::string &component_name)
Returns the plan and state history of the most recent execution to move a component....
Definition motion.hpp:346
std::vector< plan_status_with_id > list_plan_statuses()
Returns the status of plans created by MoveOnGlobe requests. Includes statuses of plans that are exec...
Definition motion.hpp:432
bool move(const pose_in_frame &destination, const std::string &name, const std::shared_ptr< WorldState > &world_state, const std::shared_ptr< constraints > &constraints)
Moves any compononent on the robot to a specified destination.
Definition motion.hpp:201
plan_with_status get_plan(const std::string &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 s...
Definition motion.hpp:387
std::vector< plan_status_with_id > list_active_plan_statuses()
Returns the status of currently active plans created by MoveOnGlobe requests. Includes statuses of pl...
Definition motion.hpp:447
std::string move_on_map(const pose &destination, const std::string &component_name, const std::string &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.
Definition motion.hpp:228
virtual std::string name() const
Return the resource's name.
gRPC client implementation of a Motion service.
Definition motion_client.hpp:19
bool move(const pose_in_frame &destination, const std::string &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::pair< Motion::plan_with_status, std::vector< Motion::plan_with_status > > get_latest_plan_with_replan_history(const std::string &component_name, const ProtoStruct &extra) override
Returns the plan, state history, and replan history of the most recent execution to move a component....
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 pl...
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 exec...
std::string move_on_globe(const geo_point &destination, const boost::optional< double > &heading, const std::string &component_name, const std::string &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.
Motion::plan_with_status get_latest_plan(const std::string &component_name, const ProtoStruct &extra) override
Returns the plan and state history of the most recent execution to move a component....
pose_in_frame get_pose(const std::string &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.
ProtoStruct do_command(const ProtoStruct &command) override
Send/receive arbitrary commands to the resource.
std::string move_on_map(const pose &destination, const std::string &component_name, const std::string &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.
void stop_plan(const std::string &component_name, const ProtoStruct &extra) override
Stop a currently executing motion plan.
std::pair< Motion::plan_with_status, std::vector< Motion::plan_with_status > > get_plan_with_replan_history(const std::string &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 la...
Motion::plan_with_status get_plan(const std::string &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 s...
Specifies all constraints to be passed to Viam's motion planning, along with any optional parameters.
Definition motion.hpp:186
Describes a plan, its current status, and all status changes that have occurred previously on that pl...
Definition motion.hpp:146
Definition geometry.hpp:79
Defines configuration options for certain Motion APIs.
Definition motion.hpp:37