Base class for motions.
More...
#include <motion.hpp>
template<typename ControlSignalType>
class franky::Motion< ControlSignalType >
Base class for motions.
- Template Parameters
-
ControlSignalType | Control signal type of the motion. Either franka::Torques, franka::JointVelocities, franka::CartesianVelocities, franka::JointPositions or franka::CartesianPose. |
◆ CallbackType
template<typename ControlSignalType >
◆ Motion()
template<typename ControlSignalType >
◆ addReaction()
template<typename ControlSignalType >
Add a reaction to the motion.
Reactions are evaluated in every step of the motion and can replace the current motion with a new motion.
- Parameters
-
reaction | The reaction to add. |
◆ addReactionFront()
template<typename ControlSignalType >
Add a reaction to the front of the reaction list.
Reactions are evaluated in every step of the motion and can replace the current motion with a new motion.
- Parameters
-
reaction | The reaction to add. |
◆ checkAndCallReactions()
template<typename ControlSignalType >
Check and call reactions.
- Parameters
-
robot_state | The current robot state. |
rel_time | The relative time [s]. |
abs_time | The absolute time [s]. |
- Returns
- The new motion if a reaction was triggered, nullptr otherwise.
◆ init()
template<typename ControlSignalType >
Initialize the motion.
- Parameters
-
robot | The robot instance. |
robot_state | The current robot state. |
previous_command | The previous command. |
◆ initImpl()
template<typename ControlSignalType >
◆ nextCommand()
template<typename ControlSignalType >
Get the next command of the motion.
- Parameters
-
robot_state | The current robot state. |
time_step | The time step [s]. |
rel_time | The relative time [s]. |
abs_time | The absolute time [s]. |
previous_command | The previous command. |
- Returns
- The next control signal for libfranka.
◆ nextCommandImpl()
template<typename ControlSignalType >
◆ reactions()
template<typename ControlSignalType >
Currently registered reactions of the motion.
◆ registerCallback()
template<typename ControlSignalType >
Register a callback that is called in every step of the motion.
- Parameters
-
callback | The callback to register. Callbacks are called with the robot state, the time step [s], the relative time [s], the absolute time [s] and the control signal computed in this step. |
◆ robot()
template<typename ControlSignalType >
The documentation for this class was generated from the following files:
- /home/runner/work/franky/franky/include/franky/motion/motion.hpp
- /home/runner/work/franky/franky/src/motion/motion.cpp