The coordinate system is as follows
The figure below shows the complete control system for our delta roboter.
Lets start with the blue box at the bottom center of the diagram. This box represent the motors including the gears and the encoders. The encoders are defined as
Peripheral Input. This
Peripheral Inputs are described in the HAL configuration file, see Hardware Abstraction Layer. To initialize the encoder inputs, you have to call the constructor of the
Peripheral Input and add the respective
signalId from the HAL configuration file as parameter, e.g.
If the HAL is configured correctly, we get the current position in radian of each encoder. Next, the
Mux collects the three encoder values and puts them into an
AxisVector is defined as
using AxisVector = eeros::math::Matrix<3, 1>;
The mouse delivers a signal with four dimensions. As we do not use the fourth dimension (additional wheel would be necessary) we have to reduce the mouse signal to three dimensions with a special block. At the same time this block swaps x and y axis in order to adapt to the axis setup of the robot.
Direct Kinematic converts the position of the motors into cartesian coordinates of the TCP (target center point). The output now contains the x, y, z value of the TCP.
Now we switch to the left of the diagram. We have three possible sources for the setpoint.
PathPlanner, as the name says, plans the path to the next point. This is used for moving the robot from point A to point B.
CirclePlannermoves the robot in a circle with a given radius and speed.
Mouse Inputgets the movement of the mouse. We use this block to manually control the Delta robot. The output of the
Mouse Inputis an vector with 4 entries. We must reduce it to 3 containing x, y, z.
You have to make sure, that the path planner delivers a path with a acceleration and velocity which can in fact be achieved by the robot. If not, the arm might move in unpredictable ways. That is, moving from e.g. 0/5 to 5/5 must be made in a straight line.
The “Motor Model” gets the actual speed and the calculated torque as input, and outputs the desired voltage for each motor.
The “voltageSetPoint” serves for the initializing of the encoder. This block is no longer used after reaching Safety Level “systemReady”.
The drive signals to the motor are of type
PeripheralOutput. They are described in the HAL as well.