Skip to main content

Robotiq::GripperCommand Struct

The gripper command block (host -> gripper), laid out byte for byte as the instruction manual's block table.

Single-byte fields are plain members; the packed action byte (byte 0) is an ActionRequest of the manual's action bits. data() exposes the raw block for the transport.

Example
  command.positionRequest = 100;
  command.speed = 255;
  command.force = 255;
  gripper.setCommand(command);

Included Headers

#include <command.hpp>

Members

Public Member Functions
const uint8_t *data () const
uint8_t *data ()

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...

Public Member Attributes
ActionRequestaction {}

byte 0 — ACTION REQUEST More...

uint8_treserved1 = 0

byte 1 More...

uint8_treserved2 = 0

byte 2 More...

uint8_tpositionRequest = 0

byte 3 — rPR: 0 open .. 255 closed More...

uint8_tspeed = 0

byte 4 — rSP More...

uint8_tforce = 0

byte 5 — rFR More...

std::array< uint8_t, detail::rm::kCommandBlockBytes - detail::rm::kCommandDocumentedBytes >reservedTail {}

bytes 6..15 More...

Public Static Functions
static constexpr GripperCommanddefaults ()

A ready-to-use command. More...

static constexpr std::size_tsize ()

Public Member Functions

data()

const uint8_t * Robotiq::GripperCommand::data ()
inline
Returns

Raw block access, the manual's byte order. size() bytes wide.

data()

uint8_t * Robotiq::GripperCommand::data ()
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Public Member Attributes

action

ActionRequest Robotiq::GripperCommand::action {}

byte 0 — ACTION REQUEST

force

uint8_t Robotiq::GripperCommand::force = 0

byte 5 — rFR

positionRequest

uint8_t Robotiq::GripperCommand::positionRequest = 0

byte 3 — rPR: 0 open .. 255 closed

reserved1

uint8_t Robotiq::GripperCommand::reserved1 = 0

byte 1

reserved2

uint8_t Robotiq::GripperCommand::reserved2 = 0

byte 2

reservedTail

std::array<uint8_t, detail::rm::kCommandBlockBytes - detail::rm::kCommandDocumentedBytes> Robotiq::GripperCommand::reservedTail {}

bytes 6..15

speed

uint8_t Robotiq::GripperCommand::speed = 0

byte 4 — rSP

Public Static Functions

defaults()

constexpr GripperCommand Robotiq::GripperCommand::defaults ()
inline constexpr static

A ready-to-use command.

Returns

A GripperCommand with Activate set and speed/force at maximum.

size()

constexpr std::size_t Robotiq::GripperCommand::size ()
inline constexpr static
Returns

The width of the command block in bytes (16, per the manual).


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

  • command.hpp

Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.