Developing a Leg-Wheel Hybrid Mobile Robot Using LabVIEW and CompactRIO

 Read in  |   Print
  |   PDF  |  

"The rugged and modular CompactRIO system is extremely suitable for mobile robot development, where size, weight and performance are important factors. Well-defined integration between LabVIEW and the NI hardware significantly reduces the time and efforts of developers in performing system integration."

- Pei-Chun Lin, Department of Mechanical Engineering, National Taiwan University

The Challenge:
Developing an energy-efficient leg-wheel hybrid mobile robot that can drive quickly and smoothly on flat terrain and can stably negotiate natural or artificial uneven terrain.

The Solution:
Using NI LabVIEW and CompactRIO with various I/O modules to rapidly integrate the mechanical, electrical and software elements of our design into a functional robot prototype.

Pei-Chun Lin - Department of Mechanical Engineering, National Taiwan University
Shen-Chiang Chen - Department of Mechanical Engineering, National Taiwan University
Ke Jung Huang - Department of Mechanical Engineering, National Taiwan University
Shuan-Yu Shen - Department of Mechanical Engineering, National Taiwan University
Cheng-Hsin Li - Department of Mechanical Engineering, National Taiwan University


Motivation for the Project

Legs and wheels are two widely adopted methodologies used in ground locomotion platforms. After a long evolutionary process, the legs of most ground animals are agile, powerful, and capable of moving animals smoothly and rapidly on uneven, natural terrains. On the contrary, humans invented wheels for specialized locomotion on flat ground; their excellent power efficiency and smooth travel at high speeds on flat ground set a standard that legged locomotion can hardly compete with.

Thus, the Bio-Inspired Robotic Laboratory (BioRoLa) team at National Taiwan University aimed to design a leg-wheel hybrid robot that combined the great mobility of wheels on flat ground and legs on rough terrain to provide an adequate mobile platform for general indoor and outdoor travel in both flat and rough environments.

Mechanism Design

Compared to most hybrid platforms, which have separate mechanisms and actuators for wheels and legs, our leg-wheel hybrid mobile robot, Quattroped, uses a “transformation mechanism” that deforms a specific portion of the body to act as a wheel or a leg. From a geometrical point of view, a wheel usually has a circular rim and a rotational axis located at the center of the rim. The rim contacts the ground and the rotational axis connects to the robot body at a point hereafter referred to as the “hip joint.” In general, with wheeled locomotion on flat ground, the wheel rotates continuously and the ground-contact point of the wheel is located directly below the hip joint with a fixed distance. In contrast, in legged locomotion the leg moves in a periodic manner and there is no specific geometrical configuration between the hip joint and the ground-contact point; thereby, the relative position of the legs varies frequently and periodically during locomotion.

Based on this observation, shifting the hip joint out of the center of the circular rim and changing the continuous rotation motion to other motion patterns implies the locomotion switches from wheeled mode to legged mode. This motivated us to design a mechanism that directly controls the relative position of the circular rim with respect to the hip joint so it can generate both wheeled and legged motions. Because the circular rim is a 2-dimensional object, the most straightforward method to achieve this goal is to add a second degree of freedom (DOF) that can adjust the relative position of the hip joint to the center of the circular rim along the radial direction. The motions of the two DOFs are also orthogonal to each other. In addition, the same set of actuation power can be efficiently used in both wheeled and legged modes.


For the robot controller we used an NI CompactRIO embedded control system that includes a 400 MHz real-time processor and a 3M gate field-programmable gate array (FPGA). The FPGA connects directly to NI C Series I/O modules which acquire data from the on-board sensors and actuators. We used the NI 9205 and NI 9264 I/O modules for analog I/O, and the NI 9401 and NI 9403 I/O modules for digital I/O. The FPGA is connected to the real-time processor, which communicates to a laptop via IEEE 802.11 wireless.

