Andar

    The main idea of the project is to create a robot that has an Aruino as Backbone, an Android device as Brain, and a second Android device as Remote control.

    This project is my third robot, and I hope it get better than the previous two, (that's not too difficult due to the reduced functionalities of CDBot and Aum.

    It is a never ending project, intended to create a platform I can use to learn and test ideas. 


HARDWARE

 

  • The main chassis is the Robo Soul TK 100, it looks super nice, and it is really strong. The drawback I found is the strength of its motors.. they couls be a lot better.. nevertheless, I quite recomend it.
  • An Arduino Mega ADK as the Backbone, responsible of handling motors and sensors in the robot
  • A Arduino Mega sensor shield to make connections more clear.
  • An Android phone that acts as the Brain of the robot, responsible of directing the Backbone and of handling the sensors in the phone (GPS, camera, gyro, etc)
  • An Android tablet, that acts as Remote control, responsible of sending comands to the brain through internet or LAN when the robot is in remote control mode, or be a status panel when in autonomouse mode.
  • The sonar, built with 12 ultrasonic distance sensors (Same idea used by super droid bot anna, (in fact, that design is quite simmilar to what I was imaging).
  • I also plan to add infrared range finders to detect the presence of floor and roof.

SOFTWARE

 

The robot consist in three applications:

  • Code that runs in Arduino, and acts as Backbone
  • Code that runs on the cellphone placed on the robot and acts as its Brain
  • Code that runs on android tablet and acts as internet enabled Remote control
NOTE:  Most of us are into robotics as a hobby, and many times we have to "re invent the wheel", just because we don't have anything to get based on. (That's usually my case at least). To change that, Andar is an open source project, so, even there is not much to share for now, if you want to review the code, improve it, clone it ask me something about it, or whatever, you are more than welcome to do so. I always try to comment everithing, and always add a detailed message when pushing changes, so looking at the commit history will give ideas of what I'm working on. The repository can be found at https://bitbucket.org/nahueltaibo/andar/.


    I hope it can help anyone to get ideas, and help me to improve thanks to your comments and critics. And specially it would be awesome if you do the same with your projects. I'm sure our robots will be a lot better if we do so.



PROJECT PLAN

 

 Connect Arduino Mega ADK to Android

    For this connection I am using Android Accessory library. I also created a Message structure really easy to use. Its main idea is that you just push or pop values (int, byte, char, etc) to a Message object, so you are responsable to know the order of them on both sides of the communication.

    I did it this way so you can push for example, a byte for a message type, and then push all parameters that type of message needs. on the receipient side, yo pop that first type byte, and using that, you decide what else you should pop from the message according with the message type.

 

 Create the chain that connects Remote - Brain - Backbone

    This includes creating the Remote app, and enabling sending packages from Backbone's Arduino to Brain's Android, (through usb communication), and from there to Remote's Android (using TCP-IP communication). The other way is supported also, of course.

 

Design and learn how to 3D print some of the required parts of Andar Hardware

I created a 3D model of the chassis, and on top of that I'll design the pieces that I see that I'm needing. I think that will be easier that make them by hand.

Adding Camera support on the chain Brain - Remote

    Using internet to control the robot, without a camera makes no sense.. that is why I need to stream video from the robot to theRemote Control app




Add to it a range finder sonar ring

    As I plane it, it has one range finder every 30 degrees, so 12 range finders. if that is too much for the Arduino, (might be because of the response time of the ultrasonic sensors) I think that I'l use a arduino mini to handle all distance sensors. The advantage of this aproach will be also that I will be able to reuse the sonar on any other project. (Time will say)

 

 

 

Make it basically autonomous (just move through a room without kicking anything)

 

 

Enable switching from Autonomous to Remote Controled from the remote control

 


Send Android Brain sensors infomation to Remote

 


Add Autonomous Map creation, and usage


 


IMAGES

 

Sonar ring workingThe naked chassisTime to start assembling!The chassis arrived!






UPDATES

 

2015-10-31

Sonar ring15 years ago, when I was in the secondaty school, we dissasambled a fotocopy machine, and since then I stored two sensors that today I installed as wheel encoders. So, I'm now a step closer to start working on SLAM, I have something with that, I always wanted to do something in that field... the moment is coming (also the winter in here).

I've been also organizing the power wiring, i think it looks quite good.

Installed a hinge, so the red shell behaves as a car hood.

 

2015-10-24

Sonar ringI've been workin a little on the sonar ring. I'm now sure that it is possible to connect the 12 range finders to a Arduino Nano, using a single pin configuration. I got it working and upload the test sketch in my repo at https://goo.gl/z4f1DW. Anyway is almost a merged copy of the examples Single Pin Sketch and 15 sensor sketch that can be found in the newping library documentation.

I think it is time to start assembling the parts of the robot that I already have, so I can move it without thinking that I'll break every connection all the time. That sonar ring will look a lot better as soon as I hide a little more all those wires...

 

2015-10-16

I'm not sure if this can be called an "update" but I think it's important. Most of us are into robotics as a hobby, and many times we have to re invent the wheel, just because we don't have anything to get based on. (Thas is usually my case at least). That's why Andar is an open source project, so, even there is not much to share for now, if you want to review the code, improve it, clone it ask me something about it, or whatever, you are more than welcome to do so. I always try to comment everithing, and always add a detailed message when pushing changes, so looking at the commit history will give ideas of what I'm working on. The repository can be found at https://bitbucket.org/nahueltaibo/andar/.


I hope it can help anyone to get ideas, and help me to improve thanks to your comments and critics.

 

2015-10-14

Cardboard model of the sonar    After the recomendations of some good co-roboters, I started working on a model of the sonar ring.. The thing was that I thought that there was no way to accomodate 12 range finders in a layout small enough to fit my robot "design", but well, I never thought in puting the rangers vertical.. Thanks for the idea :).

