EXERCISES
5.1 SOFTWARE FOR ROBOTICS
C H A P T E R
5
Software, simulation &
control
“ROS = plumbing + tools + capabilities + ecosystem”
– Brian Gerkey
“If you could see the world through a robot’s eyes, it would look not like a movie picture decorated with crosshairs but something like this:
225 221 216 219 219 214 207 218 219 220 207 155 136 135 213 206 213 223 208 217 223 221 223 216 195 156 141 130 206 217 210 216 224 223 228 230 234 216 207 157 136 132 . . . ”
– Steve Pinker
FIGURE 5.1 BB-8, the new robot in Star Wars was made with STM32F3 MCU. Newer processors and sleek hardware are needed to make better robots. New software platforms to tackle such hardware will not only be cumbersome but it will also be difficult to add-in accessories as camera, arm manipulator, sonars, motion sensors as Microsoft Kinect and ASUS Xtion etc. to the robot.
Meta-Platforms as ROS helps to set a benchmark for software/hardware interface where accessories can be added-in as handshake of software modules.
simulations used to employ a pixellated graphical interface while control of the real robot would be with microcontroller coding such as for the PIC microcontroller. Post 2000, there has been a concerted effort from the robotics community to develop meta-platforms which unifies these two paradigms and the same code which enables a simulation on the computer screen also leads to a similar performance when put to work in the real robot. The earliest efforts were the player project and Microsoft Robotics Developer Studios where the two paradigms converged, similar motivation was seen in the simulator Webots by cyberbotics.
Tekkotsu, Robot Operating System (ROS), YARP (Yet Another Robot Platform), MOOS (Mission-Oriented Operating Suite), ORCOS (Open Robot Control Software) and URBI (Universal Real-time Behaviour Interface) are newer and more well equipped avatars of such ideas, and being opensourced they attract crowd sourcing and tinkering by geeks, researchers and students to port in newer hardware and softwares. Of course V-REP and Webots are commercial simulators which have made a niche both in the industry as well as academia. Among these ROS has been most popular and has become a benchmark in robotics software in both academia and the industry.
Meta-platforms particularly Robot Operating System (ROS) addressing to both simulation in the software domain and control in the hardware/software interfacing has helped to set a benchmark in robotics so that newer hardware can be easily ported into existing systems and therefore encouraged crowdsourcing and open source software and hardware designs, as shown in Figure 5.1. This chapter is not a discussion on how to use ROS, rather it an exposition of meta-software platforms and introduces the reader to interesting facets of it.
Rossum’s Playhouse (RP1) made in 1999 was one of the earliest open-source robot
157 simulator. It modelled the world in two dimensions and could be employed for simple navigation as solving a maze — in the spirit of the micromouse. At about 700 kb It was a handy tool for programmers which could be readily used as a testbed for algorithms and control logic. The user could make robot models as per design layout and employ actuators, IR sensors, proximity sensors, and bumper sensors.
The player project was the first attempt to unify the domains of control and simulation.
The name ‘player’ and ‘stage’ were inspired by the quote, “All the world’s a stage,” by William Shakespeare in his play, ‘As You Like It’. The suite was designed to work as client-server models, with player providing the server interface, Stage the 2D simulator [334] and Gazebo the 3D simulator. Stage was later ported into ROS. Stage was chiefly developed by Richard Vaughan using FLTK and supported simple block like environments and robot models using LEGO like blocks. It provides the user with a two-dimensional graphic environment, which has facilities for a perspective camera, making it effectively a 2.5 dimensional simulator as shown in Figure 5.2. Stage has facilities for modelling the robot and its sensors using simple scripts. There have been significant changes since version 3 to improve its simulation performance. Newer features includes stag being a standalone simulator, use of controllers and multi-threaded execution. Stage is supported in nearly all UNIX-based OSes and in Mac OS X.
Gazebo is a 3D simulator developed with OGRE and it uses ODE for the physics simulation, shown in Figure 5.3. Robot models made in Blender or Google SketchUp can easily be imported into gazebo to form its xml based Unified Robot Description Format (URDF), and ROS has built in libraries for models of most of the popular robots. It is a big improvement on stage and now is the default simulator in ROS. ROS started off with two simulators, stage and gazebo — both forked out of the player project. Since then, both stage and gazebo have also developed into standalone open source softwares. STDR has been a new addition to ROS, as we will briefly see later in the chapter.
Being an interdisciplinary domain, various academic departments offer courses on robotics, across Mechanical Engineering, Computer Science and Electrical Engineering.
Some universities even have centers and schools specific for robotics. While most Mechanical Engineering courses on robotics focus on the arm robot, those offered by Computer Science focus on AI and is often an extension of the course on AI. Mobile robot specific courses are few and are offered only by the top 50 universities across the globe. However, with robotics posing to take the center stage that is set to change. Therefore, a meta-palform should attempt to address the following questions1.
1. The meta-platform should provide reusable code pieces which helps to build simple robot behaviours.
2. Since vision is the most important of all senses there needs to be dedicated software for computer vision. ROS provides support for motion sensing and supports OpenCV libraries.
3. Localisation is of primary importance and there needs to be tools for odometry and visual landmarks, and mapping and techniques as SLAM based on Particle Filters.
ROS supports mapping tools as gmapping and octomapping.
4. Simple navigational approaches are insufficient, but they provides for potent testing grounds. ROS has navigation tools as ND-diagram and AMCL.
5. For more involved design, there will be a need to orchestrate pick-and-place operations using an arm manipulator and exotic design tools as gyroscopes and Omni wheels. A
1many of these ideas are due to Touretzky [325]
FIGURE 5.2 Stage simulations, LEGO like blocks model of the pioneer robot and Wall-E in stage (version 3). The cube mounted on both the robots is the SICK laser. In the third image, the little red pioneer robot is seen at the lower left hand corner and the green box is a movable cube placed at the upper right hand corner, the semicircle surrounding the pioneer robot is the field of view of the SICK LMS 200 laser
159
FIGURE 5.3 Gazebo simulations. The gazebo interface (a) can spawn robots in a simple environment — the robot here is turtlebot-II and the environment comprises of 3 giant cubes.
The simulation is intractive and helps to zoom into and change angles as shown in (b) and (c).
Mapping software provided in ROS can implement SLAM to create 2D maps, as shown in (d) and (e).
however integrating them into a robot is still a desired goal of the future. This module should consist of NLP, face recognition and emotion recognition. Since human-robot interactions should also tally with known social conventions hence this module should also address roboethics.
10. Many robot teams and robot swarms are interesting avenues and the student will learn about explicit coordination (robot groups) and implicit coordination (robot swarms). Most robot softwares are designed for single robot, and that includes ROS.
The apparent compromise to this approach is that it alienates the wonderful facets of swarming as discussed inChapter 6. There has been prospects to incorporate multiple robots paradigm into ROS using multimaster, and future versions of ROS may have capability to design robot swarms. Autonomous Robots Go Swarming (ARGoS) made by researchers at IRIDIA, Belgium is currently the best software platform option for researching on robot swarms.
ROS easily implements the first six of the above, however it is yet to be employed for social robots or swarm robotics.