Robot demostration af Asimo

IMG_20150418_150009Vi fik i dag set Hondas Asimo Robot demonstration i dag i Experimentariumet. Det var en sjov oplevelse at se hvad det nyeste inden for robotteknologi er.

Honda har i 30 år arbejdet på gående robotter. Og nu viser de den nyeste version.

Den nuværende robot kan gå og løb op til 9 km/t. Hvilket er en forbedring i forhold til tidligere version. Det så mægtigt sjovt ud at se den løbe, da den var meget nede i knæene.  Asimo kan også gå op af og ned af trapper. Da den skulle gå ned af trapper skulle den først have justeret sin placering så det kom til at passe med at gå ned af, og den var vist ikke i stand til at justere sin placering på vejen ned. Så det tog lidt tid før at den kunne placere sig korrekt for at gå ned af.

Asimo kunne også hente drikkevare med en special bakke, sparke til en fodbold, danse og skulle kunne hælde fra en flaske til et pap bærer (vi så det kun på video).

IMG_20150418_150911Asimo var kodet til at kunne bevæge sig mellem nogle forud mærkede punkter på scenen. De var markeret med klistermærker med reflekser på. Showet var korregraferet så Asimo viste at den skulle stå et bestemt sted og så bevæge sig et andet sted hen og viste hvad den kan på den tur. Der var nogle forskellige programmer som den kunne gå igennem som blev styret via stemme kommandoer og en operatør inde bagved.

I demonstrationen blev der benyttet stemme komandoer til at bede roboten om forskellige ting. Jeg ved ikke hvor meget disse kommandoer den kender og hvad man kan få den til, om det bare var til at få roboten til at starte dens operationer.

For at se Hondas præsentation af Asimo her

Det er pt ikke muligt at bruge Asimo til noget, den kan primært bruges til at vise hvordan robotten kan bevæge sig. Hvis den skal kunne bruges til noget bliver den kunne genkende objekter og selv hen til dem.

Der er et stykke vej til at robotten kan fungere i hjemmet eller hospitaler. Det kommer til at tage noget tid, da der er nogle ting som den skal kunne. Jeg vil tro at inden for 5 år vil en sådan robot kunne lystre kommando og foretaget opgaver i hjemmet som madlavning og rengøring. Så er det spørgsmålet hvad sådan en robot vil komme til at koste. Om det er muligt at få den ud i hjemmet eller det kun vil være hospitaler der vil have råd til en sådan robot.

Book of the week: Cradle to cradle and SAP development

This week I was reading Cradle to Cradle from Michael Braungart and William McDonugh. The book gave room for thought. Both on how we create more enviormental friendly products. But was triggered me most was how it also applys to the usage in SAP.

Vishal Sikka mention the timeless software. Where software can continue to run for ever, but just get a new front.

As a developer you can also apply some of this. How do you make software that is easy to get started with.

See the video hire.

Upgrades in WordPress is just to easy

I really like the upgrade feature of wordpress. It is impressive how smooth it is to upgrade wordpress. Just click a button and it is upgraded. The same is true for plugins.
This is something that other webapplications can learn from. It is probably not easy to implement, but makes is much easier for users to use the system.

Creating Google wave robots in Grails

Updated 17/11: A grails plugin for Wave have been released see MasteringWave for more information.

I just got access to Google wave, where I would like to create a robot. A robot is a participant in the wave conversation and can do the same as everyone else in the wave. Wave robots can currently only be used by applications running on Google App-engine, so you need access to App-Engine. You can get this access here.

The application that I’m using is running grails, so it needs to fit into that application. When you read the robot functional specification, robots should extend AbstractRobotServlet. In grails Apps you have Controllers and no servlets, so this is a bit tricky. But really easy, when you find the trick.

To create your app, you need to create a grails app, to be deployed in app-engine using the Grails app-engine plugin. Follow the guide on the page and you should have an app running on app-engine.

I’ll use the wave robot tutorial as starting point for the app. The first thing you need is to download the following files and place them in the ./lib folder of your project.

  • wave-robot-api.jar
  • json.jar
  • jsonrpc.jar

The you need to create a capabilities.xml file. This is a configuration file, telling wave what your app responds to. capabilities.xml should be placed in the folder ./web-app/_wave/

<?xml version="1.0"?>
<w:robot xmlns:w="http://wave.google.com/extensions/robots/1.0">
  <w:capabilities>
    <w:capability name="blip_submitted"/>
  </w:capabilities>
  <w:version>1</w:version>
