Category Archives: Cool Stuff

World of Quadrocopters

A brave student have just sent a few amazing Videos about some very interesting projects using Quadrocopter-Technology.

ETH Zurich, Institute of dynamic systems and control

Flying Machine Arena – Overview 2010

[youtube JDj5jtDUD8k]

Quadrotor Ball Juggling

[youtube g8O5RBcwmjY]

GRASP Lab, University of Pennsylvania

[youtube YBsJwapanWI]

TARMAC Project in the Hybrid Systems Lab at UC Berkeley (EECS department)

Autonomous Flight and Obstacle Avoidance with Kinect Sensor

[youtube eWmVrfjDCyw]

Cool new gadget II …

Yeah “The Postman Always Rings Twice” 🙂 particularly ours……..,

I have just received my new gadget. Yes, its a Kinect Cam.

First tests look very impressive and promising. We will use the cam for our AAL project Healt@Home., and for our stundent projects too 🙂

For the first tests I have used the NUI Kinect Driver SDK.

Next steps will be to get the depth data into OpenCV, aForge, ImaqVision,…..

Stay tuned for more…..

How to run Apache 2.2.x with multiple SSL certificates via one IP

I never thought that could be a problem. Well after digging around for HTTP+SSL (multiple certificates) and after understanding how it works, yes this is definitely a problem :-).

But there is light at the end of the tunnel called SNI (Server Name Indication). SNI is an extension for TLS .

The idea behind SNI is that the clients domain name request is deferred until the certificate is exchanged between the the two parties . This gives the server the change to switch to the right named virtual host :-)…. yeah thats cooooool.

See here RFC3546 (Section 3.1) for an in deep description.

SNI works with (according wikipedia):

  • Mozilla Firefox 2.0 or later
  • Opera 8.0 or later (the TLS 1.1 protocol must be enabled)
  • Internet Explorer 7 (Vista or higher, not XP) or later
  • Google Chrome (Vista or higher. XP on Chrome 6 or newer[7]. OS X 10.5.7 or higher on Chrome 5.0.342.1 or newer)
  • Safari Safari 3.2.1 and newer on Mac OS X 10.5.6 and Windows Vista or higher, not XP
  • Any Apple iDevice running iOS4 has support for TLS server name indication.
  • Android

If you want to use SNI for your server you have to put your *.443 hosts configs into one file.

Listen 443

NameVirtualHost *:443

# Also accept connections from none SNI capable hosts
SSLStrictSNIVHostCheck off

# This is our default virtual host.
 DocumentRoot /www/blub1
 ServerName www.blub1.at

# Other directives here

DocumentRoot /www/blub1
 ServerName www.blub.at

# Other directives here

 

have fun

Mario

Fly High, Fall Far

Holly Molly this day was a bad day 🙂

At a test flight with one of our early prototypes we had lets say a unforeseen occurrence.

The short story …  After hovering around at our testing side and testing some controller configs our Copter suddenly defies our control. The QuadroCopter was just landed by our brave pilot, as it suddenly spinup its motors and started for a moderate and well balanced ascent towards the sky. You could imagine, in my brain was only one sentence, WHAT THE HELL was going on. Yeah and the hell was really going on. After a minute or so the Copter was only a  tiny black point in the sky… nice…  there it goes… up to the stars… This would be a new altitude record for Quadrocopters… indeed. I did a short phone call to notify our police… just in case…. :-).

The End of the Story…, nothing stays in the sky, this is also the case with our Copter.

A picture is worth a thousand words, see for your self what we found after the “landing”

One thing I should mention: The failure was a configuration mistake on our side!

AVR Linux Toolchain gcc 4.4.4

Over the weekend I had time to build a new AVR toolchain with the latest 4.4.x gcc.

Linux AVR Toolchain:

  • C,C++ support added (22.08.2010)
  • gcc 4.4.4 (xmega support)
    • gmp 5.0.1
    • mpfr 3.0.0
      • latest cumulative patchset see
  • binutils 2.20.1
    • avr patchset: size, new devices, xmega and new sections
  • AVR Libc 1.7.0
  • gdb 7.1

Toolchain download size 93M.

Have fun!

Please give me some feedback if you use this chain. 🙂

umulative

Waterstorm, Crimson Tide@home

A few years ago my friend and fellow worker Markus Prossegger and myself had the chance to contribute to an innovative computer game called waterstorm. Waterstorm was forged by a young innovative company named Rarebyte which was founded some years ago by a young team of Telematic/Network Engineering graduates.

The game belongs to the 2D multiplayer shooter genre. It is entirely written in java, They decided to use lwjgl for the game engine and FengGUI for the Graphic User Interfaces.

