MIT Adopts LabVIEW and CompactRIO for Key Undergraduate Robotics Course

  Read in   |   Print Print

"LabVIEW is easy for the students to use and provides an intuitive programming approach for robotic systems."

- Prof. H. Harry Asada, Lecturer, Mechanical Engineering Department, Massachusetts Institute of Technology

The Challenge:
Providing undergraduate mechanical engineering students with the ability to quickly create their own real-time programs for custom robot design and prototyping while ensuring that the teaching lab hardware is both reliable and flexible.

The Solution:
Adopting NI LabVIEW graphical and textual programming along with NI CompactRIO embedded control hardware to provide students with a wide variety of programming experience to develop sophisticated code for their robot designs that can handle challenging tasks including autonomy, vision guidance, path planning, and feedback control.

Author(s):
Prof. H. Harry Asada, Lecturer, Mechanical Engineering Department - Massachusetts Institute of Technology
Dr. Harrison Chin - Massachusetts Institute of Technology
Ani Mazumdar - Massachusetts Institute of Technology

Course Background

The Massachusetts Institute of Technology (MIT) Mechanical Engineering department uses LabVIEW software and NI hardware for both teaching and research. Recently, we decided to adopt LabVIEW software and CompactRIO embedded control hardware for our undergraduate robotics course, which is a hands-on course where students design, build, and test their own robots.

The course provides an overview of robot mechanisms, dynamics, and intelligent controls. Topics include planar and spatial kinematics and motion planning; mechanism design for manipulators and mobile robots, multirigid-body dynamics, and 3D graphic simulation; control design, actuators, sensors, and a human-machine interface; wireless networking and task modeling; and embedded software. Weekly laboratories provide experience with servo drives, real-time control, and embedded software. Students design and fabricate working robotic systems in a group-based term project.

In previous years, students taking this course tried to learn ANSI C code to program a robot controller. During this period, we saw a big gap between the limited number of students doing the coding in the projects and the other students. Many of the students were just watching the smaller number of students who were doing the coding. We wanted to engage a broader student population to programming for robots.

Our first attempt was based on The MathWorks, Inc. MATLAB® and Simulink® software along with a real-time target. However, we experienced some integration issues with this approach because the software and hardware were from different vendors. We needed to find a flexible and reliable software and hardware platform that would work for this course.

We chose LabVIEW and CompactRIO based on our positive experience with these tools in our robotics research within the d’Arbeloff Laboratory for Information Systems and Technology and based on our familiarity with the use of CompactRIO as a rugged controller for each of the robot teams in the FIRST (For Inspiration and Recognition of Science and Technology) Robotics Competition. We have used NI embedded control technology for several research projects including a robot that can walk on the underside of surfaces for bridge inspection (IEEE Spectrum video), a pendulum robot that swings over an aircraft and tracks the surface profile while doing inspection, and a custom motor that goes inside of an aircraft wing to help with the assembly operations.

The textbook for this course is Robot Analysis and Control by H. Asada and J.-J. Slotine (Wiley 1986, ISBN 0-471-83029-1, TJ211.A79). In each lecture we provide newly written notes, which are preliminary versions of the second edition of Robot Analysis and Control. Although the book was originally written for graduate-level courses, the new lecture notes are primarily for undergraduate juniors and seniors, assuming the students have some background knowledge about dynamics and control.

Approach for Teaching Robotics With LabVIEW and CompactRIO

For the current version of the course with LabVIEW and CompactRIO, we assigned different coding projects throughout the semester. We provided some examples that the students could modify and expand on. By the time we moved to the main project and the design competition, many groups demonstrated decent programming skills, which never happened in the past. LabVIEW was easy for the students to use and provided an intuitive programming approach for robotic systems. The customizable user interface was also very helpful to students who were frequently iterating on their designs and prototypes.

The students made extensive use of both LabVIEW graphical dataflow programming and the LabVIEW MathScript Node. The ability of the LabVIEW MathScript RT Module to run on both Windows and on the CompactRIO real-time controller with LabVIEW Real-Time was very helpful to the students for implementing their algorithms. The students were already familiar with the .m file script syntax used in the MathScript Node.

Additionally, we used the NI Vision Assistant to introduce students to vision-guided motion for robotics. They used NI Vision Builder for Automated Inspection to quickly develop their machine vision algorithms. Students used the NI-IMAQ USB driver and low-cost USB cameras as additional sensors that could be deployed in their robot designs. They interfaced the USB cameras to the Windows desktop host in their experiments. The location and orientation of objects was then communicated to the CompactRIO embedded control system so that lower level control loops could be used to move the robot to the object’s location.

The Robotics Course Competition

Each year, a robotics competition is organized toward the end of the semester. The 45 students this semester were organized into eight teams. The students had to work together to solve a robotics challenge. This year’s challenge was “Operation Plug the Oil Well.” The oil field was represented by a 60 x 60 inch space. An XYZ gantry robot provided positioning akin to a rescue ship. The students’ robots, which could have a maximum weight of only 4 kg, were suspended from the gantry robot using cables. A simulated “damaged” riser was placed at a location that was not previously announced to the student teams and simulated oil was leaking from the damaged riser. The riser had multiple holes and deformations that were caused by damage from the oil well explosion. The oil flow was simulated using a fog machine attached to the base of the riser.

The students had to design, build, control, and demonstrate a robotic mechanism that could perform the following operations:

  • Find the oil well riser autonomously 
  • Deploy a sealing mechanism that was capable of withstanding a simulated pressure test (>30N) and could seal all three holes in the riser
  • Disconnect from the gantry robot cable suspension at the end of the plugging stage and return to the home position

The design constraints included the following:

  • Robot mechanism weight of < 4 kg 
  • Time restrictions: presentation time and the demo in nine minutes 
  • Length of suspension cables > 2 in. 
  • Budget (outside of CompactRIO) under $500 USD

Like the smaller projects during the semester, the student teams used LabVIEW, the LabVIEW MathScript RT Module, NI vision software, and CompactRIO for their final projects for the robotics competition. During the competition, they shared a common CompactRIO system and host computer. Each student team quickly changed out their cables and downloaded their LabVIEW Real-Time VIs to the CompactRIO controller via an Ethernet cable.

The Results

Each student team got their robot working in either autonomous, semi-autonomous, or manual mode. Some teams did not complete the full challenge but several teams successfully plugged the oil well and demonstrated the strength of their solution through a successful plug tension test with a force scale (to approximate the pressure test) and the smoke machine test showing no oil leakage.

With the introduction of LabVIEW and CompactRIO to the course, the percentage of students programming increased dramatically to 30 to 40 percent versus 5 percent. Every student in the course did some programming. The students provided very positive feedback on the combination of LabVIEW graphical dataflow programming and textual programming using the LabVIEW MathScript RT Module. They also appreciated the tight integration between the software and the hardware that gave them the ability to quickly test their programs with their prototype robots. They also thought the NI Vision Development Module was easy to use.

MATLAB and Simulink are registered trademarks of The MathWorks, Inc.

Author Information:
Prof. H. Harry Asada, Lecturer, Mechanical Engineering Department
Massachusetts Institute of Technology
Room 1-004A 77 Massachusetts Avenue
Cambridge, MA 02139-4307
Tel: (617) 258-5742
hchin@mit.edu

Bookmark and Share


Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community


Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI