Classes | Defines | Functions | Variables
teleop_nao_ni.cpp File Reference
#include <math.h>
#include <ros/ros.h>
#include <ros/package.h>
#include <tf/transform_broadcaster.h>
#include <kdl/frames.hpp>
#include <std_msgs/String.h>
#include <geometry_msgs/Twist.h>
#include <nao_ctrl/MotionCommandBtn.h>
#include <nao_ctrl/HeadAngles.h>
#include <XnOpenNI.h>
#include <XnCodecIDs.h>
#include <XnCppWrapper.h>
Include dependency graph for teleop_nao_ni.cpp:

Go to the source code of this file.

Classes

class  TeleopNaoNi

Defines

#define CHECK_RC(nRetVal, what)
#define control_dist   300.0
#define control_rot   1.57
#define my_pi   3.141592653589793
#define rot_constant   0.04
#define rotating_speed   0.3
#define safety_dist   200.0
#define safety_rot   0.3
#define walking_speed   0.3

Functions

void checkPose (TeleopNaoNi &obj)
float getAngleBetweenLimbs (XnUserID const &user, XnSkeletonJoint const &eJoint1, XnSkeletonJoint const &eJoint2, XnSkeletonJoint const &eJoint3, XnSkeletonJoint const &eJoint4)
XnPoint3D getBodyLoc (XnUserID const &user, XnSkeletonJoint const &eJoint1)
float getLimbAngle (XnUserID const &user, XnSkeletonJoint const &eJoint1, XnSkeletonJoint const &eJoint2, XnSkeletonJoint const &eJoint3)
float getTorsoRotation (XnUserID const &user, XnSkeletonJoint const &eJoint1, XnSkeletonJoint const &eJoint2)
int main (int argc, char **argv)
void stopWalking (TeleopNaoNi &robot)
void XN_CALLBACK_TYPE User_LostUser (xn::UserGenerator &generator, XnUserID nId, void *pCookie)
void XN_CALLBACK_TYPE User_NewUser (xn::UserGenerator &generator, XnUserID nId, void *pCookie)
void XN_CALLBACK_TYPE UserCalibration_CalibrationEnd (xn::SkeletonCapability &capability, XnUserID nId, XnBool bSuccess, void *pCookie)
void XN_CALLBACK_TYPE UserCalibration_CalibrationStart (xn::SkeletonCapability &capability, XnUserID nId, void *pCookie)
void XN_CALLBACK_TYPE UserPose_PoseDetected (xn::PoseDetectionCapability &capability, XnChar const *strPose, XnUserID nId, void *pCookie)

Variables

float anterior_control_line = 0.0
float anterior_safe_line = 0.0
float control_angle = 0.0
XnBool g_bNeedPose = FALSE
xn::Context g_Context
xn::DepthGenerator g_DepthGenerator
XnChar g_strPose [20] = ""
xn::UserGenerator g_UserGenerator
XnPoint3D init_usr_loc
XnPoint3D init_usr_LS
XnPoint3D init_usr_RS
float left_control_line = 0.0
float left_safe_line = 0.0
std_msgs::String naosay
float posterior_control_line = 0.0
float posterior_safe_line = 0.0
float right_control_line = 0.0
float right_safe_line = 0.0
float safe_angle = 0.0

Define Documentation

#define CHECK_RC (   nRetVal,
  what 
)
Value:
if (nRetVal != XN_STATUS_OK)                                            \
    {                                                                   \
      printf("%s failed: %s\n", what, xnGetStatusString(nRetVal));      \
      return nRetVal;                                                   \
    }

Definition at line 155 of file teleop_nao_ni.cpp.

#define control_dist   300.0

Definition at line 166 of file teleop_nao_ni.cpp.

#define control_rot   1.57

Definition at line 169 of file teleop_nao_ni.cpp.

#define my_pi   3.141592653589793

Definition at line 162 of file teleop_nao_ni.cpp.

#define rot_constant   0.04

Definition at line 172 of file teleop_nao_ni.cpp.

#define rotating_speed   0.3

Definition at line 164 of file teleop_nao_ni.cpp.

#define safety_dist   200.0

