4.1. Research Environment
The Panther robot (
Figure 5a) is equipped with four Mecanum wheels with a radius of 85 [mm]. The dimensions of the robot are: 805 × 840 × 290 [mm] (length and width of the robot and height of the platform). The weight of the vehicle is 55 [kg] and its maximum payload is 80 [kg]. The robot has four BLDC 80PMB800K.80RBL motors (rated at 473 [W] each) with planetary gears and incremental encoders. The vehicle includes an internal control computer: Raspberry Pi 4B with Broadcom BCM2711 processor and a power source in the form of 36 [V] lithium-ion batteries. The maximum speed of the robot is: 2 [m/s] and the torque rating of each drive module is 34.5 [Nm].
For this experiment, a Dspace DS1103 control and measurement card was used to control the wheeled robot. The card allows the measurement and acquisition of data coming from encoders and distributed via the RS232 standard, and the real-time generation of control signals for the motors (PWM signal) that drive the Mecanum wheels. The control algorithm is generated in the Matlab/Simulink environment. The program is then compiled to the level of optimized code in C using the RTW (Real Time Workshop) package. Its implementation into the Dspace board is made possible using the RTI (Real Time Interface) package [
13].
The Unitree GO1 quadruped robot (
Figure 5b) has 12 degrees of freedom (consisting of 12 servos). The manufacturer indicates that the robot has the ability to control the position of each joint. This makes it possible to realize force control of the whole robot [
14]. The GO1 control itself can be realized manually using the supplied joystick or programmatically, using an API in C or Python language [
14]. The program that implements the robot’s movement is run on an external PC or on one of the embedded systems. These include a Raspberry PI computer and three Nvidia Jetson chips. The latter are connected to five cameras that form part of the robot’s sensorics. Software access to the images from the cameras can be realized through a provided API. The same software layer allows the use of other sensorics components: joint-related encoders, an IMU chip and distance sensors.
The Vicon motion capture measurement system used in the research allows accurate measurement of the tracked object based on a set of cameras tracking the position of markers placed on the tracked object. The entire system is equipped with 10 Vicon Vero v2.2 cameras, and it is not necessary for all of them to be used to carry out the measurements [
15]. Each camera has a Vicon 6-12 [mm] zoom lens, the camera resolution is 2.2 [MP] (2048x1088) and the frame rate is 330 [Hz]. The minimum viewing angle of the camera for the telephoto lens is: 44.1° x 22.6° (horizontal to vertical), and for a wide-angle lens: 98.1° x 50.1°. The camera latency is 3.6 [ms] and the weight is approximately 0.5 [kg]. The cameras are equipped with an accelerometer to support the calibration process and a temperature sensor. Connectivity to the cameras is possible using an RJ45 connector. The signals from all cameras go to the PoE Switch, which is connected to the computer. Then, using the Tracker 3.9 software [
15] it is possible to track, in real time, the position of an object with an accuracy of part of a millimeter [
16].
Figure 6.
Vicon Vero camera used for provided research.
Figure 6.
Vicon Vero camera used for provided research.
As can be seen from the diagram in
Figure 4, the agent in the example under consideration enables the transmission of object position data tracked by Vicon’s motion capture system. In this configuration (
Figure 7a), the input to the agent is the motion capture system and the thread associated with it processes the data from Vicon based on the UDP standard. The Vicon system tracked the position of the quadruped robot and the mobile robot (this measurement was only used to verify the measurement from odometry). In the Tracker program, dictated to the Vicon system, the IDs of the tracked robots were specified as 1pies and 2hus. The output of the RoboDataLink.py program is a frame that is transmitted via the RS232 standard to the Dspace card. Its structure is shown in
Figure 7b. In the first three fields of the frame, the translation (in millimeters) of the object relative to the underlying coordinate system is transmitted. The next three elements of the frame are the rotation (in radians) multiplied by one hundred and projected to ensure accuracy when projected onto integers. It should be noted that one frame contains position and orientation information for only one object, which means that the position information of the robots was delivered to the Dspace measurement card alternately. Which robot the frame refers to is derived from the values of half 7 and 8 of the frame, i.e., 100+ID, where ID corresponds to the digit preceding the name of the tracked robot. e.g., for object 1dog, the value of fields 7 and 8 is 101. The last field of the frame is the checksum calculated as the arithmetic mean of the translations projected to integer values (i.e., round((transX+transY+transZ)/3)).
As the processing times of the input and output threads (implemented programmatically as a delay function in an infinite loop) can be different, the link between the aforementioned threads is the buffer into which the frame is written.
4.2. Control Algorithm for a Mobile Wheeled Robot
The control algorithm of the Mecanum mobile wheeled robot performed the task of following a moving target, which was a quadruped mobile robot. In robotics, this task is called following a moving target.
In the literature, this task is often implemented together with an obstacle avoidance task to enable autonomous vehicle movement in an unknown environment. Most often, the task of following a target is implemented based on methods: machine learning [
18,
19,
20], fuzzy logic [
18,
21] artificial potential fields [
22,
23], predictive control [
24] or behavioral [
19,
20,
21,
22,
25]. Based on the scientific output of the team at the Department of Applied Mechanics and Robotics on the topic of autonomous motion control of a mobile robot [
22,
23,
26] a behavioral hierarchical robot control system was developed, taking into account the holonomy of the Mecanum wheeled robot and the time-varying position of the target.
The control system consists of two layers: an outer and an inner layer (
Figure 8). The outer layer enables the generation of the robot’s motion trajectory, which fulfils the task of following a preset moving target. The inner layer generates a control signal that enables the robot to follow the motion trajectory generated in the outer layer.
The outer layer uses a behavioral algorithm to allow the task: “follow the target”. To fulfil this task, distances were first determined between the position of the target, which is the quadruped robot, and the position of the mobile robot:
This is example 1 of an equation:
where:
—the position of the centre of gravity of the Mecanum wheeled mobile robot relative to a stationary xy reference system,
—position of the target, which is the characteristic point belonging to the mobile robot relative to the stationary xy reference system.
Figure 9.
Position of mobile robot and target.
Figure 9.
Position of mobile robot and target.
The position of the mobile robot was determined by reading the angular velocities of the robot wheels from the encoder sensors, while the positions of the target were read out based on the motion capture system used.
Based on the determined distance of the robot from the target (1), robot speed control signals were generated:
The control signal value has been scaled so that: , while maintaining the direction of the total vector of the speed control signal:
In the next step, the motion trajectory of the mobile robot with Mecanum wheels was generated. The velocity of the robot’s center of gravity was determined
relative to a stationary xy coordinate system was determined:
where:
—maximum linear velocity, which is given by the formula:
.
Based on the kinematics model of the four-wheeled mobile robot with Mecanum wheels [
25] and equation (3), the inverse kinematics was solved by generating the angular velocities of the Mecanum wheels:
where:
—angular velocities of the Mecanum wheels,
—angle of orientation of the robot frame,
—angular velocity of the robot frame,
—width of the robot platform,
—distance between the characteristic point
being the robot’s center of gravity and the front and rear axes of the robot,
—radius of the Mecanum wheel,
—radius of the roller.
Due to the Mecanum wheeled robot’s classification as a holonomic object, it is able to achieve any given linear velocity in two-dimensional space without having to change the orientation angle of the vehicle frame. Therefore, the rotation angle of the robot frame was assumed to be constant at zero: .
The angular velocities of the wheels obtained from equation (4) will be used as set motion parameters in the internal control layer.
In the inner layer of the control system, a tracking control task was performed, in which the angular parameters of the Mecanum wheels are supposed to follow the set angular parameters generated from the outer layer. In order to perform this task and to demonstrate the effectiveness of the developed control algorithm, one of the simplest control algorithms was used in the form of a PD controller, described by the formula:
where:
—diagonal matrix of the differential gain. The generalised error
and tracking error e, are defined by the relations:
where:
—the vector of set angles of rotation of the Mecanum wheels,
—vector of realised angles of rotation of the Mecanum wheels,
—diagonal matrix with positive elements
.
Based on realised rotation angle of the Mecanum wheels read from the encoders and on the robot’s movement trajectory generated in the outer layer, it is possible to control the mobile robot so that it carries out the task of following a moving target.
4.3. Results
In the experimental study, the target, which was a quadruped robot, was controlled manually. Together with the motion capture system Vicon, which determined its positions, it constituted a single CPS. The Panther mobile robot, which was tasked with autonomously following the moving target based on the reading of its position from encoder sensors placed on the motor shaft driving the Mecanum wheels, constituted a second CPS. Data exchange, i.e., the position reading of the Unitree GO1 robot in the Dspace card, was possible through the use of an agent, i.e., the RoboDataLink.py application.
Figure 10,
Figure 11,
Figure 12 and
Figure 13 show the experimental results of how the task of following moving target by the mobile robot is achieved by using the outer layer of the control system (
Figure 10 and
Figure 12) as well as the inner layer (
Figure 13).
Figure 10 shows the waveforms describing the position of the mobile robot and the target with respect to the axis of the stationary xy coordinate system. It can be seen from Figs. 10a and 10b that the position of the mobile robot changes over time, following the position of the moving target. The fact that the coordinates of the mobile robot do not reach the position of the quadruped robot is due to the need to maintain a safe distance between the robots. The apparent distortion of the target position waveform occurring around 40 [s] is due to a temporary misreading of the position generated from the motion capture system, which may have been caused by the obscuration of the markers placed on the quadruped robot.
Figure 11 shows the motion track read from the encoders and the motion track read from the motion capture system. The position of the robot from the motion capture system was used to verify the odometry measurement of the robot. Position determination by the Vicon system was performed by the RoboDataLink.py application, as part of the described communication between the CPS systems described in Section 3.1. The obtained waveforms are analogous in shape, but there is a relative shift of the graphs by approximately 0.75 [m] with respect to the
y-axis. The reason for this situation is most likely the temporary loss of contact between the Mecanum wheels and the ground that was observed during the experimental tests.
Figure 12a shows the distances between the position of the target and the position of the mobile robot.
Based on the distance measurement, a robot speed control signal is generated (
Figure 12b). A motion trajectory is then generated, from which the obtained Mecanum wheel rotation angles (
Figure 12c) and angular velocities (
Figure 12d) are sent to the internal control layer. In
Figure 12a, the apparent distance to the target, excluding the initial phase of movement, oscillates between -2 and 2 [m], indicating that the robot is effectively trying to follow the changing position of the target. In Figs. 12c and 12d, the generated waveforms of the angular motion parameters are the same for the wheel pair 1, 4 and 2, 3. This is due to the assumption made regarding the constant orientation angle of the robot frame (
). The angular velocities of the Mecanum wheels assume a non-zero value in the final phase of the experiment. This is due to the fact that the position of the target is continuously variable, so that the mobile robot does not perform a braking process before the end of experiment. The maximum accepted duration of the experiment was approximately 45 [s], after which time the robot stopped.
Figure 13a shows the waveforms of the control signals generated by the PD controller in the inner layer of the control system. The waveforms of the Mecanum wheel angle tracking error (
Figure 13b) and angular velocity (
Figure 13c) are relatively small and limited, which indicates the stability of the control system. The sudden increase in angular velocity error observed at about 40 [s] is due to the occurrence of the previously discussed error in reading the target position affecting the sudden change in the set angular parameters of the robot’s movement.
The presented experimental results confirm the effectiveness of the presented control algorithm in performing the task of following a moving target. Furthermore, the experiment confirmed the feasibility of using RoboDataLink.py as an agent for communication between CPS systems.