A low-cost table-top robot platform for measurement science education in robotics and artificial intelligence

Robotics and artificial intelligence represent highly interdisciplinary fields, which – in particular on the bachelor level - makes providing a strong fundamental background in the education challenging. With respect to lab exercises in measurement, one approach to provide interdisciplinary hands-on experience is to embed experiments for measurement science in a robotic context. We present a low-cost robot platform that can be used to address several measurement science and sensor topics


INTRODUCTION
Robots are entering more and more into our daily live and are attractive for young people interested in science and technology. Consequently, also the education at the bachelor and master level must adapt to the needs in this interdisciplinary subject. The importance of the link between different domains is also emphasized in a survey [1] stating that 57 % of the faculty believes that students in electrical engineering have deficiencies in kinematics and dynamics. Consequently, experiments for measurement science education that addresses kinematics and dynamics can help to overcome such issues and to cope with the rise of interdisciplinarity in engineering education [2] when aspects of kinematics and dynamics are considered in the design of the experiments.
Electrical engineering laboratory courses at the bachelor level typically consist of experiments involving basic electronics circuits, and measurement of circuit parameters such as currents, voltages, power and waveforms. Advanced laboratory courses for higher-semester students utilize analog and digital semiconductor devices such as transistors, op-amps, and microcontrollers. Experiments involving sensors typically involve dedicated interface circuitry, and the experimental activity consists in measuring the circuit output to determine the physical quantity. While these experiments are necessary for students to develop their basic knowledge in electrical engineering, they do not provide sufficient exposure to topics such as kinematics and sensor fusion algorithms.
Many low-cost, simple robot platforms are available off the shelf. A drawback of such systems is that the mechanical integration of various sensors requires substantial modifications making the whole system often fragile and delicate. Customized 3D printing allows to adjust the geometry to ideally host all sensor equipment and to obtain a rather robust setup. 3D printing has become an essential tool in robotics; therefore, lowcost printed platforms have been suggested to be used in education [3]. However, most of the related educational programs focus on higher level of robotics or mechanics, yet more is needed in education in measurement science. Aspects ABSTRACT Robotics and artificial intelligence represent highly interdisciplinary fields, which -in particular on the bachelor level -makes providing a strong fundamental background in the education challenging. With respect to lab exercises in measurement, one approach to provide interdisciplinary hands-on experience is to embed experiments for measurement science in a robotic context. We present a low-cost robot platform that can be used to address several measurement science and sensor topics, and also other aspects such as machine learning, actuators and mechanics. The 3D printed chassis can be equipped with different sensors for environment perception but also be adapted to different embedded PC platforms. In order to also introduce concepts of robot simulation and realization approaches in a hands-on fashion, the table-top robot is also available as a digital twin in the simulation environments Gazebo and CoppeliaSim®, where, e.g., limitations of simulations and required adaption of models to consider non ideal effects of sensors can be studied.
such as sensors and data acquisition and their practical use play an important role for engineers. These aspects should be addressed in the education of students in the field of robotics and artificial intelligence. Furthermore, it is also important to consider uncertainty and raise the awareness towards non-ideal effects present in real systems. Influences due to differences in various acquisition setups and measurement system can be studied using simulations of the system [4]. Additionally, the relevance of the uncertainty for so called "sim2real" approaches (e.g. [5]), which use simulations as a basis for the generation of training data for learning algorithms, can thus be emphasized.
The considered course, where the proposed robot platform is introduced, is a laboratory course under the title of "Measurement Science, Sensors and Actuators". This course will be part of a Bachelor study program under the title Robotics and Artificial Intelligence, which will start in fall 2022. It is one of more than seven laboratory courses out of which the students can choose freely. It needs to be considered that these laboratory courses are to be taken at a rather early in the study program and should give the students a practical context for their further study. Consequently, not all theories behind the experiments will be fully understood in this early stage of education, and this needs to be considered in the design of the exercises. The learning aims are thus hands-on experience with respect to a wide range of topics • Torque, angular velocity, and acceleration • Force, linear velocity, and acceleration • Inertia and moment of inertia The design of the experiments aims to touch on all these aspects in order to give students visualization and better understanding of the theory presented in the corresponding lectures. It also covers the often under-represented step to obtain simplified models from real world scenarios [6] and understanding the resulting discrepancies. Figure 1 illustrates a lab scenario. Many data acquisition systems nowadays are PC based and we also make use of tools such as LabVIEW® [7] and MATLAB® [8] allowing for fast automation of measurement tasks even when students work with it for the first time. In addition, frameworks such as ROS [9] allow to easily make first steps with robotics as many modules are available. However, since many students will work in the same room simultaneously, small robots that can be used on the table are advantageous. Consequently, our design comprises tiny 3D printed wheeled robots.