Definition at line 167 of file teleop_nao_ni.cpp.

#define safety_rot   0.3

Definition at line 170 of file teleop_nao_ni.cpp.

#define walking_speed   0.3

Definition at line 163 of file teleop_nao_ni.cpp.


Function Documentation

Definition at line 585 of file teleop_nao_ni.cpp.

float getAngleBetweenLimbs ( XnUserID const &  user,
XnSkeletonJoint const &  eJoint1,
XnSkeletonJoint const &  eJoint2,
XnSkeletonJoint const &  eJoint3,
XnSkeletonJoint const &  eJoint4 
)

Definition at line 369 of file teleop_nao_ni.cpp.

XnPoint3D getBodyLoc ( XnUserID const &  user,
XnSkeletonJoint const &  eJoint1 
)

Definition at line 342 of file teleop_nao_ni.cpp.

float getLimbAngle ( XnUserID const &  user,
XnSkeletonJoint const &  eJoint1,
XnSkeletonJoint const &  eJoint2,
XnSkeletonJoint const &  eJoint3 
)

Definition at line 444 of file teleop_nao_ni.cpp.

float getTorsoRotation ( XnUserID const &  user,
XnSkeletonJoint const &  eJoint1,
XnSkeletonJoint const &  eJoint2 
)

Definition at line 523 of file teleop_nao_ni.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 880 of file teleop_nao_ni.cpp.

Definition at line 294 of file teleop_nao_ni.cpp.

void XN_CALLBACK_TYPE User_LostUser ( xn::UserGenerator generator,
XnUserID  nId,
void pCookie 
)

Definition at line 308 of file teleop_nao_ni.cpp.

void XN_CALLBACK_TYPE User_NewUser ( xn::UserGenerator generator,
XnUserID  nId,
void pCookie 
)

Definition at line 299 of file teleop_nao_ni.cpp.

void XN_CALLBACK_TYPE UserCalibration_CalibrationEnd ( xn::SkeletonCapability capability,
XnUserID  nId,
XnBool  bSuccess,
void pCookie 
)

Definition at line 318 of file teleop_nao_ni.cpp.

Definition at line 313 of file teleop_nao_ni.cpp.

void XN_CALLBACK_TYPE UserPose_PoseDetected ( xn::PoseDetectionCapability capability,
XnChar const *  strPose,
XnUserID  nId,
void pCookie 
)

Definition at line 334 of file teleop_nao_ni.cpp.


Variable Documentation

float anterior_control_line = 0.0

Definition at line 145 of file teleop_nao_ni.cpp.

float anterior_safe_line = 0.0

Definition at line 139 of file teleop_nao_ni.cpp.

float control_angle = 0.0

Definition at line 149 of file teleop_nao_ni.cpp.

Definition at line 105 of file teleop_nao_ni.cpp.

Definition at line 101 of file teleop_nao_ni.cpp.

Definition at line 102 of file teleop_nao_ni.cpp.

XnChar g_strPose[20] = ""

Definition at line 106 of file teleop_nao_ni.cpp.

Definition at line 103 of file teleop_nao_ni.cpp.

Definition at line 110 of file teleop_nao_ni.cpp.

Definition at line 152 of file teleop_nao_ni.cpp.

Definition at line 151 of file teleop_nao_ni.cpp.

float left_control_line = 0.0

Definition at line 148 of file teleop_nao_ni.cpp.

float left_safe_line = 0.0

Definition at line 142 of file teleop_nao_ni.cpp.

std_msgs::String naosay

Definition at line 109 of file teleop_nao_ni.cpp.

Definition at line 146 of file teleop_nao_ni.cpp.

float posterior_safe_line = 0.0

Definition at line 140 of file teleop_nao_ni.cpp.

float right_control_line = 0.0

Definition at line 147 of file teleop_nao_ni.cpp.

float right_safe_line = 0.0

Definition at line 141 of file teleop_nao_ni.cpp.

float safe_angle = 0.0

Definition at line 143 of file teleop_nao_ni.cpp.



nao_openni
Author(s): Bener SUAY
autogenerated on Mon Jan 6 2014 11:27:51