Keywords

1 Introduction

There are different facets of a walking robot namely; structural components, sensing components and decision making components. The structural components include a manipulator (links, joints, etc.), the end-effector and actuators (servo motor, stepper motor, pneumatic and hydraulic cylinder etc.). Sensing components are devices that are meant to gather information about the internal state of the robot or to communicate with the outside world. The robot’s decision making components include a processor (which is the brain of a robot that calculates the motion and velocity of the robot’s joints), controllers that control and correlate the motion of actuators, and software (tools and libraries for conveying and collection of routine information) [1].

The walking humanoid robot requires the provision of a system integration arrangement within its decision making, sensing, and structural components. There must be a centralized or a distributed control system which can be used in such cases. In the centralized setup, the main computer is normally aware of the sensory information around the robot body. At the same time, it becomes inconvenient to increase the number of joints as the main computer must bear much calculation burden. A distributed system may comprise of many more joints and many peripheral devices such as cameras, wireless LAN, and control area network module [2]. However, the sub-controllers and the communication bus lines between the main computer and the sub-controllers need to be provided. In cases where the main controller used is not a real-time operating system (RTOS) but only a general-purpose operating system (GPOS), a Real-Time Extension (RTX) which is a commercial program capable of accessing the hardware directly must be provided [2]. In this case, the number of joint motor controllers of the robot must be worked out which depends on the degrees of freedom (DOF).

Generally, a walking humanoid robot is required to be configured with an autonomous motion controller, which takes care of the autonomous motion processing, e.g., integrating the odometer and the map information to guide the robot. Apart from this, the autonomous processor controls and directs the hardware while image processing tools like Open CV (intel C/C++ libraries for computer vision) or Direct show (Microsoft Multi-Media Development Tool) can be used for accessing images from the camera connected to the USB, and the program provided in the tools can carry out image processing [2]. The motion controller includes walking program and special action program written in suitable programming languages for e.g., C, C++. In the work presented in this paper, a robot’s autonomous motion controller is designed using Robot Operating System (ROS) while keeping the basic and fundamental requirements of a prototype humanoid robot, the bioloid humanoid robot. The adapting strategy of the decision-making component and ROS with BBB in the structural body of humanoid robot has been redesigned and implemented in this paper. ROS gives standard robot services such as hardware abstraction, low-level device control, implementation of commonly used functionality, topics and message services between processes, and package management. ROS based topic transmission and frame transform procedures are represented in a graph architecture where processing takes place in nodes that may subscribe and publish the sensor, pose, control, state, planning and other messages. Despite the significance of unified software structure in robot control, ROS itself is not a real-time software package. However, it is possible to combine ROS with real time hardware ROS is running on to form a real-time framework. This framework can serve as an operating system and middleware for service robots. It gives not just standard operating services (hardware abstraction, contention management, process management) but in addition high level system functionalities (asynchronous and synchronous operations, centralized data base, a configured robot system etc.) [3].

A collection of nodes and programs called roscore are the pre-requisites of any ROS-based system. There must be a roscore running for ROS nodes to communicate [4]. Communication buses named ROS Topics are used while using the ROS modules. These comprise of anonymous publish/subscribe semantics that in-turn decouple the production of information from its consumption. Generally, the nodes are unaware of the extremities with which they are communicating. The nodes that are in search of data subscribe to the relevant topics i.e. the nodes that generate data publish to relevant topics. Thus, there can be multiple subscribers and publishers to a topic [5]. An rqt_graph is commonly used as a GUI plugin for visualizing the ROS computation graph [6].

The remainder of the paper is organized into three sections. Section 2 describes the theoretical considerations to be kept in mind while formulating the scheme for adaptability of installing ROS based autonomous motion controller into a walking humanoid robot. Section 3 describes the original decision making components of a walking humanoid robot (Robotis Bioloid) as well as that of the replaced robot autonomous motion controller (BeagleBone Black). In this section, the details of a ROS based motion control strategy are given. Section 4 narrates the exchanging strategy that was adopted to address the motion control issue. Section 5 concludes the paper.

2 Theoretical Considerations

2.1 General Points Regarding Controllers

  1. 1.

    Powerful processor for providing Artificial Intelligence and overall control, while basic microprocessor as I/O managers must be used in walking humanoid robots.

  2. 2.

    Preferably use three-layer configuration:

    1. (a)

      Top layer - Powerful PC as the “brain” of the robot.

    2. (b)

      Middle layer - Multiple sub-system managers for motion control, sensor management and processing.

    3. (c)

      Lower layer - Large number of low performance microprocessors for managing miscellaneous tasks.

  3. 3.

    Basic microprocessor can be plugged in to a USB on the computer and it can send and receive commands over serial port and all other higher-level instructions could run on the computer. The computer could issue commands by taking decisions and the other processor could control the motors to perform the required tasks.

  4. 4.

    Decisions on processor can be taken considering the following:

  1. (d)

    Processing Power - If controlling the motors is only required i.e. all processing is done on an external PC, then a motor driver circuit may be enough. For basic on-board processing like transformation of coordinates, simple command loops and inverse kinematics, a basic microprocessor may be sufficient. If automating the robot and implementing advanced features is desired, BeagleBone Black, Raspberry Pi or Intel Atom may be sufficient.

  2. (e)

    Programming ability - Basic Python and C/C++ is required for BeagleBone Black, Raspberry Pi and Intel programming. However, wherever necessary, libraries must be included in addition.

  3. (f)

    Compatibility - The chosen processor should support (both number and type) the motors used [7].

