Class ActiveControl

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class ActiveControl : public franka::ActiveControlBase

Documented in ActiveControlBase

Subclassed by franka::ActiveMotionGenerator< MotionGeneratorType >, franka::ActiveTorqueControl

Public Functions

~ActiveControl() override
virtual std::pair<RobotState, Duration> readOnce() override

Waits for a robot state update and returns it.

Throws:
Returns:

Current robot state & time since last read operation

inline virtual void writeOnce(const Torques&) override

Updates torque commands of an active control

hint: implemented in ActiveTorqueControl

inline virtual void writeOnce(const JointPositions&, const std::optional<const Torques>&) override

Updates the joint position and torque commands of an active control

hint: implemented in ActiveMotionGenerator<JointPositions>

inline virtual void writeOnce(const JointVelocities&, const std::optional<const Torques>&) override

Updates the joint velocity and torque commands of an active control

hint: implemented in ActiveMotionGenerator<JointVelocities>

inline virtual void writeOnce(const CartesianPose&, const std::optional<const Torques>&) override

Updates the cartesian position and torque commands of an active control

hint: implemented in ActiveMotionGenerator<CartesianPose>

inline virtual void writeOnce(const CartesianVelocities&, const std::optional<const Torques>&) override

Updates the cartesian velocity and torque commands of an active control

hint: implemented in ActiveMotionGenerator<CartesianVelocities>

inline virtual void writeOnce(const JointPositions &motion_generator_input) override

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

Parameters:

motion_generator_input – the new motion generator input

inline virtual void writeOnce(const JointVelocities &motion_generator_input) override

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

Parameters:

motion_generator_input – the new motion generator input

inline virtual void writeOnce(const CartesianPose &motion_generator_input) override

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

Parameters:

motion_generator_input – the new motion generator input

inline virtual void writeOnce(const CartesianVelocities &motion_generator_input) override

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

Parameters:

motion_generator_input – the new motion generator input

Protected 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

Parameters:
  • robot_impl – shared_ptr to the Robot::Impl in the Robot

  • motion_id – id of the managed motion

  • control_lock – of the Robot, preventing other read and write accesses during the active control

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<Duration> last_read_access

duration to last read access