Category: Random stuff

A we wrote before, we are working on a Ultra-Wide-Band-based local positioning system for the Crazyflie. We are doing slow progress but progress anyway and we wanted to do a small update on it.

We are at our second revision on the anchors, they are now based on an STM32F072 CPU which has the advantage to have an USB bootloader which will useful to update them on the field. We are trying to think about either or not we should implement more communication like Ethernet to the anchor. Our main use-case is to get the localisation in the Crazyflie but we are aware of use-case where the localisation is required on the ground instead. If you have any input on the design of Ultra-Wide-Band anchors please let us know.

We have also made a 3D printed support for attaching the anchors to the ceiling or ground:

stand

As for the localisation, we are able to range from the copter to the anchors and we are logging the range using the Crazyflie 2.0 log subsystem. We have tested logging data in a csv file and running a Particle filter to find the copter position, more about the filter in a future post.  So far it looks good but we need a nicer way to visualize the data. The way we are taking is to learn and use ROS.

ROS is a system used by researcher in robotics and it implements a lot of things like visualization and state of the art algorithm. Wolfgang from USC has written a ROS driver for Crazyflie and it is about time we are getting into ROS. It is a learning process for us but the plan is to implement and test the UWB local positioning system on top of ROS, which will allow us to use its components and reduce development time.

On Thursday 2015-11-12 our web-servers were down for a few hours. Some unexpected updates in our hosing service made our storage solution stop. Unfortunately we had to restore our data from the latest backups to get the system back up and therefore lost all “new” data between 2:00 and 16:00 CET 2015-11-12. The services that were affected are the forum, the blog and the wiki. Any posts, new accounts or other user data that has been added during that period were lost. If your post/account/comment is lost, please add it again.

We are sorry about this and are working on finding a solution to avoid this in the future.

The last week has been really busy here at Bitcraze. We are working on regular bugfixes, support and new Decks to be release as soon as possible. But at the same time, we have moved our office in a new building (still in Malmö, Sweden) which is a lot of work, even more for us who have a lot of random hardware lying around. We left Minc, the incubator that hosted us since our beginning as full-time company. We where really happy at Minc, it has been a great place to work and evolve. We thought it was time to move to get closer to other hardware companies and to have a bit more space.

We are now at The Ground. It is a co-working space for startups that hosts some very cool companies. We are really happy to have moved there and are just started to settle-in. We now have a lab separated from the office (which is a first for Bitcraze, we are a bit anxious to be so far from the soldering iron but lets see how it works :-). The great news is that we are going to use the basement as an autonomous-flight-lab to develop the DWM-1000-based local positioning system. I am sure we will have more news on that in later posts.

Another important change: we now have a new member in our team! Björn, who arrived last week, will look, among other things, on refreshing the website and all our communication. The current website state is fully made by hardware engineer and we thought it should be shaped-up a bit.

Björn

Björn

Seeedstudio is our manufacturer and our main distributor. Last week Mandy from Seeedstudio came and visited us after being at Maker faire Rome. She did a very interesting talk at Minc, our incubator, about manufacturing in China and how Seeedstudio helps with agile manufacturing. The interest was high here in Malmo, it is not often someone from China comes to Sweden and talks about manufacturing. Usually you would have to travel to China to find out more about that.

If you would like to know more about what she talked about the slides are available on Slideshare:

 

Last week I was at Lua Workshop 2015 in Stockholm, it was a very interesting conference with lots of interesting people. I also had the opportunity to see the office of King, the host for the workshop, and it gives a lot of idea for fun stuff and toys we could have in our office :-)

On a side note we are organizing a presentation in our office in Malmö the 22nd of October: Mandy from Seeedstudio is visiting us and will talk about manufacturing in China. If you want to come you can register.

lua-logo-crazyflie

Now, back to Lua. Lua is a dynamic programming language that is small, fast and meant to be embedded within other programs. Currently is is used a lot in video games and a bit on servers. It has also be used in deeply embedded system with the eLua project, for example Seeeds sells a Lua-preloaded ESP8266 wifi module. One of our plan for Crazyflie 2.0 is to be able to write deck drivers in Lua.

