libfranka 0.15.0
FCI C++ API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
franka::ActiveControl Class Reference

Documented in ActiveControlBase. More...

#include <active_control.h>

Inheritance diagram for franka::ActiveControl:
Inheritance graph
[legend]
Collaboration diagram for franka::ActiveControl:
Collaboration graph
[legend]

Public Member Functions

std::pair< RobotState, DurationreadOnce () override
 Waits for a robot state update and returns it.
 
void writeOnce (const Torques &) override
 Updates torque commands of an active control.
 
void writeOnce (const JointPositions &, const std::optional< const Torques > &) override
 Updates the joint position and torque commands of an active control.
 
void writeOnce (const JointVelocities &, const std::optional< const Torques > &) override
 Updates the joint velocity and torque commands of an active control.
 
void writeOnce (const CartesianPose &, const std::optional< const Torques > &) override
 Updates the cartesian position and torque commands of an active control.
 
void writeOnce (const CartesianVelocities &, const std::optional< const Torques > &) override
 Updates the cartesian velocity and torque commands of an active control.
 
void writeOnce (const JointPositions &motion_generator_input) override
 Updates the joint position commands of an active control, with internal controller.
 
void writeOnce (const JointVelocities &motion_generator_input) override
 Updates the joint velocity commands of an active control, with internal controller.
 
void writeOnce (const CartesianPose &motion_generator_input) override
 Updates the cartesian pose commands of an active control, with internal controller.
 
void writeOnce (const CartesianVelocities &motion_generator_input) override
 Updates the cartesian velocity commands of an active control, with internal controller.
 

Protected Member Functions

 ActiveControl (std::shared_ptr< Robot::Impl > robot_impl, uint32_t motion_id, std::unique_lock< std::mutex > control_lock)
 Construct a new ActiveControl object.
 

Protected Attributes

std::shared_ptr< Robot::Impl > robot_impl
 shared pointer to Robot::Impl instance for read and write accesses
 
uint32_t motion_id
 motion id of running motion
 
std::unique_lock< std::mutex > control_lock
 control-lock preventing parallel control processes
 
bool control_finished
 flag indicating if control process is finished
 
std::optional< Durationlast_read_access
 duration to last read access
 

Detailed Description

Documented in ActiveControlBase.

Constructor & Destructor Documentation

◆ ActiveControl()

franka::ActiveControl::ActiveControl ( std::shared_ptr< Robot::Impl >  robot_impl,
uint32_t  motion_id,
std::unique_lock< std::mutex >  control_lock 
)
protected

Construct a new ActiveControl object.

Parameters
robot_implshared_ptr to the Robot::Impl in the Robot
motion_idid of the managed motion
control_lockof the Robot, preventing other read and write accesses during the active control

Member Function Documentation

◆ readOnce()

std::pair< RobotState, Duration > franka::ActiveControl::readOnce ( )
overridevirtual

Waits for a robot state update and returns it.

Returns
Current robot state & time since last read operation
Exceptions
NetworkExceptionif the connection is lost, e.g. after a timeout.
ProtocolExceptionif robot returns an unexpected message.
ControlExceptionif robot is in an error state.

Implements franka::ActiveControlBase.

◆ writeOnce() [1/9]

void franka::ActiveControl::writeOnce ( const CartesianPose ,
const std::optional< const Torques > &   
)
inlineoverridevirtual

Updates the cartesian position and torque commands of an active control.

hint: implemented in ActiveMotionGenerator<CartesianPose>

Implements franka::ActiveControlBase.

◆ writeOnce() [2/9]

void franka::ActiveControl::writeOnce ( const CartesianPose motion_generator_input)
inlineoverridevirtual

Updates the cartesian pose commands of an active control, with internal controller.

Parameters
motion_generator_inputthe new motion generator input

Implements franka::ActiveControlBase.

◆ writeOnce() [3/9]

void franka::ActiveControl::writeOnce ( const CartesianVelocities ,
const std::optional< const Torques > &   
)
inlineoverridevirtual

Updates the cartesian velocity and torque commands of an active control.

hint: implemented in ActiveMotionGenerator<CartesianVelocities>

Implements franka::ActiveControlBase.

◆ writeOnce() [4/9]

void franka::ActiveControl::writeOnce ( const CartesianVelocities motion_generator_input)
inlineoverridevirtual

Updates the cartesian velocity commands of an active control, with internal controller.

Parameters
motion_generator_inputthe new motion generator input

Implements franka::ActiveControlBase.

◆ writeOnce() [5/9]

void franka::ActiveControl::writeOnce ( const JointPositions ,
const std::optional< const Torques > &   
)
inlineoverridevirtual

Updates the joint position and torque commands of an active control.

hint: implemented in ActiveMotionGenerator<JointPositions>

Implements franka::ActiveControlBase.

◆ writeOnce() [6/9]

void franka::ActiveControl::writeOnce ( const JointPositions motion_generator_input)
inlineoverridevirtual

Updates the joint position commands of an active control, with internal controller.

Parameters
motion_generator_inputthe new motion generator input

Implements franka::ActiveControlBase.

◆ writeOnce() [7/9]

void franka::ActiveControl::writeOnce ( const JointVelocities ,
const std::optional< const Torques > &   
)
inlineoverridevirtual

Updates the joint velocity and torque commands of an active control.

hint: implemented in ActiveMotionGenerator<JointVelocities>

Implements franka::ActiveControlBase.

◆ writeOnce() [8/9]

void franka::ActiveControl::writeOnce ( const JointVelocities motion_generator_input)
inlineoverridevirtual

Updates the joint velocity commands of an active control, with internal controller.

Parameters
motion_generator_inputthe new motion generator input

Implements franka::ActiveControlBase.

◆ writeOnce() [9/9]

void franka::ActiveControl::writeOnce ( const Torques )
inlineoverridevirtual

Updates torque commands of an active control.

hint: implemented in ActiveTorqueControl

Implements franka::ActiveControlBase.

Reimplemented in franka::ActiveTorqueControl.


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