1. Introduction
Introduction to Robotics is a common introductory robotics course generally covering the fundamental theory of robotics including robot kinematics, dynamics, differential movements, trajectory planning and basic computer vision algorithms commonly used in the field of robotics. Joint programming is a fundamental part of this course and involves a deep understanding of robotics theory including robot kinematics, dynamics, and trajectory planning.
Joint programming is the task of writing a program to directly control the robot’s joint motors as opposed to simply telling the robot’s controller where to move the arm. Ultimately all robotic movements are performed by controlling the input power source to each joint motor.
Trajectory planning activities are a vital part of joint programming and involve navigating the arm considering the impacts of its momentum. The trajectory plan must consider the instantaneous velocity and acceleration limits of each joint motor in order to produce coordinated movements. Traditionally, universities tend to use real industrial robotic arms for this course. However, today, commercially available arms come with a controller that performs this joint programming, which, in fact, constitutes an obstacle in teaching. Students will need to bypass the arm’s included controller to gain direct access to the joint motors in order to perform and learn any joint programming. This is not desirable or possible as the controller includes many safety features that, if overridden, void all warrantees and expose the educational institution to any liability resulting from accidents associated with the controller not being actively in control of the arm. It is unlikely any educational institution will allow such an activity.
On the other hand, small light weight toy arms are sometimes used for this purpose, however, due to their light weight, they cannot accumulate any significant momentum when moving. When their joint motors are turned on or off, they reach their new speed almost instantly with no need to consider acceleration delays. Therefore, they do not possess the dynamic characteristics of an industrial arm. In addition, these toy arms do not allow one to move the joint motors at variable speeds. Without considering momentum and variable speed control, trajectory planning becomes unnecessary as the joint motors are simply turned on at the beginning of the path and off when it arrives at its destination angle. Unfortunately, without the need for trajectory planning, joint programming becomes trivial. Thus, there is unquestionable need for an educational software tool that provides an opportunity to perform joint programming using a virtual arm with user specified dynamics.
An alternative approach, which we pursue, would involve a virtual setting, where all the constraints described above can be modeled. The software tool presented here provides an opportunity to perform joint programming using a virtual arm with user specified dynamics. That is, to properly control the arm, the student will need to consider momentum and acceleration limits to control the speed of the arm rather than just turning on and off the joint motors. This requires the student to implement proper trajectory plans as they learned in the course.
This tool is specifically designed to support teaching and learning essential concepts in an introductory robotics course. The introduction to robotics textbook by Nikku [
1] was used to guild the development of this tool. The topics the tool supports are based on the topics covered in this textbook and include forward and inverse kinematics, the Denavit and Hartenberg (DH) parameter and frame placement convention, trajectory planning, robot vision, and joint-level programming.
This paper presents the newly added joint programming capabilities available in the tool. Work needed to develop such capabilities involves creating an interpreter using a newly developed language that is based on the C programming language with MATLAB matrix syntax and capabilities. An LR(1) parser generated using the Yet Another Compiler Compiler (YACC) tool, parses the input source code and produces a parse tree which is then traversed in the process of executing the input program which then has ties to the virtual arm’s joint motors.
Our previous work on various parts of this tool, presented in several publications [
1,
2,
3,
4], involved offering a way for the student to perform robotics activities without the need of an actual robotic arm. There exist a number of general purpose robotic simulators both free and commercially available [
5,
6,
7,
8]. These tools are used for professional robotics research and related work as well as for educational purposes. The problem with using these general tools for teaching an introductory robotics course is that, first, there is a relatively steep learning curve needed to get sufficiently familiar with the tool before the student can use them for learning robotics. Our tool is specifically designed to allow a student who has never used the tool before to input the specifications of the robotic arm and get to the point where the student can move the links of the robot and adjust the viewing position in less than 5 min.
Second, actual robots are programmed using an included environment that uses a custom scripting language that performs all the inverse kinematics, trajectory planning, and joint programming required for the robot. While this is how real robots are programmed, it does not lend itself to learning introductory robotics since the logic in these preexisting software components is precisely what the student needs to learn how to create. This tool differs from these existing robotic simulation tools in that it is specifically designed to teach this specific course and therefore has a much smoother learning curve and does not do the work itself but rather supports the student while they do the work.
Peter Corke [
9,
10] has developed a library of MATLAB functions and has made it freely available. This library is very popular but requires the student to write programs in MATLAB. There is no integrated development environment (IDE) associated with the library, so the level of programming is more extensive, and the investment of time needed to learn MATLAB, create the complete program and setup the virtual arm is much greater than using the tool presented here. This level of programming is not always feasible especially at institutions that do not have a software intensive program (for example, the Systems Engineering Program at Texas A&M International University, previous institution of the first author) or in programs where this course is offered only as an elective. As an elective that is not part of a robotics concentration, students are less likely to invest the time needed to appreciate the library from Peter Corke.
Another characteristic of Corke’s toolbox is that the philosophy of learning is different than the philosophy used to design the tool presented here. This is shown in [
11], which describes how Corke’s MATLAB toolbox can be used to allow the student to perform basic robotics activities. For example, they use the fkine() function to have the tool compute the forward kinematic equations of the arm provided. The jtraj() and ctraj() functions compute the joint and Cartesian space trajectory path. Our philosophy, however, is that a tool that performs these activities for the student is not as effective as a tool that supports the student in performing these activities. For example, our tool does not perform either of these functions but rather provides a programming platform where the student can program the arm, thus, requiring them to successfully perform the inverse kinematics and compute the trajectory plan. The end result is that the student must perform these activities, such as derive the inverse kinematic equations and compute a trajectory plan and use it in programming the arm. The tool only provides the programming platform that includes the virtual arm. It does provide MATLAB functionality to support the student. For example, it can compute the inverse of a matrix needed in computing polynomial trajectories.
In fact, tools that preform the learning activities themselves rather than support the student in performing them are very common. For example, ref. [
12] describes a simulator for mobile robots, where the tool performs the motion planning. The user only enters some parameters that impact the way the tool performs these activities. The authors do claim the tool is to be used by the instructor in class and not to support the student directly. In another example, ref. [
13] presents a package of three tools, one of which, Inverse Kinematics Computations (IKC), computes numerical solutions to the inverse kinematic equations. The same tool allows the use of a virtual arm by providing it with a set of DH parameters much the same way it is done in the tool presented here. It also includes a symbolic processor for multiplying the individual transformation matrices to derive a set of forward kinematic equations.
All of these tools are useful for students that will take many robotics courses and will eventually need to work with very complex arms where these activities may be too difficult to do without such tools, however, in an introductory robotics course, the present authors believe it is better to provide a simple arm where the students can perform these activities themselves.
There is another group of software tools that are more aimed at supporting the student to learn. In [
14], the authors present a tool that renders the arm given its D-H parameters. It is a web-based tool that one needs to interface via a TCP/IP socket connection. Once the arm is rendered the user can move the eye and see the 3D arm from different views. The presented tool also accepts its arm model by allowing the user to enter its D-H parameters and renders the kinematically correct arm using 3D graphics, see [
1]. It also allows the user to move the eye and view the arm from different angles. In [
15] they present a tool that supports learning concepts related to forward and inverse kinematic equations and specifically deals with joint and Cartesian workspaces. The tool produces a reachability plot in a 3D Cartesian workspace by varying the theta angles. The presented tool supports learning forward and inverse kinematic equations by rendering the arm and allowing the user to move the virtual arm’s joints individually using sliders. In [
16] the authors present a tool that supports learning forward and inverse kinematic equations using quaternion algebra. Quaternion numbers are like complex numbers but work in four dimensions. The presented tool does not support the use of quaternion algebra and this topic is not found in [
1] either. Their tool does have some animated movement they refer to as trajectory planning but the user is not at all involved in the design of the trajectories only to specify the type of movement the tool is to use. The tool is not designed to support learning trajectory planning but rather is used as a way to support quaternion algebraic equations. In contrast to the presented tool, all of these tools support forward and inverse kinematic equations and the relationship between Cartesian and joint workspaces. They do not provide any support for learning joint-level programming or even trajectory planning. From the software point of view, all of the fundamental mathematical concepts including forward and inverse kinematic equations, transformation matrices, and the math involved in path planning are to support the ultimate goal of joint-level programming yet there is no known tool that directly supports this activity. Consider learning how to program using the Java programming language and not having access to a Java compiler. Many institutions use real robotic arms for this course however, using an actual industrial robotic arm will not allow student to execute joint-level programs either since, for safety reasons as explained earlier in this paper, their manufacturers do not allow direct access to its joint motors.
In this paper, we introduce a new complex component of our tool, specifically designed for an introductory robotics course, which offers the ability to allow programming the virtual arm at the joint level. That is, the tool allows the student to write a program in a modified C language that controls the movement of the arm by directly controlling the velocity of each joint motor. With this tool, the course instructor can assign joint-level programming assignments since the tool can compile and run these programs. This is a very important activity in the course and leads the student to gain knowledge of how to build a robotic arm controller.
3. Results
The tool was used to support “Special Topics: Introduction to Robotics” in the spring semester of 2017. The students used the tool throughout the semester to help them with their homework. For the final project the students were given the D-H parameters to an arm that can hold a pen and write on a sheet of paper. The pen draws when the tip is close to the paper. The assignment was to have the students control the arm to draw the first letter of their name across the top of the paper. They could only control the arm by directly controlling each joint motor’s velocity.
The students were given a survey at the end of the semester to evaluate the use of the tool for this assignment. The survey asked students to rank each question by indicating one of the following scales, Strongly Agree, Agree, Neutral, Disagree, or Strongly Disagree. The questions asked about the three main areas of robotics theory and how all this theory plays a role in the control of a robot.
The class had 38 students registered. Thirty-one of them completed the survey. A weighted average was computed for each of the 14 questions using the scale in
Table 4. This includes converting each response to a scale using
Table 4 then computing an average.
For example: suppose 3 students responded to a question with the responses being “strongly agree”, “agree”, and “disagree”. Then the average will be which lies between neutral and agree.
The results are shown in
Table 5 below.
The average of all the 14 averages is 3.01 which indicates that the students tend to agree with the statements in the survey. The survey also revealed that the tool can improve its ease of use. Specifically related to joint-level programming, the compiler can improve its feedback when a user’s program does not run properly. The error messages produced now are not clear and will be improved.
This course was also taught during the spring of 2016 and the tool was used but did not support joint-level programming at that time. Exam number 2 in both semesters primarily covers trajectory planning. While neither semester had a question asking the student to write a joint-level program, both had an equal amount of questions asking to produce trajectory plans. To write a working joint-level program, the student must master trajectory planning since that is the main part of the joint program. In 2016 the average on Test 2 was 83.2 while in 2017 it was 89.3. The authors believe these Test 2 grades and the survey results indicate the tool was effective in helping the students learn the material in the course and specifically the joint-level programming material.
5. Conclusions
The presented tool provides a resource where students can program the movement of the arm by controlling the joint motors directly. It is also an activity that ties together many of the fundamental mathematical concepts covered in the Introduction to Robotics course. To support such activities, the software tool contains a virtual arm, a simulation engine modeling the physics of the arm, and a compiler that compiles and runs the students’ programs providing feedback using the movements of the virtual arm.
A future extension will tie in the robotic vision component of the tool. The tool’s virtual environment will have a camera looking down at the robot’s workspace. The user will be allowed to place obstacles in the workspace. Then the arm can be programed to see, identify the object, locate the object’s position and orientation, and finally control the arm to grab and pick up the object. An interface function will be added to the joint-level programming language to input an image from the camera into the program where the student can then call the appropriate vision functions to perform the required movements.
As an extension, the camera may be attached to the arm and the image captured will move as the arm moves. The student can use this image to navigate the arm using visual feedback, a topic beyond the scope of an introductory robotics course.
However, before these future enhancements are added, the graphical user interface in the IDE needs to be improved and the tool needs to be made easier to use. Each time the tool is used in the course, feedback information is gathered from the students as to the characteristics they liked and disliked the most as well as any suggestions for improvements. During the 2017 semester that the tool’s joint-level programming part was first used, the tool went through extensive changes as we tried to fix and add features in real time. As with most software, it is an iterative process that never ends.