#include <ros/ros.h>
#include <signal.h>
#include <boost/thread/thread.hpp>
#include <cstdlib>
#include <array>
#include <vector>
#include <algorithm>
#include <sstream>
#include <dsr_msgs/RobotState.h>
#include <dsr_msgs/RobotStop.h>
#include <dsr_msgs/MoveJoint.h>
#include <dsr_msgs/MoveLine.h>
#include <dsr_msgs/MoveJointx.h>
#include <dsr_msgs/MoveCircle.h>
#include <dsr_msgs/MoveSplineJoint.h>
#include <dsr_msgs/MoveSplineTask.h>
#include <dsr_msgs/MoveBlending.h>
#include <dsr_msgs/MoveSpiral.h>
#include <dsr_msgs/MovePeriodic.h>
#include <dsr_msgs/MoveWait.h>
#include "dsr_util.h"
#include "dsr_robot.h"
Go to the source code of this file.
Functions | |
int | amove_periodic (float fAmplitude[NUM_TASK], float fPeriodic[NUM_TASK], float fAccelTime=0.f, int nRepeat=1, int nMoveReference=MOVE_REFERENCE_TOOL, int nSyncType=1) |
int | amove_spiral (float fRevolution, float fMaxRadius, float fMaxLength, float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, int nTaskAxis=TASK_AXIS_Z, int nMoveReference=MOVE_REFERENCE_TOOL, int nSyncType=1) |
int | amoveb (MOVE_POSB *fTargetPos, int nPosCount, float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nSyncType=1) |
int | amovec (float fTargetPos[2][NUM_TASK], float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSyncType=1) |
int | amovej (float fTargetPos[NUM_JOINT], float fTargetVel, float fTargetAcc, float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSyncType=1) |
int | amovejx (float fTargetPos[NUM_TASK], float fTargetVel, float fTargetAcc, float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSolSpace=0, int nSyncType=1) |
int | amovel (float fTargetPos[NUM_JOINT], float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSyncType=1) |
int | amovesj (float fTargetPos[MAX_SPLINE_POINT][NUM_JOINT], int nPosCount, float fTargetVel, float fTargetAcc, float fTargetTime=0.f, int nMoveMode=MOVE_MODE_ABSOLUTE, int nSyncType=1) |
int | amovesx (float fTargetPos[MAX_SPLINE_POINT][NUM_TASK], int nPosCount, float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nVelOpt=SPLINE_VELOCITY_OPTION_DEFAULT, int nSyncType=1) |
int | main (int argc, char **argv) |
int | move_periodic (float fAmplitude[NUM_TASK], float fPeriodic[NUM_TASK], float fAccelTime=0.f, int nRepeat=1, int nMoveReference=MOVE_REFERENCE_TOOL, int nSyncType=0) |
int | move_spiral (float fRevolution, float fMaxRadius, float fMaxLength, float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, int nTaskAxis=TASK_AXIS_Z, int nMoveReference=MOVE_REFERENCE_TOOL, int nSyncType=0) |
int | move_wait () |
int | moveb (MOVE_POSB *fTargetPos, int nPosCount, float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nSyncType=0) |
int | movec (float fTargetPos[2][NUM_TASK], float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSyncType=0) |
int | movej (float fTargetPos[NUM_JOINT], float fTargetVel, float fTargetAcc, float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSyncType=0) |
int | movejx (float fTargetPos[NUM_TASK], float fTargetVel, float fTargetAcc, float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSolSpace=0, int nSyncType=0) |
int | movel (float fTargetPos[NUM_JOINT], float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, float fBlendingRadius=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nBlendingType=BLENDING_SPEED_TYPE_DUPLICATE, int nSyncType=0) |
int | movesj (float fTargetPos[MAX_SPLINE_POINT][NUM_JOINT], int nPosCount, float fTargetVel, float fTargetAcc, float fTargetTime=0.f, int nMoveMode=MOVE_MODE_ABSOLUTE, int nSyncType=0) |
int | movesx (float fTargetPos[MAX_SPLINE_POINT][NUM_TASK], int nPosCount, float fTargetVel[2], float fTargetAcc[2], float fTargetTime=0.f, int nMoveReference=MOVE_REFERENCE_BASE, int nMoveMode=MOVE_MODE_ABSOLUTE, int nVelOpt=SPLINE_VELOCITY_OPTION_DEFAULT, int nSyncType=0) |
void | msgRobotState_cb (const dsr_msgs::RobotState::ConstPtr &msg) |
void | SET_ROBOT (string id, string model) |
void | SigHandler (int sig) |
void | thread_subscriber () |
Variables | |
string | ROBOT_ID = "dsr01" |
string | ROBOT_MODEL = "m1013" |
std::string | temp_data = "" |
int amove_periodic | ( | float | fAmplitude[NUM_TASK], |
float | fPeriodic[NUM_TASK], | ||
float | fAccelTime = 0.f , |
||
int | nRepeat = 1 , |
||
int | nMoveReference = MOVE_REFERENCE_TOOL , |
||
int | nSyncType = 1 |
||
) |
Definition at line 442 of file dsr_basic_test.cpp.
int amove_spiral | ( | float | fRevolution, |
float | fMaxRadius, | ||
float | fMaxLength, | ||
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
int | nTaskAxis = TASK_AXIS_Z , |
||
int | nMoveReference = MOVE_REFERENCE_TOOL , |
||
int | nSyncType = 1 |
||
) |
Definition at line 406 of file dsr_basic_test.cpp.
int amoveb | ( | MOVE_POSB * | fTargetPos, |
int | nPosCount, | ||
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nSyncType = 1 |
||
) |
Definition at line 370 of file dsr_basic_test.cpp.
int amovec | ( | float | fTargetPos[2][NUM_TASK], |
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSyncType = 1 |
||
) |
Definition at line 222 of file dsr_basic_test.cpp.
int amovej | ( | float | fTargetPos[NUM_JOINT], |
float | fTargetVel, | ||
float | fTargetAcc, | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSyncType = 1 |
||
) |
Definition at line 80 of file dsr_basic_test.cpp.
int amovejx | ( | float | fTargetPos[NUM_TASK], |
float | fTargetVel, | ||
float | fTargetAcc, | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSolSpace = 0 , |
||
int | nSyncType = 1 |
||
) |
Definition at line 161 of file dsr_basic_test.cpp.
int amovel | ( | float | fTargetPos[NUM_JOINT], |
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSyncType = 1 |
||
) |
Definition at line 124 of file dsr_basic_test.cpp.
int amovesj | ( | float | fTargetPos[MAX_SPLINE_POINT][NUM_JOINT], |
int | nPosCount, | ||
float | fTargetVel, | ||
float | fTargetAcc, | ||
float | fTargetTime = 0.f , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nSyncType = 1 |
||
) |
Definition at line 266 of file dsr_basic_test.cpp.
int amovesx | ( | float | fTargetPos[MAX_SPLINE_POINT][NUM_TASK], |
int | nPosCount, | ||
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nVelOpt = SPLINE_VELOCITY_OPTION_DEFAULT , |
||
int | nSyncType = 1 |
||
) |
Definition at line 314 of file dsr_basic_test.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
ros::Subscriber subRobotState = nh.subscribe("/"+ROBOT_ID +ROBOT_MODEL+"/state", 100, msgRobotState_cb);
Definition at line 587 of file dsr_basic_test.cpp.
int move_periodic | ( | float | fAmplitude[NUM_TASK], |
float | fPeriodic[NUM_TASK], | ||
float | fAccelTime = 0.f , |
||
int | nRepeat = 1 , |
||
int | nMoveReference = MOVE_REFERENCE_TOOL , |
||
int | nSyncType = 0 |
||
) |
Definition at line 413 of file dsr_basic_test.cpp.
int move_spiral | ( | float | fRevolution, |
float | fMaxRadius, | ||
float | fMaxLength, | ||
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
int | nTaskAxis = TASK_AXIS_Z , |
||
int | nMoveReference = MOVE_REFERENCE_TOOL , |
||
int | nSyncType = 0 |
||
) |
Definition at line 377 of file dsr_basic_test.cpp.
int move_wait | ( | ) |
Definition at line 448 of file dsr_basic_test.cpp.
int moveb | ( | MOVE_POSB * | fTargetPos, |
int | nPosCount, | ||
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nSyncType = 0 |
||
) |
Definition at line 321 of file dsr_basic_test.cpp.
int movec | ( | float | fTargetPos[2][NUM_TASK], |
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSyncType = 0 |
||
) |
Definition at line 168 of file dsr_basic_test.cpp.
int movej | ( | float | fTargetPos[NUM_JOINT], |
float | fTargetVel, | ||
float | fTargetAcc, | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSyncType = 0 |
||
) |
Definition at line 44 of file dsr_basic_test.cpp.
int movejx | ( | float | fTargetPos[NUM_TASK], |
float | fTargetVel, | ||
float | fTargetAcc, | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSolSpace = 0 , |
||
int | nSyncType = 0 |
||
) |
Definition at line 131 of file dsr_basic_test.cpp.
int movel | ( | float | fTargetPos[NUM_JOINT], |
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
float | fBlendingRadius = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE , |
||
int | nSyncType = 0 |
||
) |
Definition at line 87 of file dsr_basic_test.cpp.
int movesj | ( | float | fTargetPos[MAX_SPLINE_POINT][NUM_JOINT], |
int | nPosCount, | ||
float | fTargetVel, | ||
float | fTargetAcc, | ||
float | fTargetTime = 0.f , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nSyncType = 0 |
||
) |
Definition at line 229 of file dsr_basic_test.cpp.
int movesx | ( | float | fTargetPos[MAX_SPLINE_POINT][NUM_TASK], |
int | nPosCount, | ||
float | fTargetVel[2], | ||
float | fTargetAcc[2], | ||
float | fTargetTime = 0.f , |
||
int | nMoveReference = MOVE_REFERENCE_BASE , |
||
int | nMoveMode = MOVE_MODE_ABSOLUTE , |
||
int | nVelOpt = SPLINE_VELOCITY_OPTION_DEFAULT , |
||
int | nSyncType = 0 |
||
) |
Definition at line 273 of file dsr_basic_test.cpp.
void msgRobotState_cb | ( | const dsr_msgs::RobotState::ConstPtr & | msg | ) |
Definition at line 469 of file dsr_basic_test.cpp.
void SET_ROBOT | ( | string | id, |
string | model | ||
) |
Definition at line 40 of file dsr_basic_test.cpp.
void SigHandler | ( | int | sig | ) |
Definition at line 565 of file dsr_basic_test.cpp.
void thread_subscriber | ( | ) |
Definition at line 550 of file dsr_basic_test.cpp.
string ROBOT_ID = "dsr01" |
Definition at line 38 of file dsr_basic_test.cpp.
string ROBOT_MODEL = "m1013" |
Definition at line 39 of file dsr_basic_test.cpp.
std::string temp_data = "" |
Definition at line 42 of file dsr_basic_test.cpp.