2.2 General Points Regarding the Software

  1. 1.

    ROS, a comprehensive robot-related software framework depends on the machine controller that integrates robotic functions [8].

  2. 2.

    Python API allows either to use all the C++ from a remote machine or create Python Modules that can run remotely or on the robots.

  3. 3.

    Embedded software, running on a motherboard located in the head of the robot allows autonomous behaviour. Desktop software running on a computer located outside the robot, allows creation of new behaviours and the remote control of the robot [9].

2.3 Preliminary Adaptability Analysis

The above theoretical considerations have been carefully considered and a ROS based architecture is used for data acquisition for motor actuation and decision making processes of the robot. The BeagleBone Black single board computer (SBC) is used in place of the CM530 decision making component of the Bioloid humanoid walking robot (see Table 1).

Table 1. Exchange of components [10, 11]

3 Decision Making Component

The original main control unit of the humanoid robot kit is CM-530 controller. AX 12A Dynamixel servo motors, the gyro/accelerometer sensor, infra-red and distance measuring sensors also all communication devices needed (RoboPlus software) are easily connected to CM-530 (see Fig. 4). Different components in the system have their own identifications (IDs) so that the topics or messages can be addressed to specific target components. Position and speed of walking can be easily obtained from the integral motor Dynamixel AX 12A and its encoders. This robot can provide feedback for angular position, angular velocity and load torque. Several Dynamixel units can be connected through daisy chain to save resources [10].

3.1 BeagleBone Black Processor

BeagleBone Black is a powerful processor that is used in the humanoid robot presented in this paper. The structural platform of the robot is constructed using 2 legs and 12 servos to have 12 DOFs. The BeagleBone Black is connected to the robot through software for controlling its motion and function [9, 11]. The complete interface of the BeagleBone Black with robot and computer is shown in Fig. 1.

Fig. 1.
figure 1

Interfacing of the robot with computer [8]

Gyro/accelerometer sensors are mounted around the middle portion of the body. This senses the robot’s position and controls its balance for walking, thus preventing it from falling. A wireless network is used to provide communication between the computer and the robot. The robot is controlled through the computer instructions and feeds back the data streams from the IR sensor for detection of obstacles in the front of the robot. Thus, the IR sensor acts as a guide for the robot in assisting it in its forward movement and avoiding collision with potential obstacles. This approach can be further used in Brain-computer interface related applications [12].

4 Exchange Strategy for the Adaptation Process

4.1 System Modification and Walking Methodology

In this paper, a Debian image with ROS indigo version implementation is installed on the BeagleBone Black. To maneuver the robot without interruption, a Wi-Fi module is enabled in the BeagleBone Black using necessary libraries and repositories. A USB hub is connected to the serial port of the BeagleBone Black to which all peripherals are connected. USB2Dynamixel [10] is a device to operate the dynamixel actuators which is connected through the Wi-Fi interface of the BeagleBone Black. Gyro/accelerometer sensor is connected to serial clock and serial data pins while infra-red sensor is connected to the analog to digital converting pins (ADC) of the BeagleBone Black. Wi-Fi adapter is mounted on the humanoid robot and is connected through the serial interface of the BeagleBone Black. The interfacing of the sensors with robot movement is shown in the Figs. 2 and 3.

Fig. 2.
figure 2

Sensor interface for robot movement

Fig. 3.
figure 3

Figure showing the BBB, AX-12A motors, USB2Dynamixel connector, Wifi Adapter, IR Sensor and the Gyro+Accelerometer sensor used in the experiment.

For controlling the robot movement, software code is written in python to control each servo. The humanoid robot is made to move forward at a desired speed as per the operator’s instructions. The walking pattern of the robot is fine- tuned so that the robot maneuvers in small steps and take care of the balancing strategy [13]. The most important challenge in walking the robot is to prevent it from toppling over when one leg is lifted. This is overcome by using the accelerometer sensor. The robot is made to tilt on one side such that its center of gravity is in correct position to prevent it from falling.

The IR sensor detects an obstacle and send a feedback to the robot actuators to stop the robot in a balanced standing position. This is another important improvisation in the robot where it does not stop abruptly, and thus any chances of falling while executing the halt operation are avoided. Keeping these basic and fundamental design requirements of the humanoid robot, the adapting strategy is evolved. Deciding cum enforcing components of the bioloid robot are replaced under this strategy with the BBB such that the biped robot performs walking, which was not present earlier. This enhancement was made possible using ROS and Python.