I created a cardboard model, to check how it would look when I finally lern to 3D print the pieces I'm needing (I'll do a free course to learn about 3D printing oin two weeks, so I should start to get a better looking robot after that).

I'm not totally conviced with the sonar, but it looks good enough, It looks like a spiked dog collar.

 

2015-10-10

The video streaming is working! Not yet polished enough for a video dough. Anyway, I'm so happy that it was a lot more simple than what I was expecting!

Everything was thanks to this project: https://github.com/fyhertz/libstreaming

The problem that I have to solve is that I have a 5 sec delay when streaming from android to android!!! not acceptable.. If I stream from android to PC, the delay is 1 sec, so.. If I cant find a solution, I think my remote will be a PC instead of another phone.

I've been also thinking on the body of the robot, I got a nice bowl, (just 1,5 cad!) and I like how it looks as Andar's body. I'm also wayting for the servos and Pan Tilt parts that I'm planning to use on the head.

About the sonar ring.. 12 is too much.. too big, won't look good, so I think I'll use 6, attached to the neck, so I can rotate a little the head and complete a full circle of measurements if needed. I would love to hear your opinions on this points!

 

2015-09-25

remote controlRemote control is stable enough to consider it done. I uploaded a video showing the progress

 

 

 

 

2015-09-13

What a complicated hobby we like guys.. I'm a little ashamed of showing such a small update, when I see so many great robots, but well, everyone started from scratch at some time. So, here are the updates made to the project.

I've been woking on a messaging protocol and library to connect Arduino and Android applications. My idea is that anyone can use this library so they can avoid spending this long long time on creating a reliable connection between arduinos, and androids.

I also made some progress on Backbone, Brain and Remote applications, since now they are connecting to each other and moving Andar motors as can be seen in the latest video.

 

2015-08-25

Testing a possible body structure   

I've been creating a model of a possible head on cardboard, it looks quite well, but I have to decide what to do with the body since I don't like how it looks. The wide can represents what will be the sonar ring. I think I should make the body (below the sonar) fatter, It  might look better, Wall-e and and R2-D2 are that fatter also. What do you think? any ideas?

Also added the communication protocol section to the documentation.

 

2015-08-11

I've been fighting with Android sockets all weekend to stablish a reliable connection between a Remote and Brain. I did it, nevertheless, I will create a kind of start sequence that test that everything is in place so I can detecting those basic connection errors at startup. The best idea would be to create unit tests, but maybe that is to much for this robot :)

 

Navigate around via ultrasound, Uses Android and Arduino

  • Control method: autonomous, radio control
  • CPU: Android phone
  • Operating system: Windows, Android
  • Programming language: C++, Java, C#
  • Sensors / input devices: Sharp IR, camera, compass, accelerometer, HC-SR04
  • Target environment: indoor flat surfaces

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/andar

I love this chassis!

I’m looking forward to seeing this build develop.

I’ve always wanted to get a chassis like this - I even have the rough project in my head and it is amazing :slight_smile:

