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

gRPC client implementation of an Arm component. More...

#include <arm_client.hpp>

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

Public Types

using interface_type = Arm
 
- Public Types inherited from viam::sdk::Arm
using KinematicsData
 The kinematics of the component.
 

Public Member Functions

 ArmClient (std::string name, std::shared_ptr< grpc::Channel > channel)
 
pose get_end_position (const AttributeMap &extra) override
 Get the current position of the end of the arm.
 
void move_to_position (const pose &pose, const AttributeMap &extra) override
 Move the end of the arm to.
 
std::vector< double > get_joint_positions (const AttributeMap &extra) override
 Lists the joint positions in degrees of every joint on a robot arm.
 
void move_to_joint_positions (const std::vector< double > &positions, const AttributeMap &extra) override
 Move each joint on the arm to the corresponding angle specified in.
 
bool is_moving () override
 Reports if the arm is in motion.
 
void stop (const AttributeMap &extra) override
 Stops a resource from running.
 
AttributeMap do_command (const AttributeMap &command) override
 Send/receive arbitrary commands to the resource.
 
Arm::KinematicsData get_kinematics (const AttributeMap &extra) override
 Get the kinematics data associated with the arm.
 
std::vector< GeometryConfigget_geometries (const AttributeMap &extra) override
 Returns GeometryConfigs associated with the calling arm.
 
pose get_end_position ()
 Get the current position of the end of the arm.
 
virtual pose get_end_position (const AttributeMap &extra)=0
 Get the current position of the end of the arm.
 
std::vector< GeometryConfigget_geometries ()
 Returns GeometryConfigs associated with the calling arm.
 
virtual std::vector< GeometryConfigget_geometries (const AttributeMap &extra)=0
 Returns GeometryConfigs associated with the calling arm.
 
std::vector< double > get_joint_positions ()
 Lists the joint positions in degrees of every joint on a robot arm.
 
virtual std::vector< double > get_joint_positions (const AttributeMap &extra)=0
 Lists the joint positions in degrees of every joint on a robot arm.
 
virtual KinematicsData get_kinematics (const AttributeMap &extra)=0
 Get the kinematics data associated with the arm.
 
KinematicsData get_kinematics ()
 Get the kinematics data associated with the arm.
 
virtual void move_to_joint_positions (const std::vector< double > &positions, const AttributeMap &extra)=0
 Move each joint on the arm to the corresponding angle specified in.
 
void move_to_position (const pose &pose)
 Move the end of the arm to.
 
virtual void move_to_position (const pose &pose, const AttributeMap &extra)=0
 Move the end of the arm to.
 
- Public Member Functions inherited from viam::sdk::Arm
pose get_end_position ()
 Get the current position of the end of the arm.
 
void move_to_position (const pose &pose)
 Move the end of the arm to.
 
std::vector< double > get_joint_positions ()
 Lists the joint positions in degrees of every joint on a robot arm.
 
KinematicsData get_kinematics ()
 Get the kinematics data associated with the arm.
 
std::vector< GeometryConfigget_geometries ()
 Returns GeometryConfigs associated with the calling arm.
 
API api () const override
 Returns the API associated with a particular resource.
 
- Public Member Functions inherited from viam::sdk::Component
viam::common::v1::ResourceName get_resource_name (std::string name) const override
 Returns a ResourceName for a particular resource name.
 
- Public Member Functions inherited from viam::sdk::Resource
 Resource (std::string name)
 
virtual std::string name () const
 Return the resource's name.
 
- Public Member Functions inherited from viam::sdk::Stoppable
void stop ()
 Stops a resource from running.
 

Additional Inherited Members

- Static Public Member Functions inherited from viam::sdk::Arm
static KinematicsData from_proto (const viam::common::v1::GetKinematicsResponse &proto)
 
- Static Public Member Functions inherited from viam::sdk::Stoppable
static void stop_if_stoppable (const std::shared_ptr< Resource > &resource, const AttributeMap &extra)
 Stops a Resource if it is Stoppable.
 
static void stop_if_stoppable (const std::shared_ptr< Resource > &resource)
 Stops a Resource if it is Stoppable.
 