In the bioloid robot, the CM530 controller was the key for governing all the robotic movements and the control of the motors (see Fig. 4). The idea was to replace this default controller with a different controller which can be easily programmable and can make the working of the robot more efficient. The deciding cum enforcing intelligence providing components of the BBB Board (incorporating Robot Operating System (ROS) and Python libraries and walking control) are implanted in the bioloid robot. While carrying out this process the original decision making components are removed from the bioloid robot. This approach has been implemented and shown in this paper. Such an installation procedure has been undertaken for the first time as far as the researchers’ knowledge goes. The main components replacement is shown in Table 1.

Fig. 4.
figure 4

Decision making components of Bioloid humanoid [10]

The Bioloid robot gaits are re-designed in the way that the robot body leans to the left/right direction when its right/left leg lifts and move forward. This simple design effectively avoids the collision between the robot feet with the ground. A check is also made to see that the robot is in a stable position, which makes it to avoid falling. If the parameter values are more than the prescribed limits inscribed in an accelerometer sensor, then the robot is made to tilt the other side to counter balance in order not to fall. The angle to which the robot leans is governed with the feedback from the accelerometer sensor. This angle is 20°. If the robot tilts beyond 25°, then it would come back to its standstill position and stops further movement. When the robot moves forward, the IR sensors sense obstacles in front of the robot. If an obstacle is detected to be present at around 35 cm then the robot stops moving further and comes to its standstill position. This dynamic model can be used, as a building block, to actuate the motors on legs and joints for a swing-stance period of the legs for its further movement [3]. At the same time, the robot stops further movement, and when the obstacle is removed, the robot continues its motion. Using the onboard IR sensor, the robot can navigate in places and a continuous feedback is sent from the IR sensor. The position of the pelvis center and the ankle in the view point of sagittal plane is as shown in Figs. 5 and 6. For the moment, the maximum walking speed of the robot is 0.5 foot/second. Beyond this limit the robot may get unstable and falls. Slippery or uneven surfaces also affects the robot and possibly make it fall.

Fig. 5.
figure 5

Sagittal view for the walking pattern

Fig. 6.
figure 6

Schematics of landing position control

The RoboPlus software of the Robotis Bioloid robot is an icon type C-language based software meant for easy programming and managing motion and behavior. In the work presented in this paper, this component has been replaced with ROS and Python scripts for a more flexible control of the autonomous robot movement. ROS is a promising robot software environment due largely to its rich open source repository and innovative compilation and operating structure. This demo work provides a proof of the concept framework in which a simple ROS motion control scheme is used. One Python ROS node is created to control the robot motion and publish one topic on the robot status. Based on this work, more potential nodes can be added for signal processing and motion control.

The biped walking gaits are imbibed to this revised hybrid humanoid robot using ROS and Python libraries, walking algorithmic codes and controls for the first time in this research study. During robot walking, ROS acts as the intermediate communication between the computer and the BBB. ROSCORE is the first program that had been run in one terminal when using ROS. ROSRUN is the command that instructs ROSNODE (rosnode displays information about the ROS nodes); which is the ‘/walk_sensor’ here to publish on the ROStopic ‘/robot’ (see Fig. 7). Thus, dynamic and stable walking is achieved.

Fig. 7.
figure 7

Rqt_graph representing the dynamics of the system where the rosnode ‘/walk_sensor’ communicating on the ROS topic ‘/robot’.

4.2 Performance Trials

Trials have been carried out using BeagleBone Black to access and control the motion of individual AX-12 Dynamixel servo motors. The accelerometer sensor is added to the interface to control the servo motors. The Bioloid humanoid robot structure that is incorporated with BeagleBone Black and ROS accesses individual servos and accelerometer sensor to make the robot walk with perfect balance and gait. Additional libraries are added to enable the BeagleBone Black with Wi-Fi adapter and IR sensor. IR sensor is mounted in front of the robot to send real time information to the computer. An obstacle in front of the robot is sensed using IR sensors, which stops further movement of the robot. Trials have been carried out on all these sensor functions, to enhance the capability of the Bioloid humanoid robot.

A video showing a demonstration of the work presented in this paper can be accessed in [14]. As perceived in the video, the robot is seen walking as described theoretically and makes good use of its sensors for walking and navigation, and does not trip over. Also, different walking speeds for the robot have been implemented namely, fast and slow. The robot maintains its balance very well in both the mentioned walking speeds.

5 Conclusion

As far as the authors are aware, this project study is the first of its kind, wherein a biped robot is controlled using ROS and BBB. In what is referred to as the robot brain, the main BBB controller, and the ROS software has been successfully implemented in the structural body of the bioloid walking humanoid robot. The initial performance of the Bioloid robot, with its revised brain i.e., the controller and the software seems promising. This transformed Bioloid humanoid walking robot is much enhanced in terms of its autonomous behavior based on the sensed data.

Although, initial tests prove the approach to be reasonably robust, and integration of the hardware with the software is successful, further room for improved performance still exists. One of the improvements that can be proposed here is the implementation of a USB camera along with some image processing in the software. This improvisation would further enhance the performance of the robot.