10
$\begingroup$

I'm currently building a robot with four legs (quadruped), 3 DOF (Degrees of Freedom) and Its been suggested here that I use a simulator to do the learning on a computer and then upload the algorithms to the robot. I'm using an Arduino Uno for the robot and what software could I use to simulate the learning and then be able to upload to the Arduino board?

$\endgroup$
2
  • $\begingroup$ Will you be using an existing robot or designing it and building it yourself? $\endgroup$ Commented Dec 21, 2012 at 1:26
  • 1
    $\begingroup$ I've built the robot already from scratch :) $\endgroup$
    – Jordan
    Commented Dec 23, 2012 at 8:34

3 Answers 3

3
$\begingroup$

Gazebo is a good tool for what you want to do. Since you're using a custom robot you will need to build a model for the simulator to use. They have managed to make doing so pretty easy but for a quadraped I can imagine it will take a bit of time.

Gazebo is also nice because it works well with ROS which means that if you build you could build a program to control your robot and send the commands to the simulated robot via the integration or to the real robot via rosserial. Just beware that if you have not used any of these tools then it will take some time to develop your solution.

$\endgroup$
2
  • 1
    $\begingroup$ I've had a look at some of the steps to install this and it looks like a long process and I'm very unfamiliar with most of it and I'm using a mac, which doesn't seem to hame much support. +1 for a plausible solution but I may have to keep looking $\endgroup$
    – Jordan
    Commented Dec 23, 2012 at 22:14
  • $\begingroup$ An alternative would be to build your own simulator with something like OpenGL. The complexity of doing so would depending on the kinematics of your robot and whether you will be simulating the dynamics. $\endgroup$ Commented Dec 25, 2012 at 18:14
2
$\begingroup$

This wouldn't cover the robot simulation, but the OpenCV Machine Learning Library might be useful for evaluating learning algorithms and training parameters to download to the robot.

It includes a neural network implementation, which may be of particular interest for this problem.

OpenCv is a standard library too, and would likely integrate well with some other simulator for the robot itself.

$\endgroup$
5
  • $\begingroup$ Would this really work? Can the OpenCV ML library fit on an Arduino? $\endgroup$ Commented Dec 21, 2012 at 1:28
  • 1
    $\begingroup$ Well no, but you could use it to train the parameters for a learning algorithm on an Arduino. $\endgroup$ Commented Dec 21, 2012 at 1:37
  • $\begingroup$ This is way to complicated for me, I'm only in high school and I was hopping for a much easier and friendly alternative. Perhaps a program that lets me design a virtual robot similar to my own and then displays the positions for each leg that I can just copy and paste (essentially) into the code of my project $\endgroup$
    – Jordan
    Commented Dec 23, 2012 at 8:39
  • $\begingroup$ In that case, maybe have a look at this question too: robotics.stackexchange.com/questions/697/… Robotics is complicated though, and robotics with machine learning is no exception. If you are serious about robotics in the future it wouldn't be a bad idea to learn something like OpenCV $\endgroup$ Commented Dec 25, 2012 at 16:37
  • 1
    $\begingroup$ Also, don't think that something is too hard to complicated just because you are in high school. There are lots of places (including this site) where you can find help if you get stuck. $\endgroup$ Commented Dec 26, 2012 at 1:29
2
$\begingroup$

The recently open-sourced V-REP simulator may suite your needs. I found it more approachable than Gazebo, and it can run on Windows, OSX, and Linux. Their tutorials are fairly straight forward. There are a ton of different ways to interface with it programmatically (including with ROS). It looks like there is even a tutorial for making a hexapod, which you could probably use as a starting point if they don't already have a quadruped example available. Unfortunately, I believe the simulator is tied directly with the UI rendering, which I believe is not necessarily the case with Gazebo.

So, your program would have to use one of the many ways to interface with V-REP, and then feed the performance of a particular gait, determined from some sensor in V-REP, into a machine learning algorithm (perhaps something from OpenCV as @WildCrustacean mentioned). You'd then have to come up with a translation from the gait description used by the simulated robot to something used to command actual motors on your Arduino.

On the other hand, you could make your own simulator using an existing physics engine, rendering it with a graphics library. Bullet and OGRE, respectively, could be used for this purpose, if you like C++. There are tons of others for other programming languages.

I would also look into how researchers who work on gait generation do their simulations. There might be an existing open source project dedicated to it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.