11 #include <boost/thread/thread.hpp> 17 #include <dsr_msgs/RobotState.h> 18 #include <dsr_msgs/RobotStop.h> 20 #include <dsr_msgs/MoveJoint.h> 21 #include <dsr_msgs/MoveLine.h> 22 #include <dsr_msgs/MoveJointx.h> 23 #include <dsr_msgs/MoveCircle.h> 24 #include <dsr_msgs/MoveSplineJoint.h> 25 #include <dsr_msgs/MoveSplineTask.h> 26 #include <dsr_msgs/MoveBlending.h> 27 #include <dsr_msgs/MoveSpiral.h> 28 #include <dsr_msgs/MovePeriodic.h> 29 #include <dsr_msgs/MoveWait.h> 32 #include "dsr_robot.h" 42 int movej(
float fTargetPos[NUM_JOINT],
float fTargetVel,
float fTargetAcc,
float fTargetTime = 0.f,
float fBlendingRadius = 0.f,
43 int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSyncType = 0)
49 dsr_msgs::MoveJoint srv;
51 for(
int i=0; i<NUM_JOINT; i++)
52 srv.request.pos[i] = fTargetPos[i];
53 srv.request.vel = fTargetVel;
54 srv.request.acc = fTargetAcc;
55 srv.request.time = fTargetTime;
56 srv.request.radius = fBlendingRadius;
57 srv.request.mode = nMoveMode;
58 srv.request.blendType = nBlendingType;
59 srv.request.syncType = nSyncType;
66 if(srvMoveJoint.call(srv))
69 return (srv.response.success);
73 ROS_ERROR(
"Failed to call service dr_control_service : move_joint\n");
78 int amovej(
float fTargetPos[NUM_JOINT],
float fTargetVel,
float fTargetAcc,
float fTargetTime = 0.f,
float fBlendingRadius = 0.f,
79 int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSyncType = 1)
81 return movej(fTargetPos, fTargetVel, fTargetAcc, fTargetTime, fBlendingRadius, nMoveMode, nBlendingType, 1);
85 int movel(
float fTargetPos[NUM_JOINT],
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
float fBlendingRadius = 0.f,
86 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSyncType = 0)
90 dsr_msgs::MoveLine srv;
92 for(
int i=0; i<NUM_JOINT; i++)
93 srv.request.pos[i] = fTargetPos[i];
94 for(
int i=0; i<2; i++){
95 srv.request.vel[i] = fTargetVel[i];
96 srv.request.acc[i] = fTargetAcc[i];
98 srv.request.time = fTargetTime;
99 srv.request.radius = fBlendingRadius;
100 srv.request.ref = nMoveReference;
101 srv.request.mode = nMoveMode;
102 srv.request.blendType = nBlendingType;
103 srv.request.syncType = nSyncType;
105 ROS_INFO(
"service call: /dsr01m1013/motion/move_line");
106 ROS_INFO(
" <pos> %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",srv.request.pos[0],srv.request.pos[1],srv.request.pos[2],srv.request.pos[3],srv.request.pos[4],srv.request.pos[5]);
107 ROS_INFO(
" <vel> %7.3f,%7.3f <acc> %7.3f,%7.3f <time> %7.3f",srv.request.vel[0],srv.request.vel[1],srv.request.acc[0],srv.request.acc[1], srv.request.time);
108 ROS_INFO(
" <mode> %d, <ref> %d, <radius> %7.3f, <blendType> %d",srv.request.mode,srv.request.ref, srv.request.radius, srv.request.blendType);
110 if(srvMoveLine.call(srv))
113 return (srv.response.success);
117 ROS_ERROR(
"Failed to call service dr_control_service : move_line\n");
122 int amovel(
float fTargetPos[NUM_JOINT],
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
float fBlendingRadius = 0.f,
123 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSyncType = 1)
125 return movel(fTargetPos, fTargetVel, fTargetAcc, fTargetTime, fBlendingRadius, nMoveReference, nMoveMode, nBlendingType, 1);
129 int movejx(
float fTargetPos[NUM_TASK],
float fTargetVel,
float fTargetAcc,
float fTargetTime=0.f,
float fBlendingRadius = 0.f,
130 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSolSpace = 0,
int nSyncType = 0)
134 dsr_msgs::MoveJointx srv;
136 for(
int i=0; i<NUM_TASK; i++)
137 srv.request.pos[i] = fTargetPos[i];
138 srv.request.vel = fTargetVel;
139 srv.request.acc = fTargetAcc;
140 srv.request.time = fTargetTime;
141 srv.request.radius = fBlendingRadius;
142 srv.request.ref = nMoveReference;
143 srv.request.mode = nMoveMode;
144 srv.request.blendType = nBlendingType;
145 srv.request.sol = nSolSpace;
147 if(srvMoveJointx.call(srv))
150 return (srv.response.success);
154 ROS_ERROR(
"Failed to call service dr_control_service : move_jointx\n");
159 int amovejx(
float fTargetPos[NUM_TASK],
float fTargetVel,
float fTargetAcc,
float fTargetTime=0.f,
float fBlendingRadius = 0.f,
160 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSolSpace = 0,
int nSyncType = 1)
162 return movejx(fTargetPos, fTargetVel, fTargetAcc, fTargetTime, fBlendingRadius, nMoveReference, nMoveMode, nBlendingType, nSolSpace, 1);
166 int movec(
float fTargetPos[2][NUM_TASK],
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
float fBlendingRadius = 0.f,
167 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSyncType = 0)
172 dsr_msgs::MoveCircle srv;
173 std::vector<std_msgs::Float64MultiArray> poses;
174 std_msgs::Float64MultiArray pos;
175 for(
int i=0; i<2; i++){
177 for(
int j = 0; j < NUM_TASK; j++){
178 pos.data.push_back(fTargetPos[i][j]);
180 poses.push_back(pos);
183 ROS_INFO(
" <xxx pos1> %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",fTargetPos[0][0],fTargetPos[0][1],fTargetPos[0][2],fTargetPos[0][3],fTargetPos[0][4],fTargetPos[0][5]);
184 ROS_INFO(
" <xxx pos2> %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",fTargetPos[1][0],fTargetPos[1][1],fTargetPos[1][2],fTargetPos[1][3],fTargetPos[1][4],fTargetPos[1][5]);
186 ROS_INFO(
" <pos1> %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",poses[0].data[0],poses[0].data[1],poses[0].data[2],poses[0].data[3],poses[0].data[4],poses[0].data[5]);
187 ROS_INFO(
" <pos2> %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",poses[1].data[0],poses[1].data[1],poses[1].data[2],poses[1].data[3],poses[1].data[4],poses[1].data[5]);
189 srv.request.pos = poses;
191 for(
int i=0; i<2; i++){
192 srv.request.vel[i] = fTargetVel[i];
193 srv.request.acc[i] = fTargetAcc[i];
195 srv.request.time = fTargetTime;
196 srv.request.radius = fBlendingRadius;
197 srv.request.ref = nMoveReference;
198 srv.request.mode = nMoveMode;
199 srv.request.blendType = nBlendingType;
200 srv.request.syncType = nSyncType;
202 ROS_INFO(
"service call: /dsr01m1013/motion/move_circle");
203 ROS_INFO(
" <pos1> %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",srv.request.pos[0].data[0],srv.request.pos[0].data[1],srv.request.pos[0].data[2],srv.request.pos[0].data[3],srv.request.pos[0].data[4],srv.request.pos[0].data[5]);
204 ROS_INFO(
" <pos2> %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",srv.request.pos[1].data[0],srv.request.pos[1].data[1],srv.request.pos[1].data[2],srv.request.pos[1].data[3],srv.request.pos[1].data[4],srv.request.pos[1].data[5]);
205 ROS_INFO(
" <vel> %7.3f,%7.3f <acc> %7.3f,%7.3f <time> %7.3f",srv.request.vel[0],srv.request.vel[1],srv.request.acc[0],srv.request.acc[1], srv.request.time);
206 ROS_INFO(
" <mode> %d, <ref> %d, <radius> %7.3f, <blendType> %d",srv.request.mode,srv.request.ref, srv.request.radius, srv.request.blendType);
208 if(srvMoveCircle.call(srv))
211 return (srv.response.success);
215 ROS_ERROR(
"Failed to call service dr_control_service : move_circle\n");
220 int amovec(
float fTargetPos[2][NUM_TASK],
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
float fBlendingRadius = 0.f,
221 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nBlendingType = BLENDING_SPEED_TYPE_DUPLICATE,
int nSyncType = 1)
223 return movec(fTargetPos, fTargetVel, fTargetAcc, fTargetTime, fBlendingRadius, nMoveReference, nMoveMode, nBlendingType, 1);
227 int movesj(
float fTargetPos[MAX_SPLINE_POINT][NUM_JOINT],
int nPosCount,
float fTargetVel,
float fTargetAcc,
float fTargetTime = 0.f,
228 int nMoveMode = MOVE_MODE_ABSOLUTE,
int nSyncType = 0)
232 dsr_msgs::MoveSplineJoint srv;
233 std::vector<std_msgs::Float64MultiArray> poses;
234 std_msgs::Float64MultiArray pos;
236 for(
int i = 0; i < MAX_SPLINE_POINT; i++){
238 for(
int j = 0; j < NUM_JOINT; j++){
239 pos.data.push_back(fTargetPos[i][j]);
241 poses.push_back(pos);
243 srv.request.pos = poses;
244 srv.request.posCnt = nPosCount;
246 srv.request.vel = fTargetVel;
247 srv.request.acc = fTargetAcc;
248 srv.request.time = fTargetTime;
249 srv.request.mode = nMoveMode;
250 srv.request.syncType = nSyncType;
252 if(srvMoveSplineJoint.call(srv))
255 return (srv.response.success);
259 ROS_ERROR(
"Failed to call service dr_control_service : move_spline_joint\n");
264 int amovesj(
float fTargetPos[MAX_SPLINE_POINT][NUM_JOINT],
int nPosCount,
float fTargetVel,
float fTargetAcc,
float fTargetTime = 0.f,
265 int nMoveMode = MOVE_MODE_ABSOLUTE,
int nSyncType = 1)
267 return movesj(fTargetPos, nPosCount, fTargetVel, fTargetAcc, fTargetTime, nMoveMode, 1);
271 int movesx(
float fTargetPos[MAX_SPLINE_POINT][NUM_TASK],
int nPosCount,
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
272 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nVelOpt = SPLINE_VELOCITY_OPTION_DEFAULT,
int nSyncType = 0)
276 dsr_msgs::MoveSplineTask srv;
277 std::vector<std_msgs::Float64MultiArray> poses;
278 std_msgs::Float64MultiArray pos;
280 for(
int i = 0; i < MAX_SPLINE_POINT; i++){
282 for(
int j = 0; j < NUM_TASK; j++){
283 pos.data.push_back(fTargetPos[i][j]);
285 poses.push_back(pos);
287 srv.request.pos = poses;
288 srv.request.posCnt = nPosCount;
290 for(
int i=0; i<2; i++){
291 srv.request.vel[i] = fTargetVel[i];
292 srv.request.acc[i] = fTargetAcc[i];
294 srv.request.time = fTargetTime;
295 srv.request.ref = nMoveReference;
296 srv.request.mode = nMoveMode;
297 srv.request.opt = nVelOpt;
298 srv.request.syncType = nSyncType;
300 if(srvMoveSplineTask.call(srv))
303 return (srv.response.success);
307 ROS_ERROR(
"Failed to call service dr_control_service : move_spline_task\n");
312 int amovesx(
float fTargetPos[MAX_SPLINE_POINT][NUM_TASK],
int nPosCount,
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
313 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nVelOpt = SPLINE_VELOCITY_OPTION_DEFAULT,
int nSyncType = 1)
315 return movesx(fTargetPos, nPosCount, fTargetVel, fTargetAcc, fTargetTime, nMoveReference, nMoveMode, nVelOpt, 1);
319 int moveb(MOVE_POSB* fTargetPos,
int nPosCount,
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
320 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nSyncType = 0)
324 dsr_msgs::MoveBlending srv;
326 std::vector<std_msgs::Float64MultiArray> segments;
327 std_msgs::Float64MultiArray segment;
329 for(
int i=0; i<nPosCount; i++){
330 segment.data.clear();
332 for(
int j=0; j<NUM_TASK; j++)
333 segment.data.push_back( fTargetPos[i]._fTargetPos[0][j]);
334 for(
int j=0; j<NUM_TASK; j++)
335 segment.data.push_back( fTargetPos[i]._fTargetPos[1][j]);
337 segment.data.push_back( fTargetPos[i]._iBlendType );
338 segment.data.push_back( fTargetPos[i]._fBlendRad );
340 segments.push_back(segment);
342 srv.request.segment = segments;
343 srv.request.posCnt = nPosCount;
345 for(
int i=0; i<2; i++){
346 srv.request.vel[i] = fTargetVel[i];
347 srv.request.acc[i] = fTargetAcc[i];
349 srv.request.time = fTargetTime;
350 srv.request.ref = nMoveReference;
351 srv.request.mode = nMoveMode;
352 srv.request.syncType = nSyncType;
354 if(srvMoveBlending.call(srv))
357 return (srv.response.success);
361 ROS_ERROR(
"Failed to call service dr_control_service : move_spline_blending\n");
368 int amoveb(MOVE_POSB* fTargetPos,
int nPosCount,
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
369 int nMoveReference = MOVE_REFERENCE_BASE,
int nMoveMode = MOVE_MODE_ABSOLUTE,
int nSyncType = 1)
371 return moveb(fTargetPos, nPosCount, fTargetVel, fTargetAcc, fTargetTime, nMoveReference, nMoveMode, 1);
375 int move_spiral(
float fRevolution,
float fMaxRadius,
float fMaxLength,
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
376 int nTaskAxis = TASK_AXIS_Z,
int nMoveReference = MOVE_REFERENCE_TOOL,
int nSyncType = 0)
380 dsr_msgs::MoveSpiral srv;
382 srv.request.revolution = fRevolution;
383 srv.request.maxRadius = fMaxRadius;
384 srv.request.maxLength = fMaxLength;
385 for(
int i=0; i<2; i++){
386 srv.request.vel[i] = fTargetVel[i];
387 srv.request.acc[i] = fTargetAcc[i];
389 srv.request.time = fTargetTime;
390 srv.request.taskAxis = nTaskAxis;
391 srv.request.ref = nMoveReference;
392 srv.request.syncType = nSyncType;
394 if(srvMoveSpiral.call(srv)){
396 return (srv.response.success);
399 ROS_ERROR(
"Failed to call service dr_control_service : move_spiral\n");
404 int amove_spiral(
float fRevolution,
float fMaxRadius,
float fMaxLength,
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
405 int nTaskAxis = TASK_AXIS_Z,
int nMoveReference = MOVE_REFERENCE_TOOL,
int nSyncType = 1)
407 return move_spiral(fRevolution, fMaxRadius, fMaxLength, fTargetVel, fTargetAcc, fTargetTime, nTaskAxis, nMoveReference, 1);
411 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)
415 dsr_msgs::MovePeriodic srv;
417 for(
int i=0; i<NUM_TASK; i++){
418 srv.request.amp[i] = fAmplitude[i];
419 srv.request.periodic[i] = fPeriodic[i];
421 srv.request.acc = fAccelTime;
422 srv.request.repeat = nRepeat;
423 srv.request.ref = nMoveReference;
424 srv.request.syncType = nSyncType;
426 if(srvMovePeriodic.call(srv))
429 return (srv.response.success);
433 ROS_ERROR(
"Failed to call service dr_control_service : move_periodic\n");
440 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)
442 return move_periodic(fAmplitude, fPeriodic, fAccelTime, nRepeat, nMoveReference, 1);
450 dsr_msgs::MoveWait srv;
452 if(srvMoveWait.call(srv))
455 return (srv.response.success);
459 ROS_ERROR(
"Failed to call service dr_control_service : move_wait\n");
469 static int sn_cnt =0;
472 if(0==(sn_cnt % 100))
474 ROS_INFO(
"________ ROBOT STATUS ________");
475 ROS_INFO(
" robot_state : %d", msg->robot_state);
476 ROS_INFO(
" robot_state_str : %s", msg->robot_state_str.c_str());
477 ROS_INFO(
" current_posj : %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f",msg->current_posj[0] ,msg->current_posj[1] ,msg->current_posj[2]
478 ,msg->current_posj[3] ,msg->current_posj[4] ,msg->current_posj[5] );
479 ROS_INFO(
" io_control_box : %d", msg->io_control_box);
482 ROS_INFO(
" access_control : %d", msg->access_control);
483 ROS_INFO(
" homming_completed : %d", msg->homming_completed);
484 ROS_INFO(
" tp_initialized : %d", msg->tp_initialized);
485 ROS_INFO(
" speed : %d", msg->speed);
486 ROS_INFO(
" mastering_need : %d", msg->mastering_need);
487 ROS_INFO(
" drl_stopped : %d", msg->drl_stopped);
488 ROS_INFO(
" disconnected : %d", msg->disconnected);
513 ROS_INFO(
"shutdown time! sig=%d",sig);
514 ROS_INFO(
"shutdown time! sig=%d",sig);
515 ROS_INFO(
"shutdown time! sig=%d",sig);
521 dsr_msgs::RobotStop msg;
523 msg.stop_mode = STOP_TYPE_QUICK;
524 pubRobotStop.publish(msg);
529 int main(
int argc,
char** argv)
532 string my_robot_id =
"dsr01";
533 string my_robot_model =
"m1013";
535 ROS_INFO(
"default arguments: dsr01 m1013");
539 ROS_ERROR(
"invalid arguments: <ns> <model> (ex) dsr01 m1013");
542 for (
int i = 1; i < argc; i++){
543 printf(
"argv[%d] = %s\n", i, argv[i]);
545 my_robot_id = argv[1];
546 my_robot_model = argv[2];
582 float p2[6]={0.0, 0.0, 90.0, 0.0, 90.0, 0.0};
584 float x1[6]={400, 500, 800.0, 0.0, 180.0, 0.0};
585 float x2[6]={400, 500, 500.0, 0.0, 180.0, 0.0};
586 float velx[2]={50, 50};
587 float accx[2]={100, 100};
589 float fCirclePos[2][6] = {{559,434.5,651.5,0,180,0}, {559,434.5,251.5,0,180,0}};
596 movel(x1, velx, accx);
597 movel(x2, velx, accx);
599 movec(fCirclePos, velx, accx);
608 ROS_INFO(
"dsr_basic_test_cpp finished !!!!!!!!!!!!!!!!!!!!!");
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)
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
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 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 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)
void msgRobotState_cb(const dsr_msgs::RobotState::ConstPtr &msg)
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 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)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
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 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 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 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 main(int argc, char **argv)
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 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)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
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)
virtual void spin(CallbackQueue *queue=0)
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)
void SET_ROBOT(string id, string model)
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)
ROSCPP_DECL void shutdown()
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 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 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)