RoboticArm Denis
RoboticArm Denis
RoboticArm Denis
net/publication/369548976
CITATION READS
1 266
2 authors:
All content following this page was uploaded by Emanuele Lindo Secco on 31 August 2023.
Abstract. Robotic prototypes are gaining gradually more academic and research
traction, while robots are becoming a more common encounter within the human
social trusted cycles. Generally, in the fields of Robotics - besides the mandatory
high standards of safety - engineers are keen to build their concepts with an intu-
itive, natural-like motion and characteristics. This project will go through the
process of building a novel 3-degrees of freedom robotic arm. The study will also
aim at introducing and demonstrating the importance of a proper kinematics: an
analysis on how geometry computations are used to improve the control and mo-
tion of a robot is performed. Finally, Pros and cons as well as the constraints of
the proposed system are discussed together with a set of approach and solutions.
1 Introduction
Robotic arms, suitably named because they generally resemble the human arm and
mimic their functionality, were mainly introduced into the heavy industries in the
1960s. The automotive industry was the first to adopt the technology; shortly after,
other assembly-line factories followed (Moran, 2007). Even from the early stages, hav-
ing a machine that can continuously do repetitive tasks with speed and precision, lift
loads greater than a person's capacity and endure harsh environmental conditions – Ro-
bots seemed to be the logical future. They became attractive by offering efficiency and
cost-effective advantages through automation (Smith, 2018).
Throughout time, robotic arms were an evolutionary direction that built and guided
the Robotics industry and determined its existence today.
With greater sensory awareness and novel programming algorithms like artificial intel-
ligence, deep learning or machine learning, the robotic arms can now interact and fulfil
tasks side-by-side with humans.
Typically, from an engineering perspective, a robotic arm consists of a steady base
that anchors a multi-segmented structure and forms the robot body. The connections
between segments are called joints, and individually they determine an axis of motion,
also known as the degree of freedom. The last link of the arm is the end-effector which
is a specialised device designed to interact with the environment. The end-effector can
2
take many shapes and forms, like gripper, vacuum head, magnets, soft-manipulation
grabber, wielding tip, drilling or cutting tool, painting spray or camera module (Ernest
L. Hall, 2015).
In essence, most joints are built using actuators that are capable of initiating move-
ments depending on their control signal feedback. In tandem with the linear or rota-
tional motion of an actuator, joints can mostly be classified as prismatic or sliding,
revolute or rotary, spherical or socket and helical or screw-based (Fig. 1). A higher
number of joints enables more freedom of movement, and the majority of the robotic
arms available have four to six joints (Intel.inc, 2016).
Coordinating the entire movement of a robotic arm while determining its position,
orientation and velocity is a fundamental task in robotics.
Kinematics is the main mathematical option capable of accurately describing the
relationship between the joint coordinates, the end-effector and their spatial layout (Il-
linois, 2015).
There are two ways to use kinematics equations in the context of a robotic arm:
In practice, the forward kinematics process uses the kinematic structure of the ro-
bot and the spatial configuration of the links to calculate the rotation and displace-
ment of each frame. The result of forwarding kinematics is a single possible solu-
tion chain-linked to the entire structure of the robotic arm, no matter its movement.
Once deployed into the robotic arm control algorithm, kinematics calculations can
also be used to improve precision motion and prediction or objects collision detection.
This study will analyze the designing and building process of a 3-Degrees of Free-
dom robotic arm with revolute joints and will go through the process of calculating and
applying Forward Kinematics.
3
The paper is organized as it follows: the Materials sand Methods section will talk
about the characteristics of the robotic arm built in this project and the main compo-
nents. The Forward Kinematics chapter will present the in-depth process of how kine-
matics work and how forward kinematics is calculated and integrated into the robot
system. The Algorithm section will complete the Forward Kinematics chapter by going
through the code developed to operate the robotic arm and the integration of forward
kinematics. The Results section will point out the issues encountered and the solutions
adopted. It will also present the final view of the robotic arm and prove its functionality
with a video demonstration. The last section, namely the Conclusion – reports an ob-
jective overview of the entire project and reflect on the results achieved.
The central computing power of the robot is generated by an Arduino Mega Rev3
board which is based on the 8-bit ATmega2560 microcontroller produced by Micro-
chip. The board operates on 5V and has a clock speed of 16Mhz while offering a con-
venient 54 digital connection pins and 16 analog pins (Fig. 4C).
Although the microcontroller is not used for complicated computations, it holds
enough processing power to perform decently real-time kinematics calculations.
Figure 4 - Dynamixel servo driver shield layout, AX12A Dynamixel servo motor, Arduino
Mega & Servo shield attached
The entire robotic arm design has been built around three Dynamixel AX12-A servo
motors. These are advanced, high-performance robotics actuators designed to be mod-
ular and daisy chain connected (Fig. 4B).
Underneath the reinforced plastic housing, the actuator is composed of a 9-12V DC
motor with 1.5N/m stall torque, a 254:1 spur gearbox, a build-in microcontroller with
feedback, a driver and a half-duplex serial interface running at up to 1 Mbps through a
UART/TTL serial link. This network feature enhances the servo capabilities and offers
precise control and programmability of torque, speed, position, temperature and even
voltage (Adafruit, 2020).
A very interesting feature of these intelligent servo motors is their capacity to be
switched from a Joint mode – with a rotation capacity of 300°, to a Wheel mode –
giving them the ability to endlessly rotate without constraints.
6
Another helpful feature is the daisy chain connection – meaning the servos only need
to be connected to each other in a serial chain via a 3P cable with a Molex connector.
In the daisy chain setup, only a single servo needs to be directly plugged into the Ar-
duino shield. This setup is possible because of the asynchronous communication be-
tween devices and the use of unique IDs for each motor in the commands data package.
Figure 5 - Kinematics Diagram for Rotation Matrices & calculus. | Displacement layout be-
tween joint frames
Forward kinematics is the mathematical process that uses the joint angles, in this
case, θ1, θ2, θ3 (theta values), to determine the exact position of the end-effector (Fig,
5A).
The study will go through two different ways to apply forward kinematics, namely:
1. Conventional way - using the rotation matrix and the displacement matrix to
calculate the homogeneous transformation matrix.
2. And the Denavit-Hartenberg method.
Both of these methods use the same rotation matrix calculus.
Considering the robotic arm has three revolute joints, the rotation matrix formula for
the entire system is:
𝑅30 = 𝑅10 ∙ 𝑅21 ∙ 𝑅32
The first stage consists of calculating the projection matrices of each next frame onto
the previous frame, with the joints in their initial state or position. This process will
help determine the rotation of each joint in a frame space relationship.
Once the projections are defined, the rotation matrices are calculated:
Technically, there is no need to calculate the 𝑅30 matrix to determine the homogene-
ous transformation matrices. But the Python algorithm developed will compute it any-
way; more about that in the Code Section below.
8
Displacement, in the context of the robotic arm, refers to the x, y, and z position of
frame n in frame m. The general formula is:
Using the Fig. 5B diagram, the displacement matrices are determined in the context of
θ1, θ2, θ3, as below:
where it holds:
In this study, the final 𝐻30 of the robotic system is computed by a Python algorithm.
For testing purposes, the defined joint angles are θ1 = 75°, θ2 = 147°, θ3 = 147°, and
the result is:
Where the end-effector tip, according the all calculations so far, is placed at the
coordinate (17.93, 5.48, 0.05), in the 1st quadrant. Additional explanations of the result
are discussed in the Results section below.
9
The second method studied in applying forward kinematics to the robotic arm is the
Denavit-Hartenberg (D-H) method. For this technique to work, four rules must be fol-
lowed in the frame assignment stage (Angela Sodemann, 2020):
1. In the case of a revolute joint, the Z-axis is considered the rotation axis;
2. The X-axis must be perpendicular to the Z-axis of the previous frame;
3. The X-axis must intersect the Z-axis of the previous frame; this rule does not apply
in the context of Frame 0;
4. The Y-axis must be determined from the X and Z axis by following the right-hand
rule.
Once these rules are in place as shown in Fig. 5A, the next step is to determine the
D-H Parameters table (Table 1).
The final step of the D-H method is to use the parameters above to calculate the
homogeneous transformation matrices. In this case, the general formula is:
Each D-H homogeneous transformation matrix gets calculated in Python. The code
is shown and explained below.
10
The setup to operate the joint movement of the robotic arm is defined in the Fig. 6
below: at first, the servo shield C++ library is included in the program, by calling the
DynamixelShield.h header file provided by the developer. Line 3-11 in the code repre-
sents an automation process, where if statement makes the shield recognise the type of
Arduino that will run the system.
The servo motors ID variables are declared in lines 14-16, while the firmware used
to run the servo motors is defined on line 18. This PROTOCOL_VERSION is a default
variable specific for the series of actuators used. Line 20 represents the instance of the
library class DynamixelShield that gives access to all the motor functionalities, as they
are made available by the producer. Line 23 also creates general access to the global
variables used in the control of the servos, like ID, torque, temperature, position and
many more. From Line 25 in the code, it begins the setup of the connection between
Arduino and servo motors via the driving shield. The default baud rate to transmit the
commands to the servos is 1 Mbps, set by command dxl.begin(1000000).
11
Figure 7 - Arduino sketch to run the robotic arm. Main loop code.
In the main loop, in the code lines 40-42, the speed of each of the three servo motors
is set to a value of 70 (Fig. 7). The function used, setGoalVelocity(), can take raw data,
rpm or percentage values; in this case, it is set to a raw value, and it can go up to 450-
500.
The initial reading of the servo position is done using the getPresentPosition(),
which can also take the raw or degrees values as a variable. At the same time, the data
received is valuable feedback that can be used to drive the motor in the desired position
with high accuracy.
The setGoalPosition() function rotates the specific actuator at the requested angle.
This function is very powerful and useful in the kinematics and the motion of the ro-
botic arm.
The robotic arm project used Python programming language and PyCharm IDE to
build two different algorithms:
1. One to execute the conventional forward kinematics calculus with Rotation ma-
trices, Displacement matrices and the Homogeneous Transformation matrices
(Fig. 9).
2. The other one applies the D-H method with the Rotation matrices, Parameters
table and DH Homogeneous Transformation matrices (Fig. 8).
12
The results are compared and discussed in the Results section below. Both algo-
rithms are running on the same theta values representing the joint angles, θ1 = 75°, θ2 =
147°, and θ3 = 147°.
Both, Arduino sketch and Python forward kinematics code are made available online
at github.com/deemano.
Essential aspects to consider in the forward kinematics calculus are the
transformation from degree into radians and the positioning of the joint axis, which
starts from the initial position of the actuator (i.e. 0°). The 3D axis of the joints can be
shifted conveniently to fit any desired layout without influencing the results.
5 Results
The only challenge this research faced was making the UART debugging process
work. Typically, capturing all the servo motors feedback requires a dedicated device
sold by the producer, which acts as a medium and can capture the half-duplex serial
data stream and decode it. But in this case, using a second Arduino proved to be a viable
solution in capturing the data stream. Solving this issue was important in changing the
default ID assigned to each servo motor or other personalized parameters like protocols,
which can be unknown.
In the final stage, the movement of the robotic arm is smooth and steady, without
any issues. This outstanding performance of the servo actuators allowed the study to
focus the entire efforts on implementing forward kinematics.
Although the conventional way to calculate forward kinematics seemed more
straightforward and modulated, both methods were generating identical results in de-
termining the tip of the robotic arm end-effector.
In the end, and consistently with the literature, the D-H method proved to be a sim-
pler way to emulate the robotic arm structure and motion, and faster to calculate.
6 Conclusion
This work has been focused on creating a complete view of the process of building
an operational robotic arm. Additionally, the research elaborated a comprehension of
how forward kinematics algorithms can be achieved and integrated into the robot sys-
tem.
The 3D design of the robot was a laborious procedure with significant creative ef-
forts but of great contribution to understanding the kinematics relationships within the
robot structure.
The electronics part of the project has proven to be a relatively simple stage, primar-
ily because of the intuitive and accessible documentation and other resources related to
the hardware used.
Forward Kinematics, on the other hand, has been the most challenging part, demand-
ing significant amounts of research and raw pen-and-paper calculations. In its essence,
when building your own robotic arm, kinematics is a personal aspect of the structural
motion of the robot that can only work if it is understood correctly.
The industrial development of high-performance smart actuators is becoming acces-
sible and more affordable. Once algorithm concepts like Deep-learning and AI get to
14
be integrated into these devices by default, the Robotics field will be able to fully evolve
and expand into all the other industries and aspects of human life [12-13].
ACKNOWLEDGMENTS
This work was presented in coursework form in fulfilment of the requirements for the
BEng in Robotics Engineering for the student Denis Manolescu from the Robotics La-
boratory, School of Mathematics, Computer Science and Engineering, Liverpool Hope
University
References
1. Adafruit, 2020. DYNAMIXEL Motor - AX-12A. [Online] Available at:
https://www.adafruit.com/product/4768 [Accessed 2022].
2. Angela Sodemann, A. A., 2020. How to Assign Denavit-Hartenberg Frames to Ro-
botic Arms. [Online] Available at: https://automaticaddison.com/how-to-assign-de-
navit-hartenberg-frames-to-robotic-arms/ [Accessed 2022].
3. Association, R. I., 2015. The First Industrial Robot. [Online] Available at:
https://www.automate.org/a3-content/joseph-engelberger-unimate [Accessed 2022].
4. Ernest L. Hall, U. o. C., 2015. Introduction to Robotics - End Effectors. [Online]
Available at: https://www.researchgate.net/publication/282976515_Robotics_1_Lec-
ture_7_End_Effectors [Accessed 2022].
5. Illinois, U. o., 2015. Robot Kinematics. [Online] Available at: http://motion.cs.illi-
nois.edu/RoboticSystems/Kinematics.html [Accessed 2022].
6. Inc, I., 2021. Moore's Law and Intel Innovation. [Online] Available at:
https://www.intel.co.uk/content/www/uk/en/history/museum-gordon-moore-
law.html [Accessed 2022].
7. Intel.inc, 2016. Industrial Robotic Arms: Changing How Work Gets Done. [Online]
Available at: https://www.intel.com/content/www/us/en/robotics/robotic-arm.html
[Accessed 2022].
8. Moran, M. E., 2007. Evolution of robotic arms. [Online] Available at:
https://www.ncbi.nlm.nih.gov/pmc/arti-
cles/PMC4247431/#:~:text=Unimate%20introduced%20the%20first%20industrial,a
%20robotic%20arm%20in%201993. [Accessed 2022].
9. Robotics, 2021. DYNAMIXEL Shield. [Online] Available at: https://emanual.ro-
botis.com/docs/en/parts/interface/dynamixel_shield [Accessed 2022].
10. Smith, E., 2018. Going Through The Motions. [Online] Available at: https://te-
dium.co/2018/04/19/robotic-arm-history-unimate-versatran/ [Accessed 2022].
11. V. Kumar, P. E. U. o. P. S. o. E. a. A. S., 2016. Introduction to Robot Geometry and
Kinematics. [Online] Available at: https://www.seas.up-
enn.edu/~meam520/notes02/IntroRobotKinematics5.pdf [Accessed 2022].
12. VD Manolescu, EL Secco, Design of an Assistive Low-Cost 6 d.o.f. Robotic Arm
with Gripper, 7th International Congress on Information and Communication Tech-
nology (ICICT 2022), Lecture Notes in Networks and Systems (ISSN: 2367-3370)
13. S Procter, EL Secco, Design of a Biomimetic BLDC Driven Robotic Arm for Tele-
operation & Biomedical Applications, Journal of Human, Earth, and Future (ISSN:
2785-2997), 2022