00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00034 #ifndef __HUMANOID_CONTROL_FUNCTIONS_H_
00035 #define __HUMANOID_CONTROL_FUNCTIONS_H_
00036
00037 #include <humanoid_functions.h>
00038 #include <miscellaneous.h>
00039 #include <types.h>
00040
00041 #include <Eigen/Dense>
00042 #include <armadillo>
00043
00044 #define PATH_FOLLOWING_POSITION_ERROR 1 //double
00045
00046
00047
00048
00049
00059 short unsigned int ConvertJointAngleByID(int id, double angle_position);
00060
00070 double ConvertServoValueByID(int id, short unsigned int servo_value);
00071
00080 void SetRobotHomePosition(shared_vars_t*RobotVars);
00081
00089 void UpdateArmsDirKinData(shared_vars_t*RobotVars);
00090
00098 void UpdateDetachedLegsDirKinData(shared_vars_t*RobotVars);
00099
00109 void SetArmSpeed(short int SIDE, short int speed, shared_vars_t*RobotVars);
00110
00120 void SetLegSpeed(short int SIDE, short int speed, shared_vars_t*RobotVars);
00121
00133 void MoveArmToCartesianPosition(double X, double Y, double Z, short int SIDE, shared_vars_t*RobotVars);
00134
00147 void MoveDetachedLegToCartesianPosition(double X, double Y, double Z, double t4, short int SIDE, shared_vars_t*RobotVars);
00148
00159 void UpdateJointDataByID(short int id, double joint_angle, shared_vars_t*RobotVars);
00160
00169 void SetArmAutomaticSpeeds(short int SIDE, shared_vars_t*RobotVars);
00170
00179 void CalculateDifferencialArmServoSpeed(double *avg_speed, shared_vars_t*RobotVars);
00180
00188 void StopRobotMovement(shared_vars_t*RobotVars);
00189
00198 void ArmsDifferencialSpeedControl(double *avg_speed, shared_vars_t*RobotVars);
00199
00205 void DemoUserPath_WritePoints(shared_vars_t*RobotVars);
00206
00212 void DemoUserPath_ReadPoints(shared_vars_t*RobotVars);
00213
00219 void PathFollowingExecute(shared_vars_t*RobotVars);
00220
00226 void UpdateKinematicModelDirKin(shared_vars_t*RobotVars);
00227
00228 #endif
00229