Motivation
Common robotic platforms which can facilitate researches by quick introduction at low cost and by sharing and comparison of programs are highly in demand for robotics and artificial intelligence society. Humanoid robots like NAO and iCub, small-sized robot like Khepera, e-puck and AIBO etc are the best examples. However, they are either too expensive, hard to maintain or equipped with limited sensor and low computational power.
Recent smartphone carries various features for constructing a robot, including
- a high-performance energy-efficient CPU
- versatile sensors such as cameras, gyroscope, accelerometers, GPS, audio, etc
- wireless communications
- open source software developing environment
By connecting actuators along with micro controller chips such as Arduino, Rasberry PI and IOIO board to the smartphone, we can construct a smartphone based robotic platform. Compared to traditional robots which require sophisticated structure design and time-consuming manufacture, smartphone based robots are more compact, handy, effortless to replicate for not only research teams but novice developers.
A balancer with elastic bumper
Figure 1 - Physical model of spring-attached wheeled inverted pendulum
For a single agent, we consider a two-wheel balancer with elastic bumpers illustrated as a spring-attached wheeled inverted pendulum model. Balancing robot provides lively impression than quasi-static movements of tricycle or four-wheel robots. With the help of the attached bumpers, the robot can recover to the origin and preserve energy.
Behaviors
The one more degree of freedom enables various basic behaviors such as
- standing-up
- balancing
- approaching
and facilitating high-level integrated behaviors such as
- foraging
- mating
- collision avoidance
This bottom-up behavioral structure corresponds to the emergence of natural behaviors from biological creatures. Under the framework of basic dynamics, it is fertile to test and develop control and learning algorithms. Under the higher level behavioral domain, it is primed for revealing the insights of learning and evolution.
Construction
Chassis
Figure 2 - Chassis design for stable versions
Figure 3 - Chassis design for elastic balancer version
To customize the chassis, we need
- 3D printer, i.e. Ultimaker 2
- AutoCAD
- CURA
Our latest design supports both two versions of a stable runner by sliding in two holders under the battery container and a spring-attached balancer.
Hardware
Figure 4 - Hardware connection
The hardware components we need are
- smartphone, i.e. Nexus 4
- micro controller, i.e. IOIO board
- connect break-out board
- motor, motor driver, and rotary encoder, i.e. HUB-ee wheel {out of stock}
- USB cables
- chargeable battery set
Software
The behaviors are achieved by an Android app. Specifically, we use
- developing language: JAVA
- environment: Android Studio, Android SDK, IOIO Library, OpenCV
and the sensor we need are
- accelerometer (20ms) and Gyroscope (1.3ms) from Smartphone
- rotary encoder from the wheel
We use three threads under the Android environment as shown in Figure 5:
- UI thread (Main Thread)
- sensor thread (5ms)
- control/IOIO thread (1ms)
Figure 5 - Threading
Control Architecture
Figure 6 - Control Architecture
To achieve standing-up and balancing behavior, we adopt a switch control architecture. That is when the balancer body is inside a threshold angle i.e. upright positions, linear stablizer is activated. Otherwise, a Centeral Pattern Generator (CPG) is applied for distabilizing the dynamics.
The state inputs are body angle and angular velocity obtained from the acc and gyro sensor fusion, wheel rotating angle and angular velocity obtained from the wheel rotary encoder.
The control parameters are 4d control gain K, and 2d CPG parameter .
The control output is the command value range [-1000,1000] to the wheel pulse.
The Learned Behaviors
We achieved several basic behaviors and high-level behaviors.
Firstly, we handtuned the control parameters and achieved the standing-up and balancing behaviors in simulation [NLP 2013] and hardware [RSJ 2014].
Then we used the method proposed in Policy hyper-parameter search for the robot to learn the optimal parameters instead of handtuning. The standing-up and balancing behaviors achieved in simulation [ArtificialLife 2016] and hardware [Frontier 2017].
We further achieved a vison-based approaching behavior in hardware [Frontier 2017].
The video is showing the above behaviors.
Finally, we achieved vision-based foraging and mating behaviors in hardware [ROBOMECH 2018].
In short,
- Standing-up and balancing (simulation) [NLP 2013] [ArtificialLife 2016]
- Standing-up and balancing (hardware) [RSJ 2014] [Frontier 2017]
- Approaching (hardware) [Frontier 2017]
- Foraging (hardware) [ROBOMECH 2018]
- Mating, one agent is fixed (hardware) [ROBOMECH 2018]
- Multi-agent Mating
- Collision avoidance
Related Papers:
-
J. Wang, E. Uchibe, and K. Doya. Standing-up and balancing behaviors of Android phone robot: Control of spring-attached wheeled inverted pendulum.
IEICE technical report. Nonlinear problems. 113(341), 49-54, Hongkong, China. 2013 (NLP)
[website] -
J. Wang, E. Uchibe, and K. Doya. Control of Two-wheel balancing and standing-up behaviors by an Android phone robot.
In Proceedings of the 32nd Annual Conference of the Robotics Society of Japan. Sangyo University, Fukuoka, Japan. 2014 (RSJ)
[website] -
J. Wang, E. Uchibe, and K. Doya. EM-based policy hyper parameter exploration: Application to standing and balancing of a two-wheeled smartphone robot.
Artificial Life and Robotics. 21: 125. DOI 10.1007/s10015-015-0260-7. 2016
[website] [researchgate] [pdf] -
J. Wang, E. Uchibe, and K. Doya. Adaptive baseline enhances EM-based policy search: Validation in a view-based positioning task of a smartphone balancer.
Frontiers in Neurorobotics. 11:1. DOI 10.3389/fnbot.2017.00001. 2017
[website] [researchgate] [pdf] -
E. Uchibe and J. Wang. EM-based policy search for learning foraging and mating behaviors.
In proceedings of the 30th robotics and mechatronics conference. Kitakyushu, Japan. 2018 (ROBOMECH)
[website] [researchgate] [pdf]