Class VacuumGripper

Class Documentation

class VacuumGripper

Maintains a network connection to the vacuum gripper, provides the current vacuum gripper state, and allows the execution of commands.

Note

The members of this class are threadsafe.

Public Types

enum class ProductionSetupProfile

Vacuum production setup profile.

Values:

enumerator kP0
enumerator kP1
enumerator kP2
enumerator kP3
using ServerVersion = uint16_t

Version of the vacuum gripper server.

Public Functions

explicit VacuumGripper(const std::string &franka_address)

Establishes a connection with a vacuum gripper connected to a robot.

Parameters:

franka_address[in] IP/hostname of the robot the vacuum gripper is connected to.

Throws:
VacuumGripper(VacuumGripper &&vacuum_gripper) noexcept

Move-constructs a new VacuumGripper instance.

Parameters:

vacuum_gripper[in] Other VacuumGripper instance.

VacuumGripper &operator=(VacuumGripper &&vacuum_gripper) noexcept

Move-assigns this VacuumGripper from another VacuumGripper instance.

Parameters:

vacuum_gripper[in] Other VacuumGripper instance.

Returns:

Model instance.

~VacuumGripper() noexcept

Closes the connection.

bool vacuum(uint8_t vacuum, std::chrono::milliseconds timeout, ProductionSetupProfile profile = ProductionSetupProfile::kP0) const

Vacuums an object.

Parameters:
  • vacuum[in] Setpoint for control mode. Unit: [10mbar].

  • timeout[in] Vacuum timeout. Unit: [ms].

  • profile[in] Production setup profile P0 to P3. Default: P0.

Throws:
Returns:

True if the vacuum has been established, false otherwise.

bool dropOff(std::chrono::milliseconds timeout) const

Drops the grasped object off.

Parameters:

timeout[in] Dropoff timeout. Unit: [ms].

Throws:
Returns:

True if command was successful, false otherwise.

bool stop() const

Stops a currently running vacuum gripper vacuum or drop off operation.

Throws:
Returns:

True if command was successful, false otherwise.

VacuumGripperState readOnce() const

Waits for a vacuum gripper state update and returns it.

Throws:
Returns:

Current vacuum gripper state.

ServerVersion serverVersion() const noexcept

Returns the software version reported by the connected server.

Returns:

Software version of the connected server.