Blog

After a couple of chaotic months of warehouse and logistics issues we’re now almost back on track! As noted before we’re now shipping orders from our E-store directly from our office in Sweden and we’ve now restocked all the products (except for old CF1 spare parts which are coming).

One of the few issues we have left to solve is with shipping orders containing batteries to Canada, India and Australia. Unfortunately we’ve had lots of issues so we’ve temporarily had to block orders containing batteries to these countries. So during checkout if you have products containing batteries and the shipping country is one of the above, you will not get any shipping quotes and will therefore be unable to check out. Orders without batteries, like LPS products will pass the checkout just fine. We have found a solution for this and we’re working on implementing it, so bare with us it should soon be fixed!

Photo by frank mckenna on Unsplash

Like every summer, things slow down and people starts to go on vacation. This is a perfect time to sit down and start fixing various things that we never have time to fix. We call that the Summer cleanup. This summer there will still be a bit of development though as we are finishing the multiranger deck.

On the cleanup side, there is at least a couple of things we plan to look at:

  • Updating the virtual machine to the latest Ubuntu version
  • Looking at the Crazyflie firmware build system to make it cleaner and easier to expand for new platform. There is the RZR and the LPS Tag boards that will come later in the year and will need to be supported by the Crazyflie firmware.
  • Implementing a startup test that can detect bad propeller and bad batteries. This would improve a lot the experience of flying a Swarm of crazyflies.
  • We have been continuously improving the webpage last year, this will continue during the summer.

If you have any ideas of areas you feel we should focus on, even better if you want to help with some things and fix it together with us, just tell us in the comment.

A while ago we bought an HTC Vive for the Bitcraze office. This was partly for having fun with VR, but is was mostly because we had hope to use the vive tracking system with the Crazyflie. We are making progress with the idea and we just received our latest prototype:

The Lighthouse tracking system is the hardware component of steamvr tracking, it is used by the HTC vive to get the full position and orientation of the Vive VR head mounted display and game controllers. It has sub-millimeter precision and low latency, which is key to achieve immersive VR experience. The system works by having base-stations installed in the room. The base station sweeps two rotating infrared laser planes. A receiver is basically a photodiode, by detecting when the photodiode is hit by the sweeping lasers, the receiver can measure at which angle it is seen by the base station. With enough receivers and/or base-stations, it is possible to calculate the receiver position and orientation. If you want to read more about how lighthouse works, there has been awesome work of reverse engineering and documentation made by the open-source community.

As far as Crazyflie is concerned the lighthouse system has one major advantage: the position and orientation can be calculate in the tracked object which means that the Crazyflie can be completely autonomous and there is no limit in the number of Crazyflies that can be tracked at the same time.

Lighthouse has been my fun-Friday project for a couple of month and the early results are very encouraging.This is still very much work in progress, so stay tuned for future blog-posts about the subject :-).

 

Malmö is known to be very beautiful in June. At least that’s what i’ve heard from the Bitcraze team when we talked about having a meet-n-geek in their offices in Sweden.

I’ve been working on the crazyflies and developing artist friendly interface to control them for a year now, and I always was impressed with their philosophy of work and communication. Over the past year, they’ve helped me and my companies a lot to be able to create the shows we want, with our specific needs and constraints, that researchers don’t have, like fast installation time, or confidence in drone take off (you want to make sure that a drone won’t hit the theater’s director’s head at the very beginning of the show !).

 

For that I created LaMoucheFolle, which is an open-source software with a nice UI to be able to connect, monitor and control multiple drones. LaMoucheFolle is not made to be a flight controller, but acts more as a server that any software will be able to use, like Unity or Chataigne. That way, people and users don’t need to handle all the connection, feedback, warning, calibration process and can concentrate essentially on the flight and interaction.
While the fist version of LaMoucheFolle got me through most of the demos and workshops, I knew that it could be vastly improved if I understood better the drones, so I decided to ask the creators to meet them, and here I am !

As I hoped, being physically there allowed me to understand better what are their practices, and allowed them to better understand mine, so we could find a way to improve both their Crazyflie ecosystem and my contribution to it.

So I refactored, redesigned and improved LaMoucheFolle to a (soon to be released) V2, featuring :
– New drone manager interface  with a more intuitive feedback of the drones
– New multi-threaded drone communication mechanism
– New state-safe sequenced initialization and flight control of the drone, with a progressive take-off vastly increasing its stability
– Unity demo app and Chataigne demo session to show how to control from other softwares via OSC

 

 

 

