movesj()
Features
The robot moves along a spline curve path that connects the current position to the target position (the last waypoint in pos_list) via the waypoints of the joint space input in pos_list.
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.
Parameters
Parameter Name | Data Type | Default Value | Description |
pos_list | list (posj) | - | posj list |
vel (v) | float | None | velocity(same to all axes) or velocity(to an axis) |
list (float[6]) | |||
acc (a) | float | None | acceleration (same to all axes) or acceleration (acceleration to an axis) |
list (float[6]) | |||
time (t) | float | None | Reach time [sec] |
mod | int | DR_MV_MOD_ABS | Movement basis
|
Note
- Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
- _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by set_velj.)
- _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by set_accj.)
- If the time is specified, values are processed based on time, ignoring vel and acc.
- If the time is None, it is set to 0.
- If the mod is DR_MV_MOD_REL, each pos in the pos_list is defined in the relative coordinate of the previous pos. (If pos_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 q(n-1).)
- This function does not support online blending of previous and subsequent motions.
Return
Value | Description |
---|---|
0 | Success |
Negative value | Error |
Exception
Exception | Description |
---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data type error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
Example
#CASE 1) Absolute angle input (mod= DR_MV_MOD_ABS)
q0 = posj(0,0,0,0,0,0)
movej(q0, vel=30, acc=60) # Moves in joint motion to the initial position (q0).
q1 = posj(10, -10, 20, -30, 10, 20) # Defines the posj variable (joint angle) q1.
q2 = posj(25, 0, 10, -50, 20, 40)
q3 = posj(50, 50, 50, 50, 50, 50)
q4 = posj(30, 10, 30, -20, 10, 60)
q5 = posj(20, 20, 40, 20, 0, 90)
qlist = [q1, q2, q3, q4, q5] # Defines the list (qlist) which is a set of q1-q5 as the waypoints.
movesj(qlist, vel=30, acc=100)
# Moves the spline curve that connects the waypoints defined in the qlist.
# with a maximum velocity of 30(mm/sec) and maximum acceleration of 100(mm/sec2)
#CASE 2) Relative angle input (mod= DR_MV_MOD_REL)
q0 = posj(0,0,0,0,0,0)
movej(q0, vel=30, acc=60) # Moves in joint motion to the initial position (q0).
dq1 = posj(10, -10, 20, -30, 10, 20) # Defines dq1 (q1=q0+dq1) as the relative joint angle of q0
dq2 = posj(15, 10, -10, -20, 10, 20) # Defines dq2 (q2=q1+dq2) as the relative joint angle of q1
dq3 = posj(25, 50, 40, 100, 30, 10) # Defines dq3 (q3=q2+dq3) as the relative joint angle of q2
dq4 = posj(-20, -40, -20, -70, -40, 10) # Defines dq4 (q4=q3+dq4) as the relative joint angle of q3
dq5 = posj(-10, 10, 10, 40, -10, 30) # Defines dq5 (q5=q4+dq5) as the relative joint angle of q4
dqlist = [dq1, dq2, dq3, dq4, dq5]
# Defines the list (dqlist) which is a set of q1-q5 as the relative waypoints.
movesj(dqlist, vel=30, acc=100, mod= DR_MV_MOD_REL )
# Moves the spline curve that connects the relative waypoints defined in the dqlist
# with a maximum velocity of 30(mm/sec) and maximum acceleration of 100(mm/sec2) (same motion as CASE-1).