- Protected Member Functions inherited from viam::sdk::Arm
 Arm (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Component
 Component (std::string name)
 

Detailed Description

gRPC client implementation of an Arm component.

Member Function Documentation

◆ do_command()

AttributeMap viam::sdk::impl::ArmClient::do_command ( const AttributeMap & command)
overridevirtual

Send/receive arbitrary commands to the resource.

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

Implements viam::sdk::Arm.

◆ get_end_position() [1/3]

pose viam::sdk::Arm::get_end_position ( )
inline

Get the current position of the end of the arm.

Returns
The pose representing the end position of the arm.

◆ get_end_position() [2/3]

pose viam::sdk::impl::ArmClient::get_end_position ( const AttributeMap & extra)
overridevirtual

Get the current position of the end of the arm.

Parameters
extraAny additional arguments to the method.
Returns
The pose representing the end position of the arm.

Implements viam::sdk::Arm.

◆ get_end_position() [3/3]

virtual pose viam::sdk::Arm::get_end_position ( const AttributeMap & extra)
virtual

Get the current position of the end of the arm.

Parameters
extraAny additional arguments to the method.
Returns
The pose representing the end position of the arm.

Implements viam::sdk::Arm.

◆ get_geometries() [1/2]

std::vector< GeometryConfig > viam::sdk::impl::ArmClient::get_geometries ( const AttributeMap & extra)
overridevirtual

Returns GeometryConfigs associated with the calling arm.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Arm.

◆ get_geometries() [2/2]

virtual std::vector< GeometryConfig > viam::sdk::Arm::get_geometries ( const AttributeMap & extra)
virtual

Returns GeometryConfigs associated with the calling arm.

Parameters
extraAny additional arguments to the method

Implements viam::sdk::Arm.

◆ get_joint_positions() [1/2]

std::vector< double > viam::sdk::impl::ArmClient::get_joint_positions ( const AttributeMap & extra)
overridevirtual

Lists the joint positions in degrees of every joint on a robot arm.

Parameters
extraAny additional arguments to the method.

Implements viam::sdk::Arm.

◆ get_joint_positions() [2/2]

virtual std::vector< double > viam::sdk::Arm::get_joint_positions ( const AttributeMap & extra)
virtual

Lists the joint positions in degrees of every joint on a robot arm.

Parameters
extraAny additional arguments to the method.

Implements viam::sdk::Arm.

◆ get_kinematics() [1/3]

KinematicsData viam::sdk::Arm::get_kinematics ( )
inline

Get the kinematics data associated with the arm.

Returns
A variant of kinematics data, with bytes field containing the raw bytes of the file and the object's type indicating the file format.

◆ get_kinematics() [2/3]

Arm::KinematicsData viam::sdk::impl::ArmClient::get_kinematics ( const AttributeMap & extra)
overridevirtual

Get the kinematics data associated with the arm.

Parameters
extraAny additional arguments to the method.
Returns
A variant of kinematics data, with bytes field containing the raw bytes of the file and the object's type indicating the file format.

Implements viam::sdk::Arm.

◆ get_kinematics() [3/3]

virtual KinematicsData viam::sdk::Arm::get_kinematics ( const AttributeMap & extra)
virtual

Get the kinematics data associated with the arm.

Parameters
extraAny additional arguments to the method.
Returns
A variant of kinematics data, with bytes field containing the raw bytes of the file and the object's type indicating the file format.

Implements viam::sdk::Arm.

◆ is_moving()

bool viam::sdk::impl::ArmClient::is_moving ( )
overridevirtual

Reports if the arm is in motion.

Implements viam::sdk::Arm.

◆ move_to_joint_positions() [1/2]

void viam::sdk::impl::ArmClient::move_to_joint_positions ( const std::vector< double > & positions,
const AttributeMap & extra )
overridevirtual

Move each joint on the arm to the corresponding angle specified in.

Parameters
positions
extraAny additional arguments to the method.

Implements viam::sdk::Arm.

◆ move_to_joint_positions() [2/2]

virtual void viam::sdk::Arm::move_to_joint_positions ( const std::vector< double > & positions,
const AttributeMap & extra )
virtual

Move each joint on the arm to the corresponding angle specified in.

Parameters
positions
extraAny additional arguments to the method.

Implements viam::sdk::Arm.

◆ move_to_position() [1/3]

void viam::sdk::Arm::move_to_position ( const pose & pose)
inline

Move the end of the arm to.

Parameters
pose.

◆ move_to_position() [2/3]

void viam::sdk::impl::ArmClient::move_to_position ( const pose & pose,
const AttributeMap & extra )
overridevirtual

Move the end of the arm to.

Parameters
pose.
poseThe destination pose for the arm.
extraAny additional arguments to the method.

Implements viam::sdk::Arm.

◆ move_to_position() [3/3]

virtual void viam::sdk::Arm::move_to_position ( const pose & pose,
const AttributeMap & extra )
virtual

Move the end of the arm to.

Parameters
pose.
poseThe destination pose for the arm.
extraAny additional arguments to the method.

Implements viam::sdk::Arm.

◆ stop()

void viam::sdk::impl::ArmClient::stop ( const AttributeMap & extra)
overridevirtual

Stops a resource from running.

Parameters
extraExtra arguments to pass to the resource's stop method.

Implements viam::sdk::Stoppable.


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