With Crazyflie 2.0 we are aiming to make a research-grade flying platform more accessible and versatile, hence the expansion capabilities (with decks) and the new API we are writing for it. Lua would fit well in this goal. It would allow to very quicky script and test a device driver. As a bonus Lua being safe (ie. the virtual machine cannot crash the system), there would be no risk of crashing the copter with those kind of driver. The architecture would look something like that:

cfluaArchitecture

Though Crazyflie Lua integration has not been prioritized so far, we think it is something that would be interesting to play with it in the future. If anyone is interested into testing and helping out please reach us on Github or on the forum.

Last Thursday we went to LTH (University of Lund), to the Robotics department, to make some measurements on the ultra wide band (UWB) positioning system we are working on. The idea was to use one of their robots to move a Crazyflie around along well known path, and at the same time record as much sensor data as possible. This would give us data that we can crunch offline.

We placed four anchors around the robot and our positioning expansion deck on the Crazyflie. The Crazyflie collected the data from the positioning deck as well as its internal sensors and streamed the data it over USB to an external computer for storage. We collected the following data:

  • Distance to the anchors (raw measurements)
  • Air pressure at the anchors
  • Air pressure at the Crazyflie
  • Accelerometers
  • Gyros

The logs from the robot will give us the real position of the Crazyflie as well as the anchors, and from that we will be able to evaluate the performance of algorithms that use the sensors to figure out the position.

The dataset will be shared with the researchers at Lunds university, they have some interesting ideas they want to try out.

Next step is to crunch the data…

For more information on our UWB positioning project, see Firmware and dwm 1000 nodes

Marcus and Arnaud have packed up and left the Berlin Maker Faire after two hectic days. and last weekend Tobias and I were at Maker Fair New York. It’s a lot of fun showing the Crazyflie, meeting people and getting feedback from the community!

MF15NY_Badge1icon_Berlin

This time we had created a demo where we used a webcam to track the position of the Crazyflie (see older blog post). I really like the demo, it’s pretty minimalistic and shows the awesome capabilities of the Crazyflie as a platform that enables the user to explore and develop on top of it. Just add a webcam, AR-tag some control algorithms, imagination and engineering and you have an autonomously flying Crazyflie!

When Tobias and I arrived at the New York Maker Faire on Friday afternoon to set up the demo, we discovered that our booth was not indoors, but under a roof without walls. And it was windy!

mfny-tent mfny

There was no way the control algorithms could manage to keep the Crazyflie at its taget position, so what to do? We tried various ways of tethering it with a string while still flying, but without any success. We had to resort to hanging the copter in a string, but not really flying it. To at least get some use of the positioning system, we used the position of the hanging copter to change the color and intensity of LED-rings on four other copters that we put in the corners of the test rig. Not what we hoped for but what do you do?

My favourite gadget at the New York fare was the Pancake Bot – a must in every home!

pancakebot

The Berlin Maker Faire was organized for the first time last weekend. The venue was a bit smaller than other Maker Faires we’ve been to, but there was lots of interesting visitors and it was held in a very nice old railway-postal building. Fred from our community joined us during the fair and gave us some much needed support in the booth. As for the demo it was working better, but we still had some issues with lighting and the detection of the AR-tag. Room for improvement.

IMG_20151003_111805_small

The fair had a drone area, but unfortunately not a lot of drones. We were flying the Crazyflie 2.0 as well as a bigger quad using the Big Quad deck. Aside from that Fred brought a long his even bigger quad that uses the Open Pilot CC 3D.

IMG_20151003_140430_small

 

IMG_20151003_140908_small

Big thanks to Fred for showing us Berlin and helping us out!

 

 

This year we decided to save some time and split up for the last two Maker Faires. So last weekend Tobias and Christopher went to the Maker Faire in New York. They had a great but hectic time. More about it in a next post.

Meanwhile me and Marcus are going to Maker Faire Berlin next week end, from 2015-10-03 to 04. We will be standing in the Seeedstudio booth showing the Crazyflie. We’re also planning on having our first ‘meetup’ since we are sure to have at least Fred, the main Crazyflie Android client maintainer :-). We have created a forum thread to discuss it. If you are in Berlin next weekend and want to meetup and talk to us and other Crazyflie enthusiasts drop a line in the forum. The meetup will be somewhere in Berlin so do not hesitate to join even if you do not attend the Maker Faire. We will announce the exact time and place on the forum, it will certainly be on Saturday the 3rd.

