Viam C++ SDK current
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
viam::sdk::Arm Class Referenceabstract

An Arm represents a physical robot arm that exists in three-dimensional space. More...

#include "components/arm.hpp"

+ Inheritance diagram for viam::sdk::Arm:

Classes

struct  KinematicsDataSVA
 
struct  KinematicsDataUnspecified
 
struct  KinematicsDataURDF
 

Public Types

using KinematicsData
 The kinematics of the component.
 

Public Member Functions

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.
 
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.
 
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 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.
 
virtual bool is_moving ()=0
 Reports if the arm is in motion.
 
virtual AttributeMap do_command (const AttributeMap &command)=0
 Send/receive arbitrary commands to the resource.
 
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.
 
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.
 
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
virtual void stop (const AttributeMap &extra)=0
 Stops a resource from running.
 
void stop ()
 Stops a resource from running.
 

Static Public Member Functions

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

 Arm (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Component
 Component (std::string name)
 

Detailed Description

An Arm represents a physical robot arm that exists in three-dimensional space.

This acts as an abstract parent class to be inherited from by any drivers representing specific arm implementations. This class cannot be used on its own.

Member Typedef Documentation

◆ KinematicsData

Initial value:
boost::variant<KinematicsDataUnspecified, KinematicsDataSVA, KinematicsDataURDF>

The kinematics of the component.

Returns
The data in Viam's Spatial Vector Algebra (SVA) format, or URDF.

Member Function Documentation

◆ api()

API viam::sdk::Arm::api ( ) const
overridevirtual

Returns the API associated with a particular resource.

Implements viam::sdk::Resource.

◆ do_command()

virtual AttributeMap viam::sdk::Arm::do_command ( const AttributeMap & command)
pure virtual

Send/receive arbitrary commands to the resource.

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

Implemented in viam::sdk::impl::ArmClient.

◆ get_end_position() [1/2]

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/2]

virtual pose viam::sdk::Arm::get_end_position ( const AttributeMap & extra)
pure 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.

Implemented in viam::sdk::impl::ArmClient, and viam::sdk::impl::ArmClient.

◆ get_geometries()

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

Returns GeometryConfigs associated with the calling arm.

Parameters
extraAny additional arguments to the method

Implemented in viam::sdk::impl::ArmClient, and viam::sdk::impl::ArmClient.

◆ get_joint_positions()

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

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

Parameters
extraAny additional arguments to the method.

Implemented in viam::sdk::impl::ArmClient, and viam::sdk::impl::ArmClient.

◆ get_kinematics() [1/2]

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/2]

virtual KinematicsData viam::sdk::Arm::get_kinematics ( const AttributeMap & extra)
pure 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.

Implemented in viam::sdk::impl::ArmClient, and viam::sdk::impl::ArmClient.

◆ is_moving()

virtual bool viam::sdk::Arm::is_moving ( )
pure virtual

Reports if the arm is in motion.

Implemented in viam::sdk::impl::ArmClient.

◆ move_to_joint_positions()

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

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

Parameters
positions
extraAny additional arguments to the method.

Implemented in viam::sdk::impl::ArmClient, and viam::sdk::impl::ArmClient.

◆ move_to_position() [1/2]

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

Move the end of the arm to.

Parameters
pose.

◆ move_to_position() [2/2]

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

Move the end of the arm to.

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

Implemented in viam::sdk::impl::ArmClient, and viam::sdk::impl::ArmClient.


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