8#include <grpcpp/channel.h>
10#include <viam/api/component/gripper/v1/gripper.grpc.pb.h>
24 GripperClient(std::string names, std::shared_ptr<grpc::Channel> channel);
26 void open(
const AttributeMap& extra)
override;
27 bool grab(
const AttributeMap& extra)
override;
28 void stop(
const AttributeMap& extra)
override;
30 AttributeMap
do_command(
const AttributeMap& command)
override;
31 std::vector<GeometryConfig>
get_geometries(
const AttributeMap& extra)
override;
39 using StubType = viam::component::gripper::v1::GripperService::StubInterface;
40 std::unique_ptr<StubType> stub_;
41 std::shared_ptr<grpc::Channel> channel_;
A Gripper represents a physical robotic gripper.
Definition gripper.hpp:24
void open()
Open the gripper.
Definition gripper.hpp:27
bool grab()
Instruct the gripper to grab.
Definition gripper.hpp:37
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling arm.
Definition gripper.hpp:55
void stop()
Stops a resource from running.
Definition stoppable.hpp:16
gRPC client implementation of a Gripper component
Definition gripper_client.hpp:21
bool is_moving() override
Reports if the gripper is in motion.
bool grab(const AttributeMap &extra) override
Instruct the gripper to grab.
void stop(const AttributeMap &extra) override
Stops a resource from running.
std::vector< GeometryConfig > get_geometries(const AttributeMap &extra) override
Returns GeometryConfigs associated with the calling arm.
void open(const AttributeMap &extra) override
Open the gripper.
AttributeMap do_command(const AttributeMap &command) override
Send/receive arbitrary commands to the resource.
Defines a Gripper component.