Postcard from Dyalog ’14 – Saturday

Postcard

Welcome to the first of several postcards from Dyalog ’14 in Eastbourne. The last Dyalog conference/user meeting held in the United Kingdom was at Horsley near Guildford back in 2003 and we’re looking forward to holding it on what is, for a lot of us, home ground. Eastbourne is a resort on England’s south coast known for its promenade and pier (of which more later!), its hotels, guest houses and, by no means least, its conference centres. As a bonus, we should see some decent seaside weather – we can’t promise the Florida sunshine of Dyalog ’13 but the UK is currently having a much better than average late summer; the weather forecasters say it should continue and that we’re heading for one of the driest Septembers on record so let’s hope they’ve got it right!

Eastbourne weather forecast

All but four Dyalog staff have come to Eastbourne. We’re looking forward to sharing what we’ve been working on, listening to our users’ presentations and meeting attendees old and new – this is set to be the biggest conference we have ever held with 126 registrations in total (two more than it says in the programme due to two last-minute registrations after we went to press!).

Coming Up…

The programme kicks off tomorrow with Technical Workshops all day followed by three and a half days of presentations by Dyalog staff, users and invited guests, finishing on Thursday afternoon with the remaining Technical Workshops. We’ll report on some of the highlights of these presentations over the coming week. We’re making recordings of all the presentations and some of the workshops, and will be putting them all up on the Dyalog website over the coming weeks.

We do, of course, also have our “Viking Challenge” on Wednesday as well as daily evening entertainment, culminating in the banquet on Wednesday night. Originally we had the dining suite at the end of Eastbourne Pier booked for the banquet, but, as you may have seen, Eastbourne Pier suffered a major fire at the end of July and is now closed for rebuilding. Fortunately we have been able to secure The Grand Hotel as an alternate venue, and all is back on track.

All in all we anticipate a very busy – but enjoyable and productive – week and hope to summarise the essence of it here; check back daily for reports of events!

C3Pi Opens Eyes at the APL Moot

The "Three Blind Mice" at the APL Moot at the YHA in the Lee Valley

Sam Gutsell, Shaquil Sidiki and James Greeley (aka “Three Blind Mice”) at the APL Moot at the YHA in the Lee Valley

This weekend, the Dyalog C3Pi reached the final stop on the European spring tour, attending the British APL Association’s Annual General Meeting and “Moot” just north of London, where the robot met the famous mice from Optima. The day before, the C3Pi also travelled to an OSHUG meeting in London on Thursday, where Romilly Cocking was talking about quick2link. Alas, poor C3Pi was confined to a cardboard box due to problems with wiring up its new “eyes”:

Sharp "GP2Y0A21YK0F" IR sensors attached to the Dyalog C3Pi

Resistance is Futile!

Asimov’s third law of robotics states that a robot must protect its own existence. Thanks to the addition of a SHARP infrared distance measuring sensor, our robot is now capable of at least not running head first into walls or other obstructions (and if the obstruction is a spectator, we’re also providing some support for the first law)!

first-third-laws

C3Pi obeying the First and Third Laws of Robotics

Connecting the Sensor to the Raspberry Pi

The sensor is attached to an analog input pin on the Arduino (we picked pin #0). Our Arduino command interpreter, which allows APL on the Rasperry Pi to use the Arduino as a “controller” for analog and digital I/O, was extended with an “Analog Read” command consisting of the letter “a” followed by a byte giving the pin number and a dummy pad byte in order to ensure that the command length is 3 bytes (the fixed length simplifies the interpreter). Thus, if APL transmits (97 0 0) to address 4 on the I2C bus, and then issues an I2C read command, it will receive a string containing the current voltage (up to 5v, in 1024ths) measured – for example “a0:480;” if the input is 2v. We elected to include a confirmation of the pin number in the result, and separators which will allow us to send several sensor input values in a single string, as we add more sensors to the robot.

In the APLBot GitHub Repository, The DyaBot class has been extended to run a background thread which updates the value of a new property called “IRange”, every 100ms (a public method UpdateIRange can be called at any time to refresh the value). The input voltage is converted to a distance in centimetres, using the tables from the sensor datasheet. The next blog post will illustrate some of the data that we are now able to collect from the sensor.

The DrivePi game code also runs a background thread which monitors the value of IRange, and stops the wheels if the measured distance drops below 20cm – but this code still needs some testing and tweaking.

Accelerometer and Gyro on the Way

My experience to date is that controlling the robot is a little bit tricky, because the output of the wheels seems quite variable (changes from day to day, and from hour to hour). Determining the position of the robot using “dead reckoning” based on the voltage applied to the wheels seems unlikely to succeed. We either need to find some more reliable wheels – or find some sensors that can help us understand what is going on.

I have been able to lay my hands on an MPU-6050 motion tracking device from InvenSense. We’ll be trying to wire this up over the next couple of weeks and see whether it allows us to accurately track the motion of the robot. We will also soon take delivery of an ultra-sonic sonar mounted on a servo, so we can start measuring longer distances accurately (the IR sensor is really only suitable for collision avoidance). Once these are wired up, all we have to do is write “a little” APL code to do the localization and mapping!

GSE & APL Germany in Hamburg, 29th&30th April 2013

Gitte Christensen and Morten Kromberg will be attending the “GSE Arbeitsgruppe APL” meeting on April 29th, and speaking at the “APL Germany e.V.” meeting on April 30th, at ERGO Versicherungsgruppe AG. The key topics are likely to be performance, new language features proposed for version 14.0, and controlling robots using APL. Check out the complete agenda for the two days.