icon_Berlin

On an other subject, Wolfgang, from USC, is having a talk at the IROS conference. He is going to present his research on Mixed Reality, where one of the platforms he’s using is the Crazyflie 2.0. We have visited Wolfgang’s lab and University before the Maker Faire Bay Area and we where really impressed, they are doing great research. Here’s the info on the talk:

Event: International Conference on Intelligent Robots and Systems (IROS), Congress Center Hamburg, Germany
Talk: “Mixed Reality for Robotics,” October 1, 12:20 – 12:35
Room: Saal A4
Abstract: link

IiROS logo

Last week and this week is busy with preparations for the New York and Berlin maker faires. Since we will be in the Seeedstudio booth we don’t have the same space as at the Bay Area Maker Faire, so we had to rebuild our “fly-cage”. The new specs are 1.7 x 0.7 x 0.7 meters. This is the area the Crazyflie 2.0 should be able to fly in for a full charge without touching the sides on the net.

We don’t have any special plans during the faire, except for flying during the day. So if you feel like meeting up, having a beer and getting lost in various technology discussions then leave a comment or drop us a mail.

The autonomous flying rig we used in bay-area was using the Kinect 2 sensor. This new rig is only using a standard webcam which is cheaper and easier to manage (ie. we do not need a Windows computer anymore). We are attaching an augmented reality marker on the top of Crazyflie and the image processing is mostly done by the ArUco library. ArUco is detecting the position of the Marker in 3D and the position is sent via zeromq to the controller. We used the same controller code as for the Kinect, we just had to tune it a bit better to keep in the smaller space. Then the controller is sending pitch/roll/yaw to the Crazyflie client setup to have a ZMQ as input device.

CPBrmPrUAAAKkEj

If you want to build the same cage then here’s a list of the parts:

  • Some kind of net (we used normal fishing net)
  • Fishing line (to tighten the cage)
  • Aluminium beam (for tents)
  • These 3D printed parts
  • Webcam with standard camera attachment (we use Logitech C920)
  • Camera attachment screw

We are in the process of cleaning up the code for the webcam. It will be pushed on Github and we will document the build on the Wiki.

DWM1000 nodes
Last hacking-Friday we have had some time to put together the DWM1000 boards we ordered during the summer. The DWM1000 from Decawave is an ultra-wide-band ieee802.15.4 radio transceiver that can very precisely timestamp packets arrival and departure. More simply it means that it is a standard and it can be used to implement a real time local positioning system: this could be really handy for the Crazyflie. We soldered all the boards and we got some basic ranging working on the nodes. The next step is to implement an opensource driver to be able to implement the ranging in the Crazyflie. We will keep you updated on the progress but in the mean time here is a photo of the prototypes:

DWM1000 nodes and deck

 

Things happening on the firmware side
Recently the commit rate for the Crazyflie 1.0/2.0 firmware has increased a lot. Some of it because of pull requests, great work, and some because we are starting to move in hacks and such on feature branches into the master branch. Our new college Kristoffer has taught us that having stuff on feature branches can be a bad idea, they tend to stay there. It is then better to have them compile switched and in the master branch as it is more visible and get a better chance of getting in for real.

Github crazyflie firmware contributions

 

Here are some of the recent thing going on:

  • A situation awareness framework originating from this pull request by fredgrat. It allows the Crazyflie 1.0/2.0 to react to triggers. Currently there is a free-fall, tumbled and at-rest detection. He recently also submitted an auto-takeoff functionality. Enable the functionality with the define here.
  • The beginning of a Arduino like API for the deck port. Currently GPIO and ADC are the only functions there but more will come.
  • Possibility to fly in rate (acrobatic) mode committed here. Support in the cfclient for this is being developed so currently one have to change the parameters to activate it manually.
  • Carefree, plus and X-mode implemented in firmware. There is also support for this being added to the cfclient.
  • Automatically switch to brushless driver. Motor driver being rewritten so it can be dynamically configured. This means that if the Crazylfie 2.0 is attached to the big-quad-deck it can automatically switch over to the brushless driver during power on.

Summertime are good times, less administration and more time to develop! As soon as things has been integrated and fully tested we will do a new release of the firmware and the cfclient :).