NXT-Spy – The first fully parallel based robot control is working

The result of these last few months work is starting to put itself together to create the final project! Since last weekend, I can remote control my Lego robot over my Wi-Fi network using only parallel processes.

Here is a little video showing that the hole thing works quite smoothly.

[yframe url=’http://www.youtube.com/watch?v=T6JYIA7YZ_M’]

So for this part of the project, the only part I hadn’t worked on was the Bluetooth channel abstraction.

On the Android phone, I have coded a very simple channel and Bluetooth abstraction: We call a class called BluetoothLinkClient that instantiates a Bluetooth connection. We can then create a BluetoothChannelOutput that will use BluetoothLinkClient to write bytes on the previously created socket. Then, on the robot, I did exactly the same thing : a BluetoothLinkServer and a BluetoothChannelInput. Finally, on the PC, I did a simple UI, with OnKey events to write on the Wi-Fi socket every time a key is pressed.

To control the two motors separately from the PC, two bytes are sent to the phone and then transmitted to the robot, one for each motor. It could be interesting in the future to add a third byte for the speed because for the moment, as we only have one byte per motor, we can only send speeds from 1 to 256 or -124 to + 124 if we want also to be able to go backward.

Supervisor’s comment:

The demo was excellent.  The camera is a little offset which makes it harder to move the robot towards a distant object as the robot gets closer to the object.  This is needed for the next part of the challenge, where the robot identifies different coloured balls and moves then to a predetermined area.
The frame rate is more than adequate, even though resolution is not high but is still adequate for the challenge.
What is required now is to obtain a graphics pipeline for Java similar to RoboRealm as per the paper from Denis Nicole, so that we can do the interesting bit; namely identifying different coloured balls, moving towards a selected ball, catching it and moving it towards a place where the same coloured balls are stored.  That is we are building a ball sorting machine using a Lego robot.  The robot does not need to be any more complex in terms of additional sensors etc because we can just move the ball by having a fixed ‘catcher’ on the front of the robot.
Inevitably Arnaud has not done any more writing other than to undertake the modifications I suggested last time. For next week he needs to write up what he has achieved so far.  This will be the bulk of a chapter entitled ‘Initial Technological Exploration’

Leave a Reply

Your email address will not be published. Required fields are marked *