PROPOSED PLATFORM
3D printing not only allows for low-cost realizations of robots, but it also allows to easily make adaptions to the chassis of the robots, e.g. in order to mount certain sensors such as RGB cameras, depth cameras, ultrasound and time of flight sensors, wheel speed sensors etc. but also to provide different actuators concepts. Figure 2 illustrates different realizations. These robots are controlled using a Raspberry Pi Zero with ROS on Raspberry Pi OS, but also other platforms such as BeagleBone®, ODROID, and Jetson Nano™ boards utilizing ROS on Ubuntu can be used with the hardware.
The robot body frame is constructed using 3D printing depending on the desired mounting configuration of the sensors and actuators. A block diagram of a typical robot with selected hardware components is shown in Figure 3. The robot's single board computer that interfaces with the onboard sensors and actuators are housed within the 3D printed body. The measurement data is published on ROS for further processing. The robot can be connected wirelessly to a PC but can also execute programs for various tasks running on the embedded PC. It is powered by commonly available low-cost portable power banks that can be easily swapped and recharged. Optionally the robots can be mounted with optical tracking markers for use in motion tracking facilities.
The proposed platform is a fully functional wheeled robot with various measurement and actuation capabilities. It thus  In contrast to off-the shelf robots, the geometry can quickly be adapted to ideally host sensors and actuators. While the left robot can only manipulate objects by shifting them, the robot on the right also includes a simple soft robotics fin ray type gripper [10], which can also be equipped with tactile sensors.
provides students a complete exposure to a simple robot and all its internal components and working principles, the students will then be able to adapt and modify the existing platform for different requirements. The models for 3D printing, boards, and software will be provided as open source and students will be able to continue further experiments as they can easily realize their own robot at low costs.

INITIAL EXPERIMENTS WITH THE ROBOTS
Since one of the ideas is to also enhance the understanding in kinematics and dynamics, the first experiments address measurements related to the motors of the robot. On a simple test bench students can measure the current and voltage applied to the mounted DC motor. The DC motor measurement setup incorporates a disk brake and piezoresistive sensor that can measure the force on the brake. By measuring the force on the support of the brake, torque can be estimated. Additionally, the angular velocity is measured using magnetoresistive sensors counting marks on the shaft. Figure 4 shows a picture of the proposed motor characterization workbench.
Consequently, students get familiar with measurement of current, voltage, and power in the electrical domain but also to speed, force, torque, and power in the mechanical domain. Furthermore, this allows to determine the efficiency and consequently the thermal losses and heating of the motors.
The magnetoresistive sensors can be used in odometry and the drift due to inaccuracies using integration of the velocity can be observed in a follow up experiment.

INTRODUCTION TO ROBOT SIMULATION
Many different environments for robot simulation are available, including open source frameworks such as Gazebo [11] and CoppeliaSim® [12]. As the actual time to work in the lab is rather short, a system is preferred that can be used with an easy to learn graphical user interface. CoppeliaSim® provides such an interface and was therefore chosen for the introductory course.
The initial simulation experiments thus aim to provide an understanding of capabilities of current robot simulation environments, required parameters and limitations of the simulation approaches. This can be illustrated in the simple scenario of a bouncing ball. For this, a simple sphere can be added using the GUI of CoppeliaSim® and placed in a height of one meter above the ground. When the simulation is started, the ball falls as expected but sticks to the surface without bouncing. In the following, the object parameters in different simulators are discussed that control the simulation of the physical contact. The students should then find appropriate parameters, such that the ball shows a realistic bouncing behavior, including the attenuation over time.
This should illustrate that simulations are only approximations of the reality and that results obtained with different simulation engines can be quite different for the same scenario. In order to get realistic behaviors, parameter tuning is required, and the values are not necessarily directly obtainable from the material properties of the objects. This should raise the awareness that simulation results need to be validated in general. As a next step, the simulation of the simple robot is set up. A step file of the 3D printed chassis is provided, and students need to add joints, motors, and wheels. In the following simulations, a torque is assigned to the motors, and the behavior of the robot is analysed by the students. They should verify if the linear acceleration of the robot correctly corresponds to the estimated torque.

