Features
This is a function for moving the robot along a spline curve path that connects the current position to the target position (the last waypoint) via the waypoints of the joint space. The input velocity/acceleration means the maximum velocity/acceleration in the path, and the acceleration and deceleration during the motion are determined according to the position of the waypoint.
Parameter
|
Parameter Name |
Data Type |
Default Value |
Description |
|
fTargetPos |
Float[MAX_SPLINE_POINT][6] |
- |
Maximum 100 waypoint list |
|
nPosCount |
unsigned char |
- |
Number of valid waypoints |
|
fTargetVel |
float/float[6] |
- |
Velocity |
|
fTargetAcc |
float/float[6] |
- |
Acceleration |
|
fTargetTime |
float |
0.f |
Reach Time [sec] |
|
eMoveMode |
enum.MOVE_MODE |
MOVE_MODE_ ABSOLUTE |
Refer to the Definition of Constant and Enumeration Type |
-
When fTargetTime is specified, values are processed based on fTargetTime, ignoringfTargetVel and fTargetAcc.
-
When eMoveMode is MOVE_MODE_RELATIVE, each pos of the position list is defined as a relative coordinate for the preceding pos. (If position list=[q1, q2, ...,q(n-1), q(n)], q1 is the relative angle of the starting point, while q(n) is the relative coordinate of pq(n-1))
-
This function does not support online blending of previous and subsequent motions.
Return
|
Value |
Description |
|
0 |
Error |
|
1 |
Success |
Example
// CASE 1 : Absolute coordinate input (mod=MOVE_MODE_ABSOLUTE)
float jpos[4][6];
float jvel=10;
float jacc=10;
int jposNum = 4;
jpos[0][0]=0; jpos[0][1]=0; jpos[0][2]=-30; jpos[0][3]=0; jpos[0][4]=-30; jpos[0][5]=0;
jpos[1][0]=90; jpos[1][1]=0; jpos[1][2]=0; jpos[1][3]=0; jpos[1][4]=0; jpos[1][5]=0;
jpos[2][0]=0; jpos[2][1]=0; jpos[2][2]=-30; jpos[2][3]=0; jpos[2][4]=-30; jpos[2][5]=0;
jpos[3][0]=-90; jpos[3][1]=0; jpos[3][2]=0; jpos[3][3]=0; jpos[3][4]=0; jpos[3][5] = 0;
drfl.movesj(jpos, jposNum, jvel, jacc);
// Moves the spline curve that connects the absolute waypoints defined in the jpos
// with a maximum velocity of 10(deg/sec) and maximum acceleration of 10(deg/sec2)
// CASE 2 : Relative angle input (mod=MOVE_MODE_RELATIVE)
float jpos[4][6];
float jvel=10;
float jacc=10;
int jposNum = 4;
jpos[0][0]=0; jpos[0][1]=0; jpos[0][2]=-30; jpos[0][3]=0; jpos[0][4]=-30; jpos[0][5]=0;
// Start Position + jpos[0]
jpos[1][0]=90; jpos[1][1]=0; jpos[1][2]=30; jpos[1][3]=0; jpos[1][4]=30; jpos[1][5]=0;
// Start Position + jpos[0] + jpos[1]
jpos[2][0]=-90; jpos[2][1]=0; jpos[2][2]=-30; jpos[2][3]=0; jpos[2][4]=-30; jpos[2][5]=0;
// Start Position + jpos[0] + jpos[1] + jpos[2]
jpos [3][0]=-90; jpos [3][1]=0; jpos[3][2]=30; jpos[3][3]=0; jpos[3][4]=30; jpos[3][5]=0;
// Start Position + jpos[0] + jpos[1] + jpos[2] + jpos[3]
drfl.movesj(jpos, jposNum, jvel, jacc, time, MOVE_MODE_RELATIVE);
// Moves the spline curve that connects the relative waypoints defined in the jpos
// with a maximum velocity of 10(deg/sec) and maximum acceleration of 10(deg/sec2)