While developping the new version and talking to the team, some key features and improvements for the use Crazyflies in shows were discussed and some of them are now in research/development :
– Health analysis : using the accelerometer’s data and Tobias’ magic brain, it allows to test the motors while the drone is on ground and find out if one or more are problematic (too much or not enough vibration, meaning either the propeller or the motor needs to be repaired/replaced)
– Battery analysis : when the battery is fully charged, this allows to have an automated motor sequence which will find out if the battery has an abnormal discharge behavior
– Steath mode : Shut down all the system leds (the 4 builtin leds on the drone) so it can be invisible, ninja-style
– Normalized battery level and low battery log values : it allows for safe and consistent feedback of the battery level in percent, and an indicator if the drone should land soon. It will also possible to use this value to monitor the charging progression of a drone.
– LedRing fade pattern : This mode allows for easy fading between solid colors on the led ring, so it’s not necessary to stream all the colors from one color to another, but instead having a very beautiful smooth interpolation, using only 2 parameters : the target color and the fade time.

I hope you are as excited as I am about those new features, and if you’re not, please tell us what would make you “vibrate” !

I’ve been spending the last week at their office, and it was a great week : I initially came to improve my software, and discuss about future development of the Crazyflies [which was great], but what i’ll remember the most from this trip is by far the human aspect of the Bitcraze team.
Marcus, Kristoffer, Tobias, Björn and Arnaud are amazing and i’m really happy to have had the chance to see them working, and collaborate with them. I admire their choices of being fully transparent on their work and amongst themselves, and there is a natural kindness mixed to the passion for their project that makes working there feel like everyday’s special. Also, Malmö is very beautiful indeed :)

Thank you very much and I hope to reiterate the experience soon,

Skål

 

 

The Crazyflie 2.0 has been flyable in MoCap systems such as Qualisys, Vicon or Optitrack for quite a while thanks to the Crazyswarm project. For the MoCap systems to be able to track the Crazyflie it needs to be fitted with reflective markers. These can be attached on e.g the motor mounts which in some cases might be the best solution, however we also liked the idea of creating a deck where the markers easily can be attached and in many, repeatable configurations, that is why we created the Mocap deck. This deck is now soon to be released but before we start manufacturing it would be great to get some feedback.

The deck has M3 sized holes which is spaced on a 5mm grid. The deck also has footprints for two optional push buttons that can be used to e.g. trigger a take-off or start of a demo. And as the battery holder deck, which has no electronics, so this can be mounted upside down for better fitting of the markers, if the buttons aren’t mounted of course.

We are collaborating with Qualisys, also based in Sweden (in Gothenburg), to make the Crazyflie more moCap friendly and make it easy to use together with the Qualisys system as well as other mocap systems. Qualisys will provide the markers for the moCap deck.

Qualisys and Bitcraze are exhibiting together at IROS in Madrid where we will show some awesome demos with a moCap system as well as other position technologies and we are also hoping to fly a Crazyswarm. We will publish more information when we get closer to the conference.

A lot of awesome things have been going on at Bitcraze during the last couple of months (like TDoA3, Swarm shows and a new front page), but on the logistics side we’ve been struggling. Like we wrote a couple of weeks ago we’ve been having huge issues with out 3rd party warehouse supplier. Unfortunately the issues have continued and we’ve been working hard on patching things together to get orders to our customers as soon as possible, but it’s not a sustainable situation and some of our customers have unfortunately had to wait too long for their orders to arrive.

So a couple of weeks ago we took the decision to move handling of the E-store from the 3rd party in Hong Kong to our office in Sweden. This will initially mean more work for us, but we feel that it’s something we need to do in order to keep the level of service we want to give our customers. So for the time being orders will be shipped from our office in Sweden.

So what does this mean in practice? Except for things hopefully working much more smoothly there won’t be any noticeable change for non-EU customers. However for EU customers there’s a big improvement: previously our EU customers had to import the products into the EU where the orders where subject to VAT and import duties. With the E-store moved to Sweden these orders are now subject to Swedish VAT (25%) directly on the order and customers will not have to import the goods so no additional VAT or duties are added upon receiving the order. Since this makes things easier and faster for our EU customers we’re really happy about this. Note that for customers with valid EU VAT numbers the VAT can be deducted directly in the E-store, you can either enter your VAT number directly in the cart or in your account if you have created one.

