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>;
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.
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.