</w:robot>

You can add as many capabilities as you want. Remember the version element should correspond to you application appspot version.

Update: For a clarification on the version numbering see http://www.masteringwave.com/2009/08/capabilities-xml

You can add the servlet file that need to be extended. This is done by placing the file in the ./src/groovy or ./src/java in your project. If it is a groovy file, it should probably be place4d in the groovy folder. You should maintain the package path within these folders. Create the following file ./src/groovy/com/wave/ParrotyServlet.groovy. (It is not very groovy code, but it is a start)

package com.wave
import com.google.wave.api.*;
class ParrotyServlet extends  AbstractRobotServlet {
  public void processEvents(RobotMessageBundle bundle) {
    Wavelet wavelet = bundle.getWavelet();

      if (bundle.wasSelfAdded()) {
        Blip blip = wavelet.appendBlip();
        TextView textView = blip.getDocument();
        textView.append("I'm alive!");
      }

      for (Event e: bundle.getEvents()) {
        if (e.getType() == EventType.BLIP_SUBMITTED) {
          Blip blip = wavelet.appendBlip();
          TextView textView = blip.getDocument();
          textView.append("Copying: " + e.getBlip().getDocument().text);
        }
      }

  }
}

Then you need to add the servlet mapping this is done by installing the template. Run the following command, when you are in your project.

grails install-templates

Then you can edit the file ./src/templates/war/web.xml and add the servlet and the serveletmapping. This is done with the following elements. Remember that two elements should be placed after corresponding elements; otherwise the XML is not valid.

   <servlet>
            <servlet-name>Parroty</servlet-name>
            <servlet-class>com.wave.ParrotyServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Parroty</servlet-name>
        <url-pattern>/_wave/robot/jsonrpc</url-pattern>
    </servlet-mapping>

Deploy the service, and you can test you application. Create a new wave. Add you robot with the name <yourappspotname>@appspot.com. Try to add a comment and you should get something like this screencast.

This is not a very functional robot, but it works. To store data you can use a service, which can be called from the servlet.

Upgrade to WordPress 2.7

I have just upgraded to wordpress 2.7 and applied a new theme. I like the upgrade procedure, eventhough I deleted to many files and the theme. I would like my products to be just as easy to upgrade.

I like the new design, and hope to use it a little more.

Harddisk crash

I had the misfortune that my harddrive at my laptop crashed, it always gives a lot of problem. The largest is if the backup is up to date. The company we have a backup client at for the laptops, but it only backup information when you are in the office and as a consultant it is not every day I’m there, so there where some data which were not backed up.

I found a external harddrive case and placed the failed disk in, and tried to use the disk at an other computer. But it was not possible because there where some bad sections on the drive.

I then tried to use some of the free/shareware tools that lets you see, what information they can restore. The you have to pay for the program if you want to restore the data.

The only program i found, which could solve some of the problem. But it seem like it was looping around bad areas. So it could not be used.

The next step in the recovery process, was to use Linux. I have a dual boot Linux/Vista workstation at home. I was impressed how easy it was to get access to the drive.

First run dd_rescue, it works like dd but it has some error handling around the use of bad sectors. See (http://www.garloff.de/kurt/linux/ddrescue/ ) It was easy to install with apt-get at Ubuntu, and it should be easy with other systems.

The process of running dd_rescue took for ever. The 38G drive was processed in around 20 hours, and some of the processing was really slow.

The only commands that I had to perform was.

sudo apt-get install ntfsprogs ntfs-3g

ddrescue /dev/sdf2 hardrive.img

Press Ctrl-C to interrupt
rescued: 39933 MB, errsize: 24576 B, current rate: 85 B/s
ipos: 31444 MB, errors: 49, average rate: 670 kB/s
opos: 31444 MB

After running dd_rescue it was just to use mount the drive image as a loop back drive. Then there was access to all the information.
I suspects that it could be possible to use dd to write the image to a new drive an then use the computer again. But I got a re-installation of the computer to be safe. To copy the files I instead used samba to share drive image and then copied the files on the network.

sudo mkdir /media/windisk
sudo mount -o loop hardrive.img /media/windisk/ -o umask=000

And to make sure that Dell was not going to use the data for something else, I wrote a lot of garbage to it with shred.
shred -vfz -n 3 /dev/sdf2

It was the easiest repair i have performed on my computer so far. So there are no need to buy one of the expensive 50$+ restore drives, went it is possible to use a free version of Linux and other tools. I could probably have used the Ubuntu live cd for the backup.