Unfortunately my budget does not allow for such luxuries, so I will have to make do with watching yours grow :slight_smile:

Are you a maker?

If It helps I would be able to make plans of it for you. So you can build the chassis with whatever material you have. Nevertheless I think you will need to buy some things,  like the motors, the tracks, the gears… but it will be a lot cheaper for sure. Those things can be bought by its own in aliexpress.  If you like the idea, check the prices and let me know if you would like me to build some plans of the parts of the chassis.

Cheers!

Not a good one!

Thanks for the offer buddy, but there’s no need to go to that trouble! One day I would love to fabricate some tracks like these, but i think I will have to save up and invest in a track kit to help; Im not the best when it comes to raw fabrication, heh heh.

I will be waiting for this

I will be waiting for this creation. Anyway super droid Anna is really awesome project. And this one maybe can give you more inspiration, ccsr robot made by Byerly : https://www.robotshop.com/letsmakerobots/ccsr

Thanks

Thanks for the recomendation! 

   I collected it so I don’t loose track of it :slight_smile: you are right it is awesome and I will get some ideas from it too.

do you plan any other

do you plan any other options for communications?

ex:

- arduino & ethernet shield <----> android to ethernet (http://www.ebay.com/itm/White-Micro-USB-to-Ethernet-LAN-Network-RJ45-Card-Adapter-for-Android-OS-Tablet-/271645058046?hash=item3f3f4ea3fe) & android

- arduino & wifi shield <-> android as ap

- bluetooth

btw I guess you need to finish the communication between those 2 devices as fast as possible, so you can start for artificial intelligence related things (deep learning , SRPL (search reasoning planning machine learning)), NLP, computer vision)

 

 

Oh I can wait for that!

This protocol and communication between apps thing is taken so long! And I dont have a lot of time to invest in this.

    I can’t wait for the day I start working on the subjects you mention! But first I think that I should give the robot a teleoperation mode, so I can save him if it screw up, without the need of fisically touching it.

About the ethernet connection, I don’t think it would be usefull, since I want it to be able to run as far as possible, and ethernet cables will be a problem there :).

    Each updateI post makes me realize how little I know. (becasuse of the list of TODOs that you mention) Its reallly greate to be part of this network, it motivates a lot, and It make me think that I can set my expectations a lot higher than what they used to be.

Thanks!

very cute

i like the style.

Nice

Nice project, the chassis looks good ! I have tried to find details about the motors which come with the chassis, but I could not find anything. Can you tell me more ? (at least the voltage ?)

Thanks ! :slight_smile:

Motors info

Of course LordGG!

    At least I can tell you what I know.

    Here is an image of all the information that the motor has. If you know how to decypher that, please let me know what is the current they require, because I just  understand the 7.2v part :slight_smile:

https://drive.google.com/file/d/15gJTX254AboHfIEUsbLIJZzx9sFPJ17moQ/view?usp=sharing

Thanks !

Thanks for the picture and the voltage value.

I have tried to find more about this motor, but I have found almost nothing :wink: The closest reference would be this one (RK-380SH) :
http://oncetop.sell.majlislib.com/pz5725599-dc-electric-motor-ot-rk380.html
But voltage doesn’t match your motor. RS-380SH is much more common, but it doesn’t help ;) 

Thanks

Thanks digi01!

   I’m glad to hear that, since that is one of my main ideas with it, I don’t want a Terminator!

Cheers

Andar will be a very cool bot.

I really like where you are going with this.  Thanks for mentioning my bot.  I’m going to be following Andar.  I think cramming everything in such a tight space will be the biggest challenge.

I’m in the process of building a new bot, similar to Anna and similar to Andar, but incorporating many lessons learned, some affect the sonar array.  I’m going with 12 on the next one, with a slightly different layout where the front ones are at 345 and 15, which means there is not one facing directly forward or to the sides.  Its exactly like Anna, but rotated 15 degrees.  This layout will help with decisionmaking and some other factors I won’t get into now.

What kind of sonars do you plan to use?  I’m using the cheap ones that have a trigger pin and a pin for getting the reading. It works well with the code I use, but ties up more pins than the smaller boards have.  I would love to offload this to a smaller board as you suggest, but don’t really know a way to do it yet.  You need a sonar that you aren’t forced to cycle through them all sequentially.  You will need to be able to alter the order of the firing at times so that you can fire some more often than others.  Depending on what sonars you choose and how you wire it up, this may not be possible…I know it is possible with the srf04’s.

