In the past year I have been working very hard with my robots. I have been lucky enough to have purchased a NAO robot. This robot is very high end. It comes with a number of SDK's. Python being one of them. With NAO robot comes a visual programming environment called Choregraphe. This entry will show how I have integrated Mathematica into this environment making use of the Wolfram Cloud.

Cloud access and Choregraphe
Being able to integrate Mathematica into the Choregraphe environment would mean that nearly all of the functionality of Mathematica can now be used by the NAO robot. The steps to achieve this are shown below.
1). Create an API Function in Mathematica.
2). Embed this function in the cloud using the Python option.
3). Copy the embedded code to a Python box in Choregraphe.
4). Create any Python code that is required to assist in execution of the function.
5). Finally execute the Python box in Choregraphe to test it
??Now to examine each step in detail. Steps 1 and 2 can be carried out as shown in the code below. Creating an API function and embedding it is done in one step strictly speaking. However it is good to be aware that there are two steps. The user must create their own function because the cloud address shown in the code image below no longer exists. This is the case simply because if it were still available a user of this site would be using my cloud credits. Cloud credits are required to use cloud functions. Visit Wolfram research for more details on cloud credits.
EmbedCode[ APIFunction[{"x" -> "Integer"}, #x+#x+5 &], "Python"]

Steps 3 and 4 can be carried out as shown in the image below. These steps are much like the first two steps they are carried out in one process. Create a Python box in Choregraphe and copy and paste the code shown above into the Python box as shown below. The red outline at the top is all the code pasted in from Mathematica. The red outline at the bottom is the code that will call the cloud function and get NAO to speak the result

I have now created what is called a box library in Choregraphe containing access to a great variety of Mathematica functions. For example my NAO robot can now make use of most of the machine learning functionality provided by Mathematica. The image processing and computer vision functions are also very useful to my robots. Access to all the math functions of which there are thousands. This means I do not have to sit and write code to carry out calculus. I am making use of one of the best computer algebra systems available.
However for the robotics purists out there. There is a small amount of latency that would not be good in a production environment. As I have stated many times before I am about testing and research. I can implement a system to allow the NAO robot to identify hand written digits 0-9 (using MNIST database). I know I could do this in minutes. Not hours or days, minutes. It is easy to see how a small acorn can become a very big oak tree using this setup.
I now apologise for showing code as images displaying the embedded code using the code option did not seem to work. I had to display the Python box used in Choreograph as an image because this will not display using the code option. I have created a small personal website to demonstrate all that I have done with my robots. The web site shows all the code I have produced for my robots so far and demonstrates how I have used it. There is a lot of code there. Far to much to place on a forum. My site can be found here