Linking Mathematica (computational Software System) To ARC

tezsmith

United Kingdom

Hi there. It has been a while since I have put anything out on the forum. My last visit was to show the modifications that I had carried out on a Mecanno G15 KS. With this goal achieved my next goal was to link a very powerful software system to ARC. This has now been achieved and I feel it is about time to introduce the basics to the forum.

I have three robots, a Revolution JD, a modified Revolution Roli and my G15 KS.

User-inserted image

User-inserted image

User-inserted image

I wanted to give these robots many abilities. For example the G15 KS can obtain location data from a mobile phone by reading the screen. As a programmer I could achieve this using C++/C# and the ezrobot SDK. However in my professional and personal life I use a software system from Wolfram Research called Mathematica. As ARC allows execution of external programs I knew I could request from a script that Mathematica starts up and carries out some computation and saves the result of the computation in a file that the ARC script can make use of. This as you will see later has been achieved.

Mathematica gives seamless access to a very large database with I believe over 12 trillion items in it and growing. This knowledge database can be found on the internet as WolframAlpha. Using this setup you will see that my robots can look at an image of say text on a computer screen or paper and interpret it and read it back. Having the ability to read text opens up a door to many more features. For example all my robots can read text and interpret its meaning. As you will see when prompted with the words "The capital of Scotland" the robots when asked to read the text simply repeat what they see. When asked to evaluate the text they reply "Edinburgh". Which as it happens is the capital city of Scotland. When asked to evaluate the Sin[Pi] the reply is 0. Now it gets even better all my robots can identify over 10000+ objects from an image. They can read letters off the screen that correspond to musical notes and in turn play a tune. The G15 KS can look at a series of dots on the screen that could relate to points on a map. Mathematica will link these points finding the shortest route passing through each point once and then plan a route for the G15 KS. In practice using the shortest route saves battery life. On returning to ARC the G15 KS moves relating to the points.

The code used to create some of these abilities using Mathematica is in general only a few lines of code. For example to identify objects in an image is simply one line of Mathematica code and some file input/output. Powerful neural networks can be created and trained in a very short space of time. Mathematica contains 1000's of industry strength algorithms. These algorithms allow for some really clever experiments with robots like ours at the lower end of the budget scale. As users we are not likley to exceed it capabilities. Mathematica contains functions for audio and video analysis, computer vision, machine learning, neural nets and a massive array of math tools. Not to mention seemless access to WolframAlpha. Also if by some chance I were to stumble upon an idea that required a lot of processing power Mathematica gives access to the GPU in a computer for parallel processing. Better than that you can also link copies of Mathematica to perform even faster on a network cluster. However I probably won't be worrying to much about these features yet.

To carry out computation Mathematica is executed from ARC any data required by Mathematica can be placed in a file called input.txt. Mathematica reads the input.txt file and carries out its computations and places any result in a file called output.txt. This is then picked up by ARC and the script continues to execute making use of the data found in output.txt. This allows me to experiment with ideas that might normally take days or weeks to program using C# and the SDK. After successful testing of an idea and knowing that it works writing C# code would now be worth while.

However there is a downside. Mathematica has quite a steep learning curve, actually a very steep learning curve. It is industry standard computational software system. Also Wolfram Research does not give there software away. A full commercial license is over 2000 sterling. That's out of my reach financially. Or so my wife tells me. Do not despair because the good people at Wolfram Research do a Home Edition that can be subscribed to. This is the version I use. In the UK it is priced at around 120 pounds anually. By the way I have no links with Wolfram Research I just like their product. I would talk and do talk in the same way about ezrobot. The Home Edition is heavily licensed for non-comercial use and I asked their permission to put what I have done out on this forum. They said yes. But I can under no circumstance be seen to make money from this. I do not want to get into legal battles with a billion dollar software company.

What follows is a video showing what linking Mathematica to ARC can accomplish and this is only the beginning. Creating complex systems to support ARC can be done very easily using Mathematica. I will make the code available quite soon. If anyone is interested. For me linking Mathematica to ARC and the Robots means I now have a fantastic robot platform to carry out some serious experimentation.

By — Last update

ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

United Kingdom
#1  

Finally thanks to DJ and the team at ezrobot for giving me brilliant robots to link Mathematica to.

#2  

Sounds interesting. I can't view your videos, they come up as "private".

#3  

I can not view either video. Don't know if it's me or what?

United Kingdom
#4  

Sorry about that. Forgot to make them public.

#5  

Well, you impressed me! Very nice work.

United Kingdom
#6  

Thanks very much. I plan to do much more when time allows.

#7  

@tezsmith We're not worthy, we're not worthy.... Brilliant man!:) Any chance you could convert this to an ARC skill plugin so others could use this?

United Kingdom
#8  

Yes I probably will at some point. Thanks for your comments. I will at some point make the ARC project and mathematica code available as well

#9  

@tezsmith... that would be phenomenal. Like I said, what you have done is just brilliant. I would absolutely love to incorporate this into my inMoov project.... Please keep us posted...:)

PRO
Synthiam
#10  

Very cool! Any chance this will become an ARC skill plugin?

United Kingdom
#11  

I am hoping too at some point. When time allows. It's crazy for me at this time of the year. However I am going to try.

#12  

Amazing! Very cutting edge.

Way over my head. However, the only question I can think of; Was that a bird the flew by the camera about the 2 min mark in the first vid?

United Kingdom
#13  

I did wonder if anyone would notice . You are obviously very observant. No rare birds flying round my office just my hand. Thanks for the comment about the work.