8#include <franka/robot_state.h>
15template<
typename ControlSignalType>
24template<
typename ControlSignalType>
26 using MotionFunc = std::function<std::shared_ptr<Motion<ControlSignalType>>(
27 const RobotState &, franka::Duration, franka::Duration)>;
74 const std::function<
void(
80 MotionFunc motion_func_;
82 std::mutex callback_mutex_;
83 std::vector<std::function<
void(
86 franka::Duration)>> callbacks_{};
A condition on the robot state.
Definition condition.hpp:15
Base class for motions.
Definition motion.hpp:23
A reaction that can be attached to a motion.
Definition reaction.hpp:25
bool condition(const RobotState &robot_state, franka::Duration rel_time, franka::Duration abs_time) const
Check if the condition is met.
Definition reaction.hpp:62
void registerCallback(const std::function< void(const RobotState &, franka::Duration, franka::Duration)> &callback)
Register a callback that is called when the condition of this reaction is met.
Definition reaction.cpp:51
std::shared_ptr< Motion< ControlSignalType > > operator()(const RobotState &robot_state, franka::Duration rel_time, franka::Duration abs_time)
Get the new motion if the condition is met.
Definition reaction.cpp:40
Definition dynamics_limit.cpp:8
std::array< double, dims > toStdD(const Eigen::Matrix< double, dims, 1 > &vector)
Definition util.hpp:18
Full state of the robot.
Definition robot_state.hpp:20