# Standard Robotic Library

All,

I remember back in the late 1990s when the Standard Template Library for C++ came out. It made things that took days or weeks into mere hours to solve. It was a revolution in thought, a mind blowing leap forward.

I was thinking about robotics as I was driving home today, and it occurred to me that there seems to be a lack of standard libraries to solve standard programming problems.  To control a robotic arm, inverse kinematics library.  Put the number of arms, length of each arm, depth of the elbows, voila, you can control the arm.  How about a mapping algorithm for a wheeled robot that needs to cover an area (robotic lawn mower or iRobot Roomba-like bots)?  Put in the turn radius for the robot, length, width, axle length, etc and it will make a map of what it runs into.  Want a balancing robot?  Here's a library to make it balance.  Want to do some control of a heater?  Here is a PID library.  Have an encoder on that wheel?  Put in the distance per pulse, pins for led and pulse from emitter, how often to query the emitter, voila distance.  Learning algorithms?  Artificial intelligence?

I am new to robotics, so maybe I am missing some resources.  But it seems that these sorts of algorithms written in an object oriented way with a standardized approach would go a long way towards making robotics more attainable and usable by more people.  None of this stuff is really rocket science. We need reentrant, object oriented code with a small footprint. Pick and choose what you need, put the pieces together and it does what you want. The Arduino seems to be the processor of choice so an SRL for Arduino would be great.

And if it doesn't exist, all of us should work together to create this kind of repository of code on LMR.  Look at the open source movement and the impact that has had with Linux.  We really could change the world.

Regards,

Bill

## Comment viewing options

Well, I know that there are a couple of libraries for Python that can do AI and such.

Here's from a Google search I just did: https://sourceforge.net/projects/roblib/

It's young, but looks really cool.

Also, Willow Garage seem to have developed some sort of OS. But I personally don't really like it...

I will look into them.

Regards,

Bill

To be honest, if I wanted a robotics library, I'd probably make my own. For example, let's say I want to write it in Python because I love Python. I would find libraries for mathematics, kinematics, dynamics, AI, motion planning, collision detection and visualization. I would then write my own code for hardware abstraction (can't skip that, you really have to write it if you're making your own robot). I'll then make all the modules work with each other, and that's it. From there I just have to remember all the API and then code new hardware abstraction stuff for every new robot I make.

and very cool.  I think C++ is more used in embedded realm and can create native, tight code close to the silicon.  But, you are talking about exactly what I would want to do, but just different language.  Same lovely church tucked in the countryside, different pew is all

The ideoms which I believe in are

• It's neat to see \$2 million dollars of exotic hardware, but in the end - the surviving software is going to run on off the shelf components
• A good "standard" library or framework for robotics needs to run on as many platforms as possible - For example all OS's (Mac, Linux, Windows) are currently around because each has valid reasons to exist.
• A good framework must support being massively multi-threaded
• A good framework must be a model of "Service Oriented Architecture" - such that in a very complex system - sub parts, and minor systems can be brought up, paused, terminated, or restarted without causing deterement effects to the rest of the system.  If you stub your toe - this won't stop you from seeing with your eyes ;P
• A good framework needs excellent communication - It should have the ability of being distributed over multiple machine, multiple boards, and multiple systems - It should have a peer-to-peer network topology (This goes with the SOA design - where there is no central system but a distribution of equal nodes)
• A good framework need excellent version control and extension through pluggables
• A good framework should be able to communicate with the most popular micro-controllers - When you have PCs talking to micro-controllers - I think this is a design in robotics.  Use the best of both worlds. Computers are great for networking, visual processing, number crunching, voice recognition and other "higher" functions much like your Cerebrum,, while microcontrollers are very good for autonomous nervous like systems.  (Things which are very time critical - e.g. monitoring sensors, motor control, sensor control, etc)

I chose Java, for its current maturity, and the vast amount of well organized, and well written libraries which currently exist.  It being a compiled language might be challenging for some, but Java has many scripting engines, including Python - and interfaces can be created to support scripting.

So that's what I would want if I made a framework.

(now the plug) - MyRobotLab - (http://myrobotlab.org)