humanoid_control_functions.h File Reference

humanoid_control_functions.h file for this module. Contains includes and prototypes. More...

#include <phua_haptic/humanoid_functions.h>
#include <phua_haptic/miscellaneous.h>
#include <phua_haptic/types.h>
#include <Eigen/Dense>
#include <armadillo>
Include dependency graph for humanoid_control_functions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define PATH_FOLLOWING_POSITION_ERROR   1
 
short unsigned int ConvertJointAngleByID (int id, double angle_position)
 Function to convert a joint angle for a given humanoid servo ID. More...
 
double ConvertServoValueByID (int id, short unsigned int servo_value)
 Function to convert a servo value for a given humanoid servo ID. More...
 
void SetRobotHomePosition (shared_vars_t *RobotVars)
 Function to send commands to set the robot to its home position. More...
 
void UpdateArmsDirKinData (shared_vars_t *RobotVars)
 Function to update the arm end point. More...
 
void UpdateDetachedLegsDirKinData (shared_vars_t *RobotVars)
 Function to update the detached legs end point. More...
 
void SetArmSpeed (short int SIDE, short int speed, shared_vars_t *RobotVars)
 Function to set speed to arm servos. More...
 
void SetLegSpeed (short int SIDE, short int speed, shared_vars_t *RobotVars)
 Function to set speed to leg servos. More...
 
void MoveArmToCartesianPosition (double X, double Y, double Z, short int SIDE, shared_vars_t *RobotVars)
 Function to move arm end point to given coordinates. More...
 
void MoveDetachedLegToCartesianPosition (double X, double Y, double Z, double t4, short int SIDE, shared_vars_t *RobotVars)
 Function to move detached leg end point to given coordinates. More...
 
void UpdateJointDataByID (short int id, double joint_angle, shared_vars_t *RobotVars)
 Function to update joint value in the data struture from supplied ID. More...
 
void SetArmAutomaticSpeeds (short int SIDE, shared_vars_t *RobotVars)
 Function set different automatic speeds to arm servomotors. More...
 
void CalculateDifferencialArmServoSpeed (double *avg_speed, shared_vars_t *RobotVars)
 Function to calculate joint angular speed given 3d space velocity vector. More...
 
void StopRobotMovement (shared_vars_t *RobotVars)
 Function to stop robot at its current joint configuration. More...
 
void ArmsDifferencialSpeedControl (double *avg_speed, shared_vars_t *RobotVars)
 Main robot arm speed control type function. More...
 
void DemoUserPath_WritePoints (shared_vars_t *RobotVars)
 Function to write points to file. More...
 
void DemoUserPath_ReadPoints (shared_vars_t *RobotVars)
 Function to read points from file. More...
 
void PathFollowingExecute (shared_vars_t *RobotVars)
 Function to run points read from file. More...
 
void UpdateKinematicModelDirKin (shared_vars_t *RobotVars)
 Function to update shared structure with the current direct kinematic of the robot. More...
 

Detailed Description

humanoid_control_functions.h file for this module. Contains includes and prototypes.

Author
pedro_cruz
Version
1.0
Date
11 May 2012

Definition in file humanoid_control_functions.h.

Macro Definition Documentation

#define PATH_FOLLOWING_POSITION_ERROR   1

Definition at line 44 of file humanoid_control_functions.h.

Function Documentation

void ArmsDifferencialSpeedControl ( double *  avg_speed,
shared_vars_t RobotVars 
)

Main robot arm speed control type function.

This function is the main function for the arms speed control type.

Parameters
[in]avg_speedaverage joystick cartesian speed vector.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 1005 of file humanoid_control_functions.cpp.

void CalculateDifferencialArmServoSpeed ( double *  avg_speed,
shared_vars_t RobotVars 
)

Function to calculate joint angular speed given 3d space velocity vector.

This function uses the inverse jacobian to calculate joint angular speed.

Parameters
[in]avg_speed3d speed components.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 803 of file humanoid_control_functions.cpp.

short unsigned int ConvertJointAngleByID ( int  id,
double  angle_position 
)

Function to convert a joint angle for a given humanoid servo ID.

This function converts joint angles to servo values for a given servomotor ID. Depends on external class type "humanoid".

Parameters
[in]idID of the servo to convert.
[in]angle_positionangle in degrees of the desired joint angle position.
Returns
the corresponding servomotor value.

Definition at line 37 of file humanoid_control_functions.cpp.

double ConvertServoValueByID ( int  id,
short unsigned int  servo_value 
)

Function to convert a servo value for a given humanoid servo ID.