Our part was to implement the Bot System considering the intelligent bahavior of the bots as well as an automatic path finding, which is Markus’ hobbyhorse. To make it short – if you ever want to know how a navigation system finds the right route, ask Markus, he will explain it to you in detail 🙂

Markus will shoot me 🙂 but in the next few sentences i will try to describe what kind of algorithm we decided to use.

Little change of the master plan, Markus misplaced his gun, so he will explain it to you 🙂 ….

Markus its your turn.

First of all we had to decide, what the overall game behavior of the bots should be. We wanted them to act like a human player: (a) select a target, (b) find the best way to the target, (c) attack it or (d) flee to some power ups in case of low ammo or low health. The task of (a), (c) and (d) is simple: if the bot has enough ammo, than attack the closest enemy (could be another bot as well). If the ammo or the health is low, than select one of the power ups as the target. The task (b) is the more sophisticated part of the Bot System – the bot has to find a shortest path towards the target (the enemy or the power up). There are a lot of well-known shortest path algorithms out there, that will handle the task.

But there are some points that have to be considered: the path must not be predictable by a human player (so simple „follow-the-shortest-path“ won’t work) and the server has a limited capacity (there are a number of bots in the game, so the algorithm has to be designed very resource-conserving).

So we decided to use one of the shortest path algorithms, that uses a heuristics to search the space to efficiently reduce the time needed and to „manipulate“ the outcome of the algorithm: the path. We have picked the IDA* (IDAstar), which is a variant of the A* algorithm and allows to perform a series of independent depth-first searches, each with the cost bound increased by a minimal amount. This leads to two ways, to manipulate the resulting path between the bot and its target. First the estimation value (used in the heuristic search) can be blurred by a random value and second the number of iterations can be limited. Both together leads to an unpredictable path as well as speeding up the time needed for the path calculation.

It’s fun to play against the bots – just try it for free at www.waterstorm-game.com

There is always another one who did the job

A few months ago me and my colleagues wrote a project proposal for an internal project call/funding. Our goal was to evaluate the possibility of using small drones, in our case we want to use Quadrocopters, for catastrophe management. Our drones should be used as communication relays, disaster reconnaissance, air gas analysis…

Since a few of us are active members in certain Quadrocopter OpenSource community projects, we have also a basic knowledge about this type of drones.

But sadly we didn’t got the fundings 🙁  just a matter of politics,…….

But as I wrote in my caption There is always another one who did the job in our case the guys from the TU Ilmenau.

[youtube whogQY0h8Sc]

If you would like to read the whole article refer to spiegeltv.de link. (German only)

OpenKM our new Document Management System, nice…..

For months I was searching for a system capable to track and store out internal documents. I tested several systems like alfresco, opendocman,…..

In the end I decided to give OpenKM a try.

OpenKM runs on a JBoss application server, so you are bound to Java.  They use Jackrabbit for their hierarchical content storage.  The frontend is realized with GWT (Google Web Tollkit).

For a full feature list click here.

OpenKM install hints:

I installed OpenKM on a recent Debian 6.0

Getting .pdf, .docx, .xlsx preview running:

First you need to install OpenOffice. Make sure you install …-math, …-writer, … -draw, …-calc packages.

OpenOffice hast to bee run in headless mode. I use following startup script:

#!/bin/sh
### BEGIN INIT INFO
# Provides:        OpenOffice Headless
# Required-Start:    
# Required-Stop:    
# Default-Start:    2 3 5
# Default-Stop:        
# Short-Description:    OpenOffice Headless
### END INIT INFO

PIDFILE=/var/run/openoffice-server.pid

case "$1" in
'start')
 if [ -f $PIDFILE ]; then
 echo "OpenOffice headless server has already started."
 sleep 5
 exit
 fi
 echo "Starting OpenOffice headless server"
 soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard & > /dev/null 2>&1
 touch $PIDFILE
 ;;
'stop')
 if [ -f $PIDFILE ]; then
 echo "Stopping OpenOffice headless server."
 killall -9 soffice && killall -9 soffice.bin
 rm -f $PIDFILE
 exit
 fi
 echo "Openoffice headless server is not running."
 exit
 ;;
*)
 echo "Usage: $0 { start | stop }"
 ;;
esac
exit 0

To get the preview stuff working you need also pdf2swf. Check your /bin directory there should be a pdf2swf executable or if you prefer you could take the swftool package from ubuntu.

The last step to get the previewer feature running is to set the corresponding config. flags at the OpenKm.cfg file.

  • system.openoffice=on
  • system.pdf2swf=/usr/bin/pdf2swf

Mail Notification configuration:

Mail notification is straight forward. Go to /opt/OpenKM-4.1_JBoss-4.2.3.GA/server/default/deploy/mail-service.xml . Edit the section to your needs.