The robot sensors include temperature sensors on the motors and power amplifier chips for health monitoring; voltage and current measurement sensors for power management; Hall effect sensors for leg-wheel configuration calibration; a 6-axis inertial measurement unit (IMU) and a 2-axis inclinometer for body state measurement; and three infrared (IR) distance sensors to measure ground clearance. Various sensors, such as GPS, vision, and laser ranger, are also used to improve the robot’s perception ability. Actuators on the robot include eight DC brushed motors for driving the robot, two high-torque RC servos for front leg-wheel turning, and four small RC servos and four small DC brushed motors for leg-wheel switching.


Three computation cores (PC, real-time operating system (RTOS), and FPGA) running LabVIEW are responsible for different tasks. The PC is operated by a user and sends high-level commands to the NI CompactRIO controller, such as which mode (wheeled or legged) the robot should be operating in. The controller, operating at a 1 kHz loop rate, sends back critical information regarding the robot’s health, and state data to be logged on the PC.  The robot software architecture consists of various state machines and each state represents one robot behavior. Other algorithms that require high-speed signal exchanges execute on the FPGA at a 10 kHz loop rate. This including proportional-integral-derivative (PID) control for the DC motors, encoder readings, and PWM-based RC servo commands.

After the robot is powered on, we must calibrate the motors to define the absolute geometric configurations of the two active DOFs on each leg-wheel with respect to the robot. Calibration is achieved by matching the relative position between Hall effect sensors installed on the body and magnets mounted within the leg-wheel. The calibrated robot can be operated either in legged mode or in wheeled mode, depending on the current rim configurations (that is, wheel or half-circle leg). Otherwise, we can also perform leg-wheel switching to transform the leg-wheel configuration. Three behaviors are provided when the robot is operated in wheeled mode, including standing, driving, and sitting. Standing and sitting are two transient states to bridge the initial on-the-ground configuration and the driving behavior. In the driving behavior, the forward speed and turning rate are continuously adjustable. Similarly, when the robot is operated in the legged mode, standing and sitting behaviors are also included for transient states. After the robot stands up, it can perform various behaviors, including walking, trotting, step crossing, bar crossing, and stair climbing.

Benefits of NI Hardware and Software

Robots, in general, are high-DOF complex systems. The successful development of a robot requires time and effort to properly integrate various mechanical, electrical, and computer systems. For the BioRoLa team at National Taiwan University, which is mainly composed of students with mechanical engineering backgrounds, a reliable, modular, easy-to-use, and well-integrated platform was needed.

After extensive research, we found NI products to be the best solution for our application for several reasons. The intuitive graphical flowchart representation that LabVIEW provides makes it easy for students with non-programming backgrounds to model a solution as a process diagram, and then translate that diagram into software. The ability to use the same graphical development environment for our Windows, RTOS, and FPGA based targets was also extremely helpful. Since we didn’t have to spend time learning low-level programming syntaxes when developing software for our controller, we were able to spend more time focusing on the mechanical portion of our design.

Additionally, the rugged and modular NI CompactRIO embedded control system is extremely suitable for mobile robot development where the size, weight, and performance are important factors. Well-defined integration between LabVIEW and the NI hardware significantly reduces the time and efforts of developers in performing system integration.

Future Plans

With NI LabVIEW graphical system design and NI CompactRIO, a team of mechanical engineering students were able to design a sophisticated mechatronic system, with an elegant software architecture that can be easily expanded for future developments. On the hardware side, we are in the process of integrating various sensors in to the current mechatronic system to improve the perception capabilities of the robot. On the behavioral side, we are refining and developing legged behaviors with a closed-loop feature to improve the mobility of the robot on various challenging terrains and to explore dynamic legged gaits.


The authors wish to thank NI Taiwan for their kind support in equipment provision and technical consulting. This work is supported by National Science Council (NSC), Taiwan, under contract 97-2218-E-002-022 and 99-2218-E-002-012-, and by National Taiwan University under contract 98R0331.

Author Information:
Pei-Chun Lin
Department of Mechanical Engineering, National Taiwan University
No.1 Roosevelt Rd. Sec.4, ME, Eng. Bldg. room503-3
Taipei 106, Taiwan
Tel: 886-2-3366-9747

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