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

A Gripper represents a physical robotic gripper. More...

#include "components/gripper.hpp"

+ Inheritance diagram for viam::sdk::Gripper:

Public Member Functions

void open ()
 Open the gripper.
 
virtual void open (const AttributeMap &extra)=0
 Open the gripper.
 
bool grab ()
 Instruct the gripper to grab.
 
virtual bool grab (const AttributeMap &extra)=0
 Instruct the gripper to grab.
 
virtual bool is_moving ()=0
 Reports if the gripper is in motion.
 
virtual AttributeMap do_command (const AttributeMap &command)=0
 Send/receive arbitrary commands to the resource.
 
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.
 

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

A Gripper represents a physical robotic gripper.

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

Member Function Documentation

◆ api()

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

Returns the API associated with a particular resource.

Implements viam::sdk::Resource.

◆ do_command()

virtual AttributeMap viam::sdk::Gripper::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::GripperClient.

◆ get_geometries()

virtual std::vector< GeometryConfig > viam::sdk::Gripper::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::GripperClient, and viam::sdk::impl::GripperClient.

◆ grab() [1/2]

bool viam::sdk::Gripper::grab ( )
inline

Instruct the gripper to grab.

Returns
bool indicating if the gripper grabbed something.

◆ grab() [2/2]

virtual bool viam::sdk::Gripper::grab ( const AttributeMap & extra)
pure virtual

Instruct the gripper to grab.

Parameters
extraAny additional arguments to the method.
Returns
bool indicating if the gripper grabbed something.

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

◆ is_moving()

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

Reports if the gripper is in motion.

Implemented in viam::sdk::impl::GripperClient.

◆ open()

virtual void viam::sdk::Gripper::open ( const AttributeMap & extra)
pure virtual

Open the gripper.

Parameters
extraAny additional arguments to the method.

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


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