The reason this is important is running 12 simultaneously will require some significant improvements and coordination to prioritize when to fire which sonars.  I learned a lot on this with Anna with 9.  It will be crucial with 12 unless you really slow down the forward movement speed on the bot.  Large arrays take time to cycle through, time you don’t have when the bot is full speed ahead coming up on on obstacles.

Good luck with Andar.  I love the platform and the look.  I’m planning some similar bits with the ears…trying to figure out how to get 2 degrees of freedom with each ear while keeping weight low.

Regards,

Martin

 

that motor’s rpm is to high,

that motor’s rpm is to high, I doubt the torquee is good enough

Now I have to 3d print it!

    Hah I saw your Ava robot!! it’s AWESOME!!! and now, I’m not happy with Andar again, I have to 3D print it! I already made the sketch for the body, to use as base to develop the parts. I never printed anything in 3D, but I always wanted to learn, so thanks to you now it is a main task in my robot development hah.

    About using 2 pins per range finder, there is an example on this link that shows how to use each rangefinder with only one pin https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home#!single-pin-sketch. I use it some time ago, maybe I’ll use something like that again. Im using HC-SR04 sonars, I bought like 20 of them just in case hah. I’ll also will follow your recomendation and use the angles that you mention.

   About fireing the sonars in sequence, you ar right, I’ll probably have to fire the fornt one more regularly than the back ones when going forward. I didn’t get to that point yet, but I’ll remember your recomendations when I get there.

   About the ears, do you think it is necesary to give that mvoement? Maybe having both of them moving with the same servo and just in one degre of freedom is enough. My intention at least to begin is to move them to top and back as a dog does to show attention or guilty (respectively). And with the eyes drawn on screen, I’ll have more than enough emotions.

 

Morot rpms

In the video can be seen the robots top speed. (and onlyone in there :slight_smile: )

Do you think that is to much? About the torquee, I’m quite disapointed with it… I don’t know if it is because I assemble the threads and gear to tight, but the robot is not able to go over a havaiana! so, for now, it will be a indoor flat surface robot. Until I change the motors I think.

correct me if I’m

correct me if I’m wrong

Quote: "About the sonar ring… 12 is too much… too big, won’t look good, so I think I’ll use 6, attached to the neck, so I can rotate a little the head and complete a full circle of measurements if needed. I would love to hear your opinions on this points!"

yes actually 12 is too much. What about adding another sensors ? sharp infrared,capacitive touch sensors, temperature sensors, gyro, compass, gps.

correct me if I’m wrong, I think your sonars is about 2 meters for it’s maximal range. What about adding this infrared: “https://www.robotshop.com/en/sharp-gp2y0a710k0f-ir-range-sensor.html”, from range 1-200 cm, we can use sonars. Then to detect longer obstacle, we can switch to “sharp ir gp2y0a710k0f” which the max range is about 5 meters. And for additional navigation method we can use opencv by adding a web cam or probably built in android cameras using MSER algorithm or hough transform, motion history, probably combined with laser to help in navigations. As for me, I’m using MSER algorithm.

================

quote:"The problem that I have to solve is that I have a 5 sec delay when streaming from android to android!!! "

If I saw from the rpm of your motor (from your motor test videos), 5 seconds delay in steering would probably enough time to collide on some obstacles meanwhile 1 seconds delay for pc I think it’s no problem. Don’t you plan any other libraries for streaming to android ?

 

about the body:

https://www.robotshop.com/letsmakerobots/files/userpics/u23439/20151006_201612.jpg

I think the body is better now, since this one has more space for adding more devices,sensors, compared to the first one it’s too small and will be hard to add devices and components inside (actually wanted to say this for a long time ago)

 

btw I saw your project is interesting just like what I saw from Mtriplet’s project. So I will keep following the project.

Sonar

Since you asked for thoughts, I’ll put some in.  As with anything, there are tradeoffs.

I can see how doing a big sonar array is a challenge as your bot is not quite big enough to hold very many cheap sonars…unless you used the Maxbotix ones, which are expensive.  Obviously a spinning LIDAR would be better, at a price.  I hope to put LIDAR on my next bot after AVA.

