Class DefaultDriver

Inheritance Relationships

Base Type

Class Documentation

class DefaultDriver : public robotiq_driver::Driver

Public Functions

explicit DefaultDriver(std::unique_ptr<Serial> serial)
virtual bool connect() override

Connect to the gripper serial connection.

virtual void disconnect() override

Disconnect from the gripper serial connection.

virtual void set_slave_address(uint8_t slave_address) override
virtual void activate() override

Activate the gripper with the specified operation mode and parameters.

virtual void deactivate() override

Deactivate the gripper.

virtual void set_gripper_position(uint8_t pos) override

Commands the gripper to move to the desired position.

Parameters:

pos – A value between 0x00 (fully open) and 0xFF (fully closed).

virtual uint8_t get_gripper_position() override

Return the current position of the gripper.

Throws:

serial::IOException – on failure to successfully communicate with gripper port

Returns:

uint8_t A value between 0x00 (fully open) and 0xFF (fully closed).

virtual bool gripper_is_moving() override

Returns true if the gripper is currently moving, false otherwise.

virtual void set_speed(uint8_t speed) override

Set the speed of the gripper.

Parameters:

speed – A value between 0x00 (stopped) and 0xFF (full speed).

virtual void set_force(uint8_t force) override

Set how forcefully the gripper opens or closes.

Parameters:

force – A value between 0x00 (no force) or 0xFF (maximum force).