Motion concepts
In this document we will go over different types of motion that can be achieved by Dorna. We will explain the basic concepts that you need to understand before choosing the right motion type and parameters for your application.
Coordinate system
The first concept in the design of a motion for a robotic arm is the coordinate system of the robot. Dorna (and most other robotic arms) work in two different coordinate systems. The first one is the joints coordinate system and the second one is the Cartesian coordinate system. Motion commands can be sent in either coordinate system and it is a user's choice to decide which one to work with.
Joints space
Joint coordinate system is the representation of the robot position in the space using the values of its joints. We use degree as the unit of each joint value. Dorna has 5 independent joints and there are 3 auxiliary joints that can be controlled by the controller for extra motors. The joints are denoted by j0, j1, j2, j3, j4
for the robot coordinates and j5, j6, j7
for the auxiliary axes. Intuitively, each joint is measured as the angle from a link to the previous link of the robot. The robot when all joints are zero and the direction of the joints is shown in the following image.
There is a physical limit for each joint of the robot as follows.
Joint | Range of motion | Lower limit | Upper limit |
---|---|---|---|
j0 | 355 | -175 | 180 |
j1 | 270 | -90 | 180 |
j2 | 284 | -142 | 142 |
j3 | 270 | -135 | 135 |
j4 | Infinite | N/A | N/A |
Cartesian space
Cartesian coordinate system corresponds to the Cartesian coordinates of the robot toolhead with respect to the origin point that is the bottom center of the robot in the three dimensional space. The coordinates are presented as x, y, z, a, b
for the robot and c, d, e
for the auxiliary axes. The first three coordinates of the robot are the x, y, z
which are the respective coordinate values in milimiter. a
is the rotation of the robot toolhead with respect to the ground, in degrees. b
is the same as value of j4
, which is the rotation of the last joint of the robot in degrees. For the auxiliary axes also their value in Cartesian space is the same as their value in joints space. The following picture shows the reference point and the Cartesian coordinates with respect to it.
You can send the relevant coordinates of any motion command in both joints space or in Cartesian space. The controller first look for coordinates in joints space and if it does not find them in joints space it will look for coordinates in Cartesian space.
Type of motions
Dorna 2 has two general types of motions. They are line and circle. These two types can be either in joints space or in Cartesian space. Here we explain these two types in more details and the commands that generate these two motions.
Line in joints space
jmove
and rmove
are the commands for moving the robot from a starting point to a destination point while the joints move on a line in the joints space. This command is usually used when the trajectory of the motion is not important in the application and it is only important to end the motion at the specified destination point.
jmove
andrmove
traverse the shortest distance (in terms of motors rotation), between two points. Therefore, they are better choice for high speed applications.
The difference between
jmove
andrmove
is how the speed, acceleration and jerk parameters are interpreted in the command. You can specify these parameters as absolute values injmove
, while inrmove
their values will be interpreted as the ratio between their absolute value and their maximum value in the specific motion.
Line in Cartesian space
lmove
command will move the robot head in Cartesian space. The following picture shows traverse from A
to B
on a line in joints space and Cartesian space.
Circle
Circle is a set of points in space that are at the same distance from a center point and live on a plane. In Dorna 2, a circle is uniquely specified with three points:
- the initial point of the circle, which is the current position of the robot,
- the final point of the circle, which is the final position of the move,
- a midpoint of the circle, which is a point that the circle will pass through it before reaching to the final point.
Another parameter of the circle is turn
, which specifies how many full turn the robot will make in addition to the initial partial circle that connects the initial point to the final point through the midpoint.
In addition to the initial point and final point of the circle, you will need to specify the space
in which the circle lives in. You can choose between joints space and Cartesian space.
Circle has another parameter called dim
which is the dimension of the circle. The dimension can be any number from 1 to 8. If the user sets the dimension to a number n
, the circle will be formed using the first n
coordinates of the space. Therefore, the first n
coordinates of the robot will move on a circle, and all other coordinates will move along a line that is drawn between the initial point of the circle and final point of the circle. Using the dim
, value, and turn
values larger than 1, you can make the robot move along spiral path. For example, the following picture shows the trajectory of a circle in Cartesian space that is drawn in x,y
coordinates (dim = 2
) and with all other coordinates (z, a, b
) moving on a line with turn = 3
for 3 full turns.
Only the first
dim
coordinates of the midpoint matter in a circle move. All other coordinates of the midpoint are irrelevant and will be ignored in the circle.
Dynamic of a motion
Each motion command has associated parameters that define the dynamic of the motion along its trajectory. These parameters are the following:
vel
, which is the maximum velocity along the trajectory.accel
, which is the maximum acceleration while speeding up and slowing down at the beginning and end of motion.jerk
, which is the maximum value of jerk used in motion planning (jerk is the derivative of acceleration).
Depending on the space that the motion is defined in, the unit of these parameters will vary. In Joints space, vel
is in deg/sec
, accel
is in deg/sec^2
and accel
is in deg/sec^3
. In Cartesian space, vel
is in mm/s
, accel
is in mm/sec^2
, and jerk
is in mm/sec^3
.
How to pick the right value
Ususally, by trial and error you will find the optimal value of velocity, acceleration and jerk in your motion command. The optimal values will result in a motion that is done in the shortest amount of the time and has a smooth start and end. Here we will provide few guidelines to pick the (near) optimal values for your application.
- Start by a moderate values of
vel
,accel
andjerk
. In joints space, moderate value forvel
in a typical move command is 100, moderateaccel
value is 700 and moderatejerk
value is 3000. In Cartesian space, these values are 200, 2000, and 8000, respectively. - Increase or decrease
vel
, depending on your load. For higher payloads (larger than 0.75 Kg), you should limit maxvel
to 250 in joints space and 500 in Cartesian space. For smaller payload, you can increase thevel
to 500 in joints space and 1000 in Cartesian space. - Increase or decrease
accel
values based on the load.accel
value defines how fast you will reach to the maximum speed and is limited by the torque that motors can generate. For smaller loads, limitaccel
to 3000 in joints space and 5000 in Cartesian space. For higher loads limit it to 1000 in joints space and 2000 in Cartesian space. - Increase or decrease
jerk
, depending on the jerkyness of the motion with the determinedvel
andaccel
parameters.jerk
parameter plays a big role in the final quality of the motion, specially at the start and stop. Higher jerk values translate into more vibration at the start and stop. Lower jerk values, translate into vibration free and smooth motion. Increase or decreasejerk
to find the desired motion quality. For larger loadsjerk
should be limited to 5000 in joints space and 10000 in Cartesian space. For smaller loads, jerk should be limited to 10000 in joints space and 50000 in Cartesian space. - For more optimal results, you can go over the steps above once more from the beginning.
Parameter | Moderate value (Joints / Cartesian) | Upper limit for small loads (Joints / Cartesian) | Upper limit for high loads (Joints / Cartesian) |
---|---|---|---|
vel | 100 / 200 | 500 / 1000 | 250 / 500 |
accel | 700 / 2000 | 3000 / 5000 | 1000 / 3000 |
jerk | 3000 / 8000 | 10000 / 50000 | 5000 / 10000 |
Continuous motion
In many applications you will need to create complex trajectory shapes beyond line or circle. In some other applications, you might need to create continues transition from one motion to another motion without full stop at the end of each motion. Dorna 2 motion planner makes it possible by an advanced feature called continuous motion
.
With continuous feature is on
, the controller, will connect each new motion to the previous motion that it has in its queue. As soon as the controller run out of motion commands in its queue, it will stop at the end of the last command.
Continuous motion, only applies to line commands in the same space. In other words, it can only connect jmove
commands or lmove
commands together. If after a jmove
command, there is an lmove
command, the robot will stop at the end of the jmove
command, and will start from stop with the lmove
command, and vice versa.
Since by physics laws, it is impossible to traverse two lines that are not colinear in space, without a full stop at the sharp corner, continuous motion
feature, do two things to traverse connecting lines smoothly:
- make the corners of connecting lines rounded by replacing the corner with a smooth curve that gragually changes direction from one line to the next. The user can control over the radius of the rounded corner by changing parameter
corner
of the move commands. - it reduces speed before entering the curve and on the curve, so the centrifugal force does not exceed the maximum allowable amount as dictated by the maximum acceleration of the motion command. The speed reduction at the corners depend on the speed of the leading line to the corner, the max acceleration, indicated by
accel
of the leading line to the corner and the provided corner radius indicated by parametercorner
.
To make the corners traverse smoother, reduce the acceleration of the line or increase the radius of the corner.
corner
andaccel
parameters provide a tradeoff between how closely track the original trajectory vs. how much the speed is reduced at corners. Larger corner radius or smaller acceleration both will make smoother corner traverses. First one will preserve the speed, while the second will follow the original path closer.
The path planner engine in Dorna 2, can plan continuous transition between lines if at the time of planning the command for the first line, there is another command for the second line is in its queue. For realtime applications, where the commands are generated in realtime, it is recommended to use
lmove
commands for continuous motion applications as they need more time for processing in the controller queue and therefore they allow for more delay between the next command to arrive.
Absolute and relative
All move commands in Dorna 2 controller, can accept coordinates in both absolute
and relative
form. The relevant parameter in motion commands is rel
. When rel
is set to 1, all coordinates presented in the command (final point in line and final and mid points in circle) are relative to the initial point of the motion command. Whereas if the rel
parameter is set to 0, all coordinates in the command are interpreted as absolute values.