diff --git a/cmake/components/cyberdyne/cyberdyne.c b/cmake/components/cyberdyne/cyberdyne.c index f9d929186ed..c82462b5a27 100755 --- a/cmake/components/cyberdyne/cyberdyne.c +++ b/cmake/components/cyberdyne/cyberdyne.c @@ -116,12 +116,6 @@ static void the_function(){ if(r.curpos==r.tarpos){ r.curpos=0; } - - - - // rtapi_print_msg(RTAPI_MSG_ERR,"running!"); - - } static int setup_pins(){ diff --git a/cmake/components/cyberdyne/cyberdyne.h b/cmake/components/cyberdyne/cyberdyne.h deleted file mode 100755 index 247298ec382..00000000000 --- a/cmake/components/cyberdyne/cyberdyne.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef CYBERDYNE_H -#define CYBERDYNE_H - -#include -#include - -#endif // CYBERDYNE_H diff --git a/cmake/components/cyberdyne/ruckig_dev_common.h b/cmake/components/cyberdyne/ruckig_dev_common.h deleted file mode 100644 index fc17cb531e1..00000000000 --- a/cmake/components/cyberdyne/ruckig_dev_common.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef RUCKIG_DEV_COMMON_H -#define RUCKIG_DECCOMMON_H - -#include "stdbool.h" - -enum interface { - position, - velocity -}; - -enum synchronization { - Phase, ///< Phase synchronize the DoFs when possible, else fallback to "Time" strategy - Time, ///< Always synchronize the DoFs to reach the target at the same time (Default) - TimeIfNecessary, ///< Synchronize only when necessary (e.g. for non-zero target velocity or acceleration) - None, ///< Calculate every DoF independently -}; - -enum durationdiscretization { - Continuous, ///< Every trajectory duration is allowed (Default) - Discrete, ///< The trajectory duration must be a multiple of the control cycle -}; - -//! Result type of Ruckig's update function -enum ruckigs_function_return_message { - Working = 0, ///< The trajectory is calculated normally - Finished = 1, ///< Trajectory has reached its final position - Error = -1, ///< Unclassified error - ErrorInvalidInput = -100, ///< Error in the input parameter - ErrorTrajectoryDuration = -101, ///< The trajectory duration exceeds its numerical limits - ErrorPositionalLimits = -102, ///< The trajectory exceeds the given positional limits (only in Ruckig Pro) - ErrorNoPhaseSynchronization = -103, ///< The trajectory cannot be phase synchronized - ErrorExecutionTimeCalculation = -110, ///< Error during the extremel time calculation (Step 1) - ErrorSynchronizationCalculation = -111, ///< Error during the synchronization calculation (Step 2) -}; - -struct result { - double period; - double curvel, curacc, curpos; - double tarvel, taracc, tarpos; - double maxvel,maxacc,maxjerk; - bool enable; - enum interface interfacetype; - enum synchronization synchronizationtype; - enum durationdiscretization durationdiscretizationtype; - bool finished; - bool error; - int function_return_code; -}; - -#endif // RUCKIG_DEC_COMMON_H diff --git a/cmake/components/cyberdyne/ruckig_dev_format.h b/cmake/components/cyberdyne/ruckig_dev_format.h index 468dd4f8f18..6b3f13a3fe7 100644 --- a/cmake/components/cyberdyne/ruckig_dev_format.h +++ b/cmake/components/cyberdyne/ruckig_dev_format.h @@ -48,6 +48,14 @@ struct ruckig_c_data { double pos_extrema_min, pos_extrema_max; //! Min's and max's of the trajectory. }; +struct ruckig_c_waypoint { + double vo; //! Velocity begin. + double ve; //! Velocity end. + double vm; //! Velcotiy max. + double po; //! Position begin. + double pe; //! Position end. +}; + #endif // RUCKIG_DEV_FORMAT_H diff --git a/cmake/components/cyberdyne/ruckig_dev_format.h.autosave b/cmake/components/cyberdyne/ruckig_dev_format.h.autosave deleted file mode 100644 index 6b3f13a3fe7..00000000000 --- a/cmake/components/cyberdyne/ruckig_dev_format.h.autosave +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef RUCKIG_DEV_FORMAT_H -#define RUCKIG_DEV_FORMAT_H - -#include "stdbool.h" - -enum ruckig_c_control_interface { - position, - velocity -}; - -enum ruckig_c_synchronization { - Phase, ///< Phase synchronize the DoFs when possible, else fallback to "Time" strategy - Time, ///< Always synchronize the DoFs to reach the target at the same time (Default) - TimeIfNecessary, ///< Synchronize only when necessary (e.g. for non-zero target velocity or acceleration) - None, ///< Calculate every DoF independently -}; - -enum ruckig_c_durationdiscretization { - Continuous, ///< Every trajectory duration is allowed (Default) - Discrete, ///< The trajectory duration must be a multiple of the control cycle -}; - -//! Result type of Ruckig's update function -enum ruckig_c_function_return_message { - Working = 0, ///< The trajectory is calculated normally - Finished = 1, ///< Trajectory has reached its final position - Error = -1, ///< Unclassified error - ErrorInvalidInput = -100, ///< Error in the input parameter - ErrorTrajectoryDuration = -101, ///< The trajectory duration exceeds its numerical limits - ErrorPositionalLimits = -102, ///< The trajectory exceeds the given positional limits (only in Ruckig Pro) - ErrorNoPhaseSynchronization = -103, ///< The trajectory cannot be phase synchronized - ErrorExecutionTimeCalculation = -110, ///< Error during the extremel time calculation (Step 1) - ErrorSynchronizationCalculation = -111, ///< Error during the synchronization calculation (Step 2) -}; - -struct ruckig_c_data { - double cycletime; //! Servo cycletime 0.001 seconds. - double curvel, curacc, curpos; - double tarvel, taracc, tarpos; - double maxvel,maxacc,maxjerk; - bool enable; //! Enable ruckig. - enum ruckig_c_control_interface control_interfacetype; - enum ruckig_c_synchronization synchronizationtype; - enum ruckig_c_durationdiscretization durationdiscretizationtype; - int function_return_code; //! 1=finished, 0=busy, <0=error - double duration; //! Duration of traject. - double at_time; //! Request pos,acc.vel at time. - double pos_extrema_min, pos_extrema_max; //! Min's and max's of the trajectory. -}; - -struct ruckig_c_waypoint { - double vo; //! Velocity begin. - double ve; //! Velocity end. - double vm; //! Velcotiy max. - double po; //! Position begin. - double pe; //! Position end. -}; - -#endif // RUCKIG_DEV_FORMAT_H - - - - - - - - - - - - - diff --git a/cmake/components/cyberdyne/ruckig_dev_interface.h b/cmake/components/cyberdyne/ruckig_dev_interface.h index eb6b1ba5752..250f3065d01 100644 --- a/cmake/components/cyberdyne/ruckig_dev_interface.h +++ b/cmake/components/cyberdyne/ruckig_dev_interface.h @@ -15,10 +15,9 @@ class ruckig_dev_interface ruckig_c_data ruckig_calculate_offline(ruckig_c_data in); ruckig_c_data ruckig_calculate_online(ruckig_c_data in); -}; - +}; #endif // RUCKIG_DEV_INTERFACE_H diff --git a/cmake/components/cyberdyne/ruckig_dev_interface.h.autosave b/cmake/components/cyberdyne/ruckig_dev_interface.h.autosave deleted file mode 100644 index fa9c266814b..00000000000 --- a/cmake/components/cyberdyne/ruckig_dev_interface.h.autosave +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef RUCKIG_DEV_INTERFACE_H -#define RUCKIG_DEV_INTERFACE_H - -#include "ruckig_dev_format.h" -#include - -class ruckig_dev_interface -{ -public: - ruckig_dev_interface(); - - ruckig::InputParameter<1> ruckig_c_data_to_cpp(ruckig_c_data input); - ruckig_c_data ruckig_cpp_data_to_c(ruckig::InputParameter<1> input); - - ruckig_c_data ruckig_calculate_offline(ruckig_c_data in); - ruckig_c_data ruckig_calculate_online(ruckig_c_data in); - - - -}; - -#endif // RUCKIG_DEV_INTERFACE_H - -