Wednesday, May 11

Open Robots with Open Roberta

Kids, and Hackaday editors, love robots! The Open Roberta project (OR) takes advantage of this to teach kids about programming. And while the main focus is building a robot programming language that works for teaching grade-school and high-school kids, it’s also a part of a large open source robotics ecosystem that brings a lot more to the table than you might think. We talked with some folks at Google, one of the projects’ sponsors, about where the project is and where it’s going.

csm_Roberta_9e1215fc57Building a robot can be very simple — assembling pre-configured parts or building something small, quick, and cute — or it can be an endeavour that takes years of sweat and tears. Either way, the skills involved in building the ‘bot aren’t necessarily the same as those it takes to program the firmware that drives it, and then eventually the higher-level software that makes it functional and easy to drive.

OR, as an educational project, makes it very, very easy for kids to start off programming robots, but it’s expandable as the user gets more experienced. And since everything is open source, it’s part of a whole ecosystem that makes it even more valuable. We think it’s worth a look (along with something significantly more complex like ROS) if you’re playing around with robotics.

System Architecture

openRoberta.dotOpen Roberta is the user-facing middleware in a chain of software and firmware bits that make a robot work in a classroom environment. For the students, everything runs inside a browser. OR provides a webserver, robot programming interface and language, and then converts the output of the students’ programs to something that can be used with the robots’ firmware. The robots that are used in classrooms are mostly based on the Lego Mindstorms EV3 platform because it’s easy to put something together in short order. (But if you don’t have an EV3, don’t despair and read on!)

The emphasis is on ease of entry for the students and the teachers supervising the class. Everything runs in a browser, so there’s nothing to install on the client side. The students connect to a server that directs the robots, communicating with the robots’ own operating system, and uploading the students’ programs.

NEPO

inputParameter_animatedTo program the ‘bots in a browser, everything is written in a graphical programming language, NEPO which is pretty slick. (It’s also “open” spelled backwards. Sigh.) It’s based on Google’s blockly visual programming editor. You drag around blocks that correspond to sensors or loops or test conditions, and can assemble fairly complicated programs without typing a word of code. Which means that it frees young’uns from the pitfalls of “real” programming, like forgotten semicolons or mismatched parentheses. Instead, they get the abstractions without the syntactic hassles.

The blocks are broken into beginner blocks, which make the simulated (and real) robots into essentially a LOGO turtle, albeit one with a decent array of sensors. Opening up the box of “expert” blocks brings in standard programming constructs like functions, lists, and messages that allow the robots to talk to one another. In the end, it’s a decently rich programming environment, but it’s also one that has a very low barrier to entry.

The design of the blocks themselves is a major contribution to the ease of use of the system. For instance, instead of controlling the wheel motors directly, the motor blocks take information about the robot’s wheel diameter and track width, which makes it easy to turn the robot by 90 degrees.

The or_labsserver also runs a simulation of the robot, complete with obstacles and color tiles to sense, so the students can try their code out on a simulator before sending it to the actual physical robot for execution where it will run just like it did in simulation. (Or the students will learn a valuable lesson.) This unification of the simulation environment and the robot’s code is brand new, coming out in the last revision of Open Roberta Lab.

Of course, if you’re a single user, you can also install the OR server on your own laptop and use it locally, with your browser connecting to a webserver that’s run off the same machine. Or run it on a Raspberry Pi.

The Bots

On the other end, the robots originally ran on Lego’s EV3 platform running LeJOS, a Java-based environment. But recently, OR has been extended to connect up with ev3dev which is a more recent Debian-flavored Linux distribution. Both OSes can be downloaded to an SD card and simply slotted into your EV3 if you’ve got one. In the case of the LeJOS target, the NEPO code is turned into Java, and for ev3dev, it’s converted to Python. LeJOS is older and more stable, while ev3dev is newer, starts up faster, and appears to be getting hacked to work on other platforms.

logo_ev3dev_monoAnd that’s where things start to get even more interesting for us. We just started digging into ev3dev for this article, but it looks impressive. It’s got a lot more features than Open Roberta supports at the moment, from more sophisticated motor control to a much wider variety of sensors supported. For instance, it works with the XV11 lidar unit that we’ve showcased in the past. And although development has focused on the EV3 platform, there is recent support for the Raspberry Pi and BeagleBone. If we had a Pi-based robotics platform to try it out on, you’d be reading a review of ev3dev next week. Instead, why not browse their tutorials? Have any of you used it?

Wrapup

Open Roberta is interesting enough as a teaching tool for luring young kids into programming by giving them something tangible to move around — it’s a Turtle bot for the 2010’s with a lot more bells and whistles and a significantly richer programming language. But the fact that it’s entirely open source and moving toward a broader range of robotics platforms based on common single-board Linux computers makes it even more useful.

The Open Roberta team is very open to deploying on new hardware systems; they’re even thinking about adding an Arduino-based robot platform. So if you’re interested in getting a nicely-done higher-level interface for your own robot, even if just for use in the testing phases, you could do a lot worse than to make it interoperable with their ecosystem, either by hooking into OR directly or by using something like e3dev for your robot’s brain. You can hook up with the Open Roberta team via IRC on freenode.net in #open-roberta.


Filed under: Featured, robots hacks, Skills

No comments:

Post a Comment