I obviously differ with the 12 is too much idea.  If you are going with sonar, I believe there is a strong logical and mathematical basis for 12.  If you go with less than 12, the tradeoff is you may not be able to use the Force Field Algorithm effectively…which you may not have been planning to use anyway.  I personally like it as a robot can drive around in a tight space, in smart curves, constantly avoiding everything, and not having to stop.

If you are willing to have the bot stop and think, then you can afford to have less sonars or use the IR sensors or something else.  The IR sensors work but they detect only at a particular point, so there is basically a huge blindspot unless you scan.  I personally wouldn’t use them unless I was stopping and panning a servo around.

I have a few observations on sonars that I don’t think a lot of people know.  My own experience is that a sonar does not detect many large objects in its field of view.  Sound waves get deflected.  Angles are everything.  Sonar detects things that are at an oblique enough angle to the direction the sonar is facing.  This means that a solid wall (like an outside corner where two walls come together, could be right in front of the sonar without it detecting either wall if the walls are at too much of an angle of incidence to the sonar.  I think of it like stealth…sound waves bounce off walls at too great an angle and don’t return to the sonar…the sonar is then blind to that feature, even though it is huge and right there in front of the sonar.  This is where a circular arrangement helps, as one of the sonars next to the blinded sonar will likely be hitting the same feature from a more direct angle, and will get a bounce back of the sound wave, and detect the feature.  While there will still be blind spots…sonars don’t detect cloth very well at all, walls will be detected the vast majority of the time.  When I tried anything greater than 30 degrees, my bot kept running into outside corners or walls at significant angles.  Try it for yourself though, put a single sonar on the front of a bot and drive it into a wall for a few hours or days at ever increasing angles.  That’s what I did and I felt like I learned a lot.  One of my conclusions was, once the angle gets too great, the sonar doesn’t see it.  

If I had 6 sonars…I would but them at 15, 45, 75, 345, 315, and 285…this would cover the front pretty well and be ok on the sides but not great.

If you mounted the sonars vertically, I think you could fit the ring inside a 6in circle easily…probably smaller…like 5in.

Another tradeoff I will attempt to explain in a scenario.  Lets say a robot has a goal heading of due north (0), which it has calculated by comparing its GPS coordinates to the GPS coordinates of its goal waypoint.  However, its sonars start detecting multiple obstructions in its path, some more or less forward, some forward and to the left, and another to the right but much further away.  The forcefield will result in the bot starting to turn slightly to the right, but somewhat close to the front obstacle…this obstacle will soon be at the robots direct left, until the robot finds a way around it, whereby the goal force will draw the robot through the gap and the robot can resume to its goal…which by this point may no longer be at 0, but might be at heading 350 or some such.  The importance of the ring is two fold…1)  to not have blindspots, and 2) So the robot can maneuver amongst the obstacles, finding the path of least resistance, without losing track of where the obstacles are in relation to the bot.  If a bot only has forward coverage, as soon as it turns too much, it can become blind to the obstacles and ignore a very relevant part of the force vector it should be following, and try to turn right back into them or not detect an open path between them.  When this happens, the robot starts to look stupid.  This is perhaps too difficult to explain clearly in writing.  If a bot rotates in place on a given spot with a given goal and a given set of obstacles, it is best (in my opinion) if the resulting force vector does not change by very much.  A circular layout can roughly achieve this.

You could try a disk that has 4 sonars on it, but rotates back and forth 90 degrees while the bot is moving to give more angles.  Synchronizing everything could be tough.

I wish I had the skills to do obstacle avoidance with OpenCV as the gentlemen suggested.  Sounds really cool, I question how reliable it could be made.

I think even a second delay is unacceptable and you’ll run into things.  I think you’ll need to run all your obstacle avoidance code on the Mega.  I would think that you could get USB communication to go a lot faster.  I don’t think I have anywhere near that delay.  Having said that, I do all the obstacle avoidance code on the Mega as I consider obstacle avoidance to be matter of robot survival.

Good luck whatever you do, I may have too many blindspots in my point of view due to my own experiments.  I look forward to seeing the results of yours.  

Regards,

Martin

What is your motor ?

Actually, what motor that you use ?

as for me, I’ve a problem in motor torquee until someone here (bdk6) helps me to figure out that motor shaft diameter (motor design, where usually the more bigger the shaft diameter, the higher the torquee)

and rpm (the higher the rpm, resulting in lower torquee). also motor gearing affect motor torquee (depends on gear configurations)

btw, wheel diameter also influences the torquee, the bigger the diameter of the wheel, resulting a lower torquee