We’re doing our best to sort out the new situation and if there’s any issues along the way please let us know so we can work on fixing them.

We have now worked a few weeks on the new TDoA 3 mode for the Loco Positioning System. We are happy with the results so far and think we managed to do what we aimed for: removing the single point of failure in anchor 0 and supporting many anchors as well as larger spaces.

 

We finished off last week by setting up a system with 20 anchors covering two rooms down in the lunch area of the office. We managed to fly a scripted autonomous flight between two rooms.

Work so far on the anchors

Messages from the anchors are now transmitted at random times, which removes the dependency on anchor 0 that used to act as a master that all other anchors were synchronized to. The drawback is that we get problems with collisions when two anchors happens to transmit at the same time. Experiments showed that at 400 packets/s (system rate) we ended up at a packet loss of around 15% and 340 TDoA measurements/s sent to the kalman filter for position estimation.  We figured that this was acceptable level and added an algorithm in the anchors that reduces the transmission rate based on the number of anchors around them. If more anchors are added to a room they all reduce their transmission rate to target 400 packets/s in total system rate.

The anchors continuously keeps track of the clock drift of all other anchors by listening to the messages that are transmitted. We know that clocks do not change frequency suddenly and can use this fact to filter the clock correction to reduce noise in the data. Outliers are detected and removed and the resulting correction is low pass filtered. We have done some experiments on using this information and compare it to the time stamp of a received message to detect if the time stamp is corrupt or not, but this idea requires more work.

One interesting feature of the anchors is the limited CPU power that is available. The strategy we have chosen to handle this fact has been to create an algorithm that is efficient when handling messages. A timer based maintenance algorithm (@1 Hz) examines the received data and makes demissions on which anchors to include in the messages in the future as well as purges old data.

The Crazyflie

The implementation in the Crazyflie is fairly straight forward. The biggest change to TDoA 2 is that we now can handle a dynamic number of anchors and have to chose what data to store and what to discard. We  have also extracted the actual TDoA algorithm into a module to separate it from the TDoA 3 protocol. The clock correction filtering algorithm from the anchors has also been implemented in the Crazyflie. 

An experimental module test has been added where the TDoA module is built and run on a PC using data recorded from a sniffer. We get repeatability as well as better tools for debugging and this is something that we should explore further.

Work remaining 

The estimated position in the Crazyflie is still more noisy than in TDoA 2 and we would like to improve it to at least the same level. We see that we have outliers in the TDoA measurements that makes the Crazyflie go off in a random direction from time to time, we believe it should be possible to get rid of most of these.

The code is fairly hackish and there are no structured unit or module tests to verify functionality. So far the work has been in an exploratory phase but we are getting closer to a set of algorithms that we are happy with and that are  worth testing. 

We have not done any work on the client side, that is support for visualizing and configuring the system. This is a substantial amount of work and we will not officially release TDoA 3 until this is finished.

How to try it out

If you are interested in trying TDoA 3 out your self, it is all available on github. There are no hardware changes and if you have a Loco Positioning system it should work just fine. There is a short description on the wiki of how to compile and configure the system. The anchor supports both TDoA 2 and TDoA 3 through configuration while the Crazyflie has to be recompiled to change between the two. The support in the client is limited but will basically handle anchors 0 – 7.

Have fun!

 

Things are moving fast here at Bitcraze and we have lots of exciting things going on. So it’s time to grow the team and try to add one or two new team-members to increase the tempo and bring more awesome products to our customers. The normal case might be that you would post a job ad describing what kind of skill-set potential new members should have, but we would like to try something different. So today we added a jobs page describing a bit about how we work and what we do. Our goal is to give a picture of what it’s like to work at Bitcraze and try to find individuals who like what we do and how we work. If you would be interested in joining the team let us know on jobs@bitcraze.io who you are, what you like and how you think you could contribute.

Returning visitors of our website might have noticed that we recently released a new and fresh design of our website’s front page.

The goal has been to make a front page that better reflects Bitcraze and what we do, so together with the updated design and new cool images (credit to USC) we have also added two new sections to the front page. First off we have extended the blog post section to show the three latest blog posts instead of just the latest one. Different users have different interests so by showing a bit wider range of blog topics the hope is that even more people will discover our blog and start following it. Our blog is a big part of how we communicate to the outer world so by adding a whole new section for the blog giving it more room on the front page feels exciting. 