This function converts servo values to joint values for a given servomotor ID. Depends on external class type "humanoid".

Parameters
[in]idID of the servo to convert.
[in]servo_valueservomotor position value.
Returns
the corresponding joint angle value.

Definition at line 352 of file humanoid_control_functions.cpp.

void DemoUserPath_ReadPoints ( shared_vars_t RobotVars)

Function to read points from file.

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 1422 of file humanoid_control_functions.cpp.

void DemoUserPath_WritePoints ( shared_vars_t RobotVars)

Function to write points to file.

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 1347 of file humanoid_control_functions.cpp.

void MoveArmToCartesianPosition ( double  X,
double  Y,
double  Z,
short int  SIDE,
shared_vars_t RobotVars 
)

Function to move arm end point to given coordinates.

This function calculates joint value for given 3D space coordinates for the arms and sends commands to the servos to reach that position.

Parameters
[in]Xxx axis desired position.
[in]Yyy axis desired position.
[in]Zzz axis desired position.
[in]SIDELEFT or RIGHT.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 536 of file humanoid_control_functions.cpp.

void MoveDetachedLegToCartesianPosition ( double  X,
double  Y,
double  Z,
double  t4,
short int  SIDE,
shared_vars_t RobotVars 
)

Function to move detached leg end point to given coordinates.

This function calculates joint value for given 3D space coordinates for the detached legs and sends commands to the servos to reach that position.

Parameters
[in]Xxx axis desired position.
[in]Yyy axis desired position.
[in]Zzz axis desired position.
[in]t4hip abduction desired angle.
[in]SIDELEFT or RIGHT.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 574 of file humanoid_control_functions.cpp.

void PathFollowingExecute ( shared_vars_t RobotVars)

Function to run points read from file.

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 1572 of file humanoid_control_functions.cpp.

void SetArmAutomaticSpeeds ( short int  SIDE,
shared_vars_t RobotVars 
)

Function set different automatic speeds to arm servomotors.

This function sends commands to the arms servomotors to update the current speed and updates the information in the data structure.

Parameters
[in]SIDELEFT or RIGHT.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 695 of file humanoid_control_functions.cpp.

void SetArmSpeed ( short int  SIDE,
short int  speed,
shared_vars_t RobotVars 
)

Function to set speed to arm servos.

This function sets a new speed to all the arm servos.

Parameters
[in]SIDELEFT or RIGHT.
[in]speedservo digital speed to set.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 468 of file humanoid_control_functions.cpp.

void SetLegSpeed ( short int  SIDE,
short int  speed,
shared_vars_t RobotVars 
)

Function to set speed to leg servos.

This function sets a new speed to all the leg servos.

Parameters
[in]SIDELEFT or RIGHT.
[in]speedservo digital speed to set.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 498 of file humanoid_control_functions.cpp.

void SetRobotHomePosition ( shared_vars_t RobotVars)

Function to send commands to set the robot to its home position.

This function sends a go to zero command to all joints of the robot. Depends on external class type "hitec5980sg".

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 239 of file humanoid_control_functions.cpp.

void StopRobotMovement ( shared_vars_t RobotVars)

Function to stop robot at its current joint configuration.

This function sends commands to read current robot joint coordinates followed by commands for that position.

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 912 of file humanoid_control_functions.cpp.

void UpdateArmsDirKinData ( shared_vars_t RobotVars)

Function to update the arm end point.

This function updates the arm end point values with the current arm joint values.

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 153 of file humanoid_control_functions.cpp.

void UpdateDetachedLegsDirKinData ( shared_vars_t RobotVars)

Function to update the detached legs end point.

This function updates the detached legs end point values with the current detached legs joint values.

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 187 of file humanoid_control_functions.cpp.

void UpdateJointDataByID ( short int  id,
double  joint_angle,
shared_vars_t RobotVars 
)

Function to update joint value in the data struture from supplied ID.

This function updates the joint values in the data struture from by means of the servo ID. If parameter id is 1000, the function will scan all the robot joints and update the structure.

Parameters
[in]idID of the joint servo.
[in]joint_anglejoint value to update.
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 626 of file humanoid_control_functions.cpp.

void UpdateKinematicModelDirKin ( shared_vars_t RobotVars)

Function to update shared structure with the current direct kinematic of the robot.

Parameters
[in]RobotVarsstructure defined in types.h with the joint values.
Returns
none.

Definition at line 1768 of file humanoid_control_functions.cpp.



phua_haptic
Author(s): Pedro Cruz
autogenerated on Mon Mar 2 2015 01:32:36