CONSIDERING MEASUREMENT UNCERTAINTY IN ROBOT SIMULATION
In order to achieve realistic simulations that allow development of signal processing algorithms or simulation-based machine learning approaches, also realistic sensor models considering non-ideal characteristics of sensors are important.
Typically, robot simulation tools such as CoppeliaSim® provide means for simulation of sensors such as accelerometers and gyroscopes, but non-ideal characteristics of these sensors are usually not included. Consequently, they need to be included by the user. Figure 5 illustrates such a simple model as used in CoppeliaSim®.
Based on datasheets of accelerations sensors, students should include effects such as deviation in offset, sensitivity, noise, crosstalk and potentially nonlinearity, such that the simulation model generates realistic sensor data based.  The DC motor has a spinning wheel attached to its shaft. This spinning wheel has holes near its perimeter. The angular velocity of the wheel can be obtained by processing the output signal of the magnetoresistive sensor S1. A brake wheel that can spin freely is mounted next to the spinning wheel, and the force applied can be adjusted and measured. A small extrusion of the brake wheel applies force on the force sensor, whose output can be used to measure the torque.
A linear model could look like ] + [ where, are the sensor outputs, are the sensor inputs, (cross)-sensitivities, offset values and noise contributions. For each sensor realization, offsets and sensitivities will be different and noise contributions will vary for each sample. The students should also include an explanation of how the parameters for the random variables are determined from the datasheet of an actual sensor.
The model should be developed for one of • 3 axis acceleration sensor • 3 axis gyroscope • pressure sensor. The sensor model should be tested on a simulated robot, e.g. in order to assess the feasibility of the determination of a joint angle of a robot joint using two acceleration.

SENSOR FUSION ALGORITHMS
An important part of measurement science, especially in robotic context is the application of algorithms to improve the estimate of the measurands in the presence of noise and uncertainties. A popular method used for robotic tracking applications is the Kalman Filter [17]. The proposed wheeled robot is a suitable platform for students to learn about the estimation of the system state from the sensor readings. Even though the full theory behind the Kalman filter will be addressed later in the curriculum, the students should be able to implement the equations and to do first analysis in order to get an idea of the benefits of signal processing methods in measurement science.
In a simple exercise the students must estimate and track the velocity and acceleration (in one dimension) of the robot using the Kalman Filter. The robot will move on a straight line on a flat level surface and the output of the angular velocity sensor ( m ) and the acceleration ( m ) from an Inertial Measurement Unit (IMU) is available as measurements at regular time intervals (d ). The diameter of the robot's wheel ( ) is a known constant.
From the measured angular velocity and using the knowledge of the wheel diameter, the measured linear velocity m of the robot is obtained as The state of the system to be estimated and tracked is In this setup, the system has no control inputs, therefore the Kalman Filter state predict equations are, and where is the covariance matrix that represents the uncertainty in estimation and is process noise. Given the measurements The state update and the uncertainty update equations are given by, and where is the identity matrix and is the Kalman gain where is the measurement uncertainty matrix. An advanced version of this experiment tracks motion (linear and angular position, velocity, and acceleration) of the robot, additionally positional measurement inputs from the range sensor can be included, and motor voltage and current measurements can be used as control inputs to the system state. This state can then be compared to the ground truth positions obtained from optical motion tracking systems.

HIGHER LEVEL ASPECTS
The same robots can also be used with optical time of flight sensors or time of flight cameras. With these sensors, it is possible to develop object avoidance approaches based on reinforcement learning in simulation. Here, the aim is to maneuver the robot towards a certain target position while avoiding collision with obstacles.
Again, the focus is on the influence of the sensor signal's quality on the training result. We use one or more 8 × 8 multizone time of flight ranging sensors [18]. Figure 6 shows a training setup that students can use.

SUMMARY
This paper summarizes an approach to integrate robots in lab exercises on measurement science. The simple, low-cost tabletop robot with 3D printed chassis can be equipped with various sensors and can be used for a variety of experiments starting from current and voltage measurement on a DC motor, measurement of force, speed, and mechanical power, as well as conversion efficiency. Non ideal effects of inertial sensors as they are used in robots can be simulated using simulation frameworks and the consequences can also be studied in the experiments. The sensors and measurement systems can also be used and studied in signal processing, and signal fusion approaches as well as in machine learning allowing to study the influence of the signal quality on the training results.