Franky  0.9.1
A High-Level Motion API for Franka
Classes | Public Member Functions | Protected Member Functions | List of all members
franky::WaypointMotion< ControlSignalType, TargetType > Class Template Referenceabstract

A motion following multiple waypoints in a time-optimal way. Works with arbitrary initial conditions. More...

#include <waypoint_motion.hpp>

Inheritance diagram for franky::WaypointMotion< ControlSignalType, TargetType >:
franky::Motion< ControlSignalType >

Classes

struct  Params
 Parameters for the waypoint motion. More...
 

Public Member Functions

 WaypointMotion (std::vector< Waypoint< TargetType >> waypoints, Params params)
 
- Public Member Functions inherited from franky::Motion< ControlSignalType >
void addReaction (std::shared_ptr< Reaction< ControlSignalType >> reaction)
 Add a reaction to the motion. More...
 
void addReactionFront (std::shared_ptr< Reaction< ControlSignalType >> reaction)
 Add a reaction to the front of the reaction list. More...
 
std::vector< std::shared_ptr< Reaction< ControlSignalType > > > reactions ()
 Currently registered reactions of the motion. More...
 
void registerCallback (CallbackType callback)
 Register a callback that is called in every step of the motion. More...
 
void init (Robot *robot, const franka::RobotState &robot_state, const std::optional< ControlSignalType > &previous_command)
 Initialize the motion. More...
 
ControlSignalType nextCommand (const franka::RobotState &robot_state, franka::Duration time_step, double rel_time, double abs_time, const std::optional< ControlSignalType > &previous_command)
 Get the next command of the motion. More...
 
std::shared_ptr< Motion< ControlSignalType > > checkAndCallReactions (const franka::RobotState &robot_state, double rel_time, double abs_time)
 Check and call reactions. More...
 

Protected Member Functions

void initImpl (const franka::RobotState &robot_state, const std::optional< ControlSignalType > &previous_command) override
 
ControlSignalType nextCommandImpl (const franka::RobotState &robot_state, franka::Duration time_step, double rel_time, double abs_time, const std::optional< ControlSignalType > &previous_command) override
 
virtual void initWaypointMotion (const franka::RobotState &robot_state, const std::optional< ControlSignalType > &previous_command, ruckig::InputParameter< 7 > &input_parameter)=0
 
virtual void setNewWaypoint (const franka::RobotState &robot_state, const std::optional< ControlSignalType > &previous_command, const Waypoint< TargetType > &new_waypoint, ruckig::InputParameter< 7 > &input_parameter)=0
 
virtual std::tuple< Vector7d, Vector7d, Vector7dgetAbsoluteInputLimits () const =0
 
virtual ControlSignalType getControlSignal (const ruckig::InputParameter< 7 > &input_parameter) const =0
 
- Protected Member Functions inherited from franky::Motion< ControlSignalType >
 Motion ()
 
Robotrobot () const
 

Additional Inherited Members

- Public Types inherited from franky::Motion< ControlSignalType >
using CallbackType = std::function< void(const franka::RobotState &, franka::Duration, double, double, const ControlSignalType &)>
 

Detailed Description

template<typename ControlSignalType, typename TargetType>
class franky::WaypointMotion< ControlSignalType, TargetType >

A motion following multiple waypoints in a time-optimal way. Works with arbitrary initial conditions.

Template Parameters
ControlSignalTypeThe type of the control signal. Either franka::Torques, franka::JointVelocities, franka::CartesianVelocities, franka::JointPositions or franka::CartesianPose.
TargetTypeThe type of the target of the waypoints.

Constructor & Destructor Documentation

◆ WaypointMotion()

template<typename ControlSignalType , typename TargetType >
franky::WaypointMotion< ControlSignalType, TargetType >::WaypointMotion ( std::vector< Waypoint< TargetType >>  waypoints,
Params  params 
)
inlineexplicit
Parameters
waypointsThe waypoints to follow.
paramsParameters for the motion.

Member Function Documentation

◆ getAbsoluteInputLimits()

template<typename ControlSignalType , typename TargetType >
virtual std::tuple<Vector7d, Vector7d, Vector7d> franky::WaypointMotion< ControlSignalType, TargetType >::getAbsoluteInputLimits ( ) const
protectedpure virtual

◆ getControlSignal()

template<typename ControlSignalType , typename TargetType >
virtual ControlSignalType franky::WaypointMotion< ControlSignalType, TargetType >::getControlSignal ( const ruckig::InputParameter< 7 > &  input_parameter) const
protectedpure virtual

◆ initImpl()

template<typename ControlSignalType , typename TargetType >
void franky::WaypointMotion< ControlSignalType, TargetType >::initImpl ( const franka::RobotState &  robot_state,
const std::optional< ControlSignalType > &  previous_command 
)
inlineoverrideprotectedvirtual

◆ initWaypointMotion()

template<typename ControlSignalType , typename TargetType >
virtual void franky::WaypointMotion< ControlSignalType, TargetType >::initWaypointMotion ( const franka::RobotState &  robot_state,
const std::optional< ControlSignalType > &  previous_command,
ruckig::InputParameter< 7 > &  input_parameter 
)
protectedpure virtual

◆ nextCommandImpl()

template<typename ControlSignalType , typename TargetType >
ControlSignalType franky::WaypointMotion< ControlSignalType, TargetType >::nextCommandImpl ( const franka::RobotState &  robot_state,
franka::Duration  time_step,
double  rel_time,
double  abs_time,
const std::optional< ControlSignalType > &  previous_command 
)
inlineoverrideprotectedvirtual

◆ setNewWaypoint()

template<typename ControlSignalType , typename TargetType >
virtual void franky::WaypointMotion< ControlSignalType, TargetType >::setNewWaypoint ( const franka::RobotState &  robot_state,
const std::optional< ControlSignalType > &  previous_command,
const Waypoint< TargetType > &  new_waypoint,
ruckig::InputParameter< 7 > &  input_parameter 
)
protectedpure virtual

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