If you face the problem that the links in your notification mails are pointing to localhost, you can alter the application.url flag in your OpenKM.cfg.

  • application.url={yourURL}:{yourPort}/OpenKM/es.git.openkm.frontend.Main/index.jsp

Changing from port 8080 -> 80

GoTo /opt/OpenKM-4.1_JBoss-4.2.3.GA/server/default/deploy/jboss-web.deployer/server.xml and edit

Change the port field to 80.

Securing your JBoss

One last thing needs to be done :-). Security! Holy Moly… what… yep.. Jboss runs out of the box like an open barn door. So a good idea would be to secure the jmx-console and web-console stuff. Because of that the jmx-console and web-console are standard servlets you can protect them very easily via enabling the security-constraint.

Securing the jmx-console:

1. Edit \server\default\deploy\jmx-console.war\WEB-INF\web.xml and uncomment the security-constraint section:

<!-- A security constraint that restricts access to the HTML JMX console
 to users with the role JBossAdmin. Edit the roles to what you want and
 uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
 secured access to the HTML JMX console.-->
 <security-constraint>
 <web-resource-collection>
 <web-resource-name>HtmlAdaptor</web-resource-name>
 <description>An example security config that only allows users with the
 role JBossAdmin to access the HTML JMX console web application
 </description>
 <url-pattern>/*</url-pattern>
 <http-method>GET</http-method>
 <http-method>POST</http-method>
 </web-resource-collection>
 <auth-constraint>
 <role-name>JBossAdmin</role-name>
 </auth-constraint>
 </security-constraint>

 <login-config>
 <auth-method>BASIC</auth-method>
 <realm-name>JBoss JMX Console</realm-name>
 </login-config>

 <security-role>
 <role-name>JBossAdmin</role-name>
 </security-role>
</web-app>

2. Edit \server\default\deploy\jmx-console.war\WEB-INF\jboss-web.xml. Uncomment the following section:

 <jboss-web>
 <!-- Uncomment the security-domain to enable security. You will
 need to edit the htmladaptor login configuration to setup the
 login modules used to authentication users.-->
 <security-domain>java:/jaas/jmx-console</security-domain>

</jboss-web>

3. Edit \server\default\conf\props\jmx-console-roles.properties file

4. Edit \server\default\conf\props\jmx-console-users.properties file

5. Edit \server\default\conf\login-config.xml edit following section

 props/web-console-users.properties
 props/web-console-roles.properties

6. under \server\default\conf\props\ copy and rename the two jmx-console-xx to web-console-xx.

Automatically start OpenKM (Jboss) via init scripts:

If you want to start your OpenKM automatically at boot time you can use this init script:

#!/bin/sh
# /etc/init.d/jbossokm: Start and stop JBoss Application Service
### BEGIN INIT INFO
# Provides:        OpenKM
# Required-Start:    
# Required-Stop:    
# Default-Start:    2 3 5
# Default-Stop:        
# Short-Description:    OpenKM
### END INIT INFO

ECHO=/bin/echo
TEST=/usr/bin/test
JBOSS_START_SCRIPT=/opt/OpenKM-4.1_JBoss-4.2.3.GA/bin/run.sh
JBOSS_STOP_SCRIPT=/opt/OpenKM-4.1_JBoss-4.2.3.GA/bin/shutdown.sh

$TEST -x $JBOSS_START_SCRIPT || exit 0
$TEST -x $JBOSS_STOP_SCRIPT || exit 0

start() (
 $ECHO "Starting JBoss OKM."
 rm -rf /path/to/server/default/tmp
 rm -rf /path/to/server/default/work
 rm -rf /path/to/server/default/log
 su -l -c "$JBOSS_START_SCRIPT -b 0.0.0.0 > /dev/null 2> /dev/null &"
 $ECHO "Done."
 )

stop () (
 $ECHO "Stopping JBoss OKM. "
 su -l -c "$JBOSS_STOP_SCRIPT -S > /dev/null &"
 sleep 10
 $ECHO "Done."
)

case "$1" in
 start )
 start
 ;;
 stop )
 stop
 ;;
 restart )
 stop
 sleep 30
 start
 ;;
 * )
 $ECHO "Usage: jbossokm {start|stop|restart}"
 exit 1
 esac
 exit 0

Shutdown problems (network unreachable exception)

If you get an exception at shutdown or your shutdown script does not kill your JBoss then you could check sysctl-setting under /etc/sysctl.d/bindv6only.conf.

Make sure that the net.ipv6.bindv6only=0. !

If you would like to show your appreciation consider to support the guys from OpenKM with a donation 🙂

See PayPal subscription link at the bottom of the page