The testimonials section is the second part that we have added to the new front page. Here we are finally taking the opportunity to show some of the amazing work our community members have been doing using our Crazyflie. Each testimonial consist of a guest blog post that people from our community have contributed. It is pretty cool to show how researchers around the world are basing their projects on our products. If it’s by adding wheels to the drone or making LED lit swarms we are always happy to promote and show how the community are using our Crazyflie.

Next step

Our website is under constant improvement and the grand master plan for the near future is to update the content and design of the different portals and clean up the website in general. If you have any suggestions on what kind of content you would like to see in the portals or otherwise please send us feedback. As I mentioned in the beginning of the blog post, the new beautiful open shutter swarming photos we use on the front page is contributed to us by the researchers at USC. If you have any cool photos of the Crazyflie we would be more than happy to use them.

 

 

 

 

First of all we are happy to announce that (almost) all products have been stocked in the new warehouse and are now shipping! The last orders that were on hold are on their way out and new orders placed in the store will now be shipped again within a few days.

We released the TDoA mode, a.k.a. swarm mode of the Loco Positioning System back in January. TDoA supports positioning of many Crazyflies simultaneously which makes it possible to fly a swarm of Crazyflies with the LPS system. The release in January was actually the second iteration of the TDoA implementation (the first iteration was never publicly released) and it is also known as TDoA 2.

TDoA 2 works well but there are a couple of snags that we would like to fix and we have now started the work on the next iteration, TDoA 3. 

Single point of failure

TDoA 2 is based on a fixed transmission schedule with time slots when each anchor transmits its ranging packet. All anchors listen to anchor 0 and use the reception of a packet from anchor 0 to figure out when to transmit. The problem with this solution is that if anchor 0 stops transmitting for some reason the full system will stop transmitting positioning information. This is clearly a property that would be nice to get rid of.

Limited number of anchors

The packets in the TDoA 2 protocol have 8 slots for anchor data that are implicitly addressed through the position in the packet. First slot is anchor 0, second slot anchor 1 and so on. This setup is easy to use but creates an upper limit of 8 anchors in the system.

The maximum radio reach of an anchor depends mainly on the transmitted power and the environment. This distance, in combination with a maximum of 8 anchors and that all anchors must be in range of anchor 0, sets an upper limit of the volume that an LPS system can cover, basically one large room. When we designed TDoA 2 we were happy to be able to support a swarm of Crazyflies and did not really bother too much about the covered volume. We get more and more questions about larger areas and more anchors though and it would be nice to have a positioning system that could be expanded.

The solution – maybe…

What we want to do in TDoA 3 is to transmit packets at random times and add functionality to handle the collisions and packet loss that will happen in a system like this. The idea is that the even if some data is lost, the receiving side will get enough packets to be able to calculate the distance to other anchors or a position as needed. By removing the time slots and synchronization to anchor 0, we get rid of the single point of failure. 

In the TDoA 3 protocol, we have added explicit ids to the anchor data, and thus removed the implicit addressing of anchors. We have 8 bits for anchor ids and the system will handle 256 anchors for sure. We do think that it will be possible to design larger systems though by reusing ids and making sure that the radio ranges of anchors with the same ids do not overlap.

The UWB radios have a nice property that makes this a bit easier to handle collisions than one might first think, if they receive two packets at the same time, they will most likely “pick” one of the packets and discard the other. The drawback is that it is likely that the receive time of the packet will be less accurate. We are not completely sure it will be possible to detect and handle the added noise in the time stamps but we have good hope!

The current state of the project

Last week we did a proof of concept hack when we modified the old TDoA 2 implementation to transmit at random times, as well as minor modifications to handle random receive order of packets. It all worked out beautifully and we could fly a short sequence in the office with the new mode. The estimated position was a bit more shaky which is not surprising, considering that the receive times are more noisy.

We have just started with the real deal.  We have designed a draft spec of the protocol and have also started to implement the new protocol on top of the old TDoA2 algorithms in the anchors and the Crazyflie to get started. Next steps will be to introduce random transmission times, dynamic anchor management and better error handling. The TDoA 3 implementation will exist in parallel with the current TDoA2 implementation and should not interfere.

If you want to contribute, are interested in what we do or have some input, please comment this blog post or contact us in any other way.