Category: Frontpage

We started the work on TDoA 3 in May and it has been functional for a few months, but it is a bit cumbersome to make it work since it requires compiling firmware with special flags and running scripts to configure anchors. To rectify this and make it more accessible we are now working on integrating it just like the other positioning modes; TWR and TDoA2. 

Changes

The anchors already contained most of the required functionality. We have added support to change to the TDoA3 mode via LPP, that is using the Crazyflie as a bridge between the client and the anchors, transmitting data to the anchors via UWB.

In the Crazyflie TDoA 3 has been added as a third mode. This means that it is now auto detected when the Crayzflie is switched on and it can be selected from a client – no need for compile flags any more! We have also added a new mapping to the memory sub system to transfer anchor information for a dynamic number of anchors to a client. This means that instead of being available to the client as a long list of log variables and parameters, most of the TDoA3 information and configurations are available in a memory map using the same protocol we use to access real memory like the configuration EEPROM or the deck memories. This way we have much more freedom to define and transfer the data-structure to and from the Crazyflie.

The python client/lib is the piece of software that requires most changes. The UI (and implementation) was designed to handle 8 anchors, but with TDoA3 it must support a dynamic and larger number. The new memory mapping has of course to be implemented in the lib as well. The anchor position configuration part of the LPS tab will be separated into a dialog box to get more space for the controls. We also have some ideas for improvements in anchor position configuration (saving to file and sanity checking of configurations for instance) that will be easier to implement in the future as well.

Feedback

The driver for this work is of course to make the TDoA 3 technology available to anyone that wants to try it out. It is important to remember that it still is experimental and that we have mainly tested it in single room setups with a few anchors. Our hope is that more users will use it in various settings and that we will get feedback and contributions to iron out any remaining problems. We currently lack easy access to larger spaces which makes it hard for us to verify the functionality in a system with many anchors.

The code in the firmware for the anchors and the Crazyflie is mostly ready while there still remains some work in the lib/client, hopefully it can be committed and pushed during the week (see issue bitcraze/crazyflie-clients-python#349). If you want to try it out when the client is fixed, remember to upgrade the anchor firmware (including git sub modules), the Crazyflie firmware (including git sub modules), the python lib and the python client. Since this is still work in progress APIs and protocols may change until the first official release.

Log and param are the two Crazyflie subsystems that have become the core means of communication with the Crazyflie.

The Log is a subsystem that contains functionality to transfer values of variables in the Crazyflie to a client. The client can setup log blocks, which are a list of variables, and start logging this log block at a certain rate. The Crazyflie will then send radio packets at the requested rate with the current values of the variables, thus enabling the client to read changing variables in the Crazyflie in near realtime. It is very useful for monitoring the state of the Crazyflie and further more, any log variable can be graphed in the python client.

Param is a subsystem that contains functionality to get and set the values of variables in the Crazyflie. This is essentially the opposite of Log, it allows the client to read or write variables that are read-only in the firmware.

Both subsystems are based on a Table Of Content (the TOC): at connection time the client pulls the list of log/param variables. This means that there is no hard-dependency between client and firmware and that we can develop new functionalities in the Crazyflie, adding log and param variables to access it without modifying the client.

The Log and Param subsystems have served the Crazyflie community very well, allowing for quick development of experimental and new functionalities. There has been a limitation that has become more and more painful lately though; we were limited to 255 variables due to the protocol using only one byte to encode the variable ID. This issue has now been fixed in the Crazyflie firmware and in the Crazyflie ROS driver by a pull request from Wolfgang at USC. We have recently also implemented the required changes in the Python lib to make it available in the python client (and any other python script using the lib). In the process, some bugs unfortunately found their way into the code, but they have quickly been fixed by a pull request from simonjwright. Thanks to every one involved!

So now Crazyflie supports up to 65535 log and 65535 param variables. This time we should be good for the foreseeable future! ;-).

Ever since the Raspberry-pi zero was released we wanted to find-out what it would take to fly one with the Crazyflie 2.0. One immediate issue is the size and weight of the R-Pi-Zero. It is just a bit to big and heavy to make it work without modifying the Crazyflie 2.0. Also it requires 5V power which is something the Crazyflie 2.0 doesn’t provide if USB isn’t connected. Actually the R-Pi-Zero works well down to ~3.6V but this is still too high to reliably run directly from a single LiPo cell. So to begin with we created a Raspberry Pi Zero power deck. It is reusing the same step-up/step-down (STBB1) as used on the LED-ring to make things simple and the output is set to 3.8V. Other than that the UART and the I2C interfaced has been connected so that the raspberry pi zero could control the Crazyflie.

The raspberry pi zero would then be soldered to the deck with 0.1″ header pins. The result can be seen below and the power part works well. We chose to solder the deck header pins to the deck, instead of using the female deck connectors, to make it more sturdy. Another thing we did was fitting a Pi-camera using a 3D printed mounting bracket we designed. We think this is one of the interesting use cases, to run computer vision or maybe neural networks :-).

Well unfortunately this only solves the first part, powering the R-Pi-Zero from the Crazyflie 2.0. Next step will be to modify the Crazyflie 2.0 with bigger motors/props so that is can carry it for a decent time. So story to be continued…

The summer has been unusually long and warm here in Sweden, with a never ending sun beaming on the Bitcraze team members enjoying our vacation. As usual, at least one of us has been in the office at any given time, but staffing has been sparse. We apologise for delayed answers to emails and similar.

Even though we have been enjoying some time off, we have also managed to do some clean up of tasks that have been long over due. For instance merging pull requests and fixing a few nasty bugs (for details please see github), and implementing long overdue functionalities like being able to have more than 255 log and param variable (when the Crazyflie firmware develoment started many years ago, we though that 255 variables ought to be enough for anybody).

Everyone will be back in the office this week but we plan to continue the cleaning a few more weeks. We hope to be able to do some work on TDoA3, the Crazyradio, impementing Crazyswarm functionality in the python lib and more generally everything we normally do not have the time to do.

We have some exciting projects coming up this autumn: In October we are going to IROS where we will try demo a swarm in 2x2x2.5m, we also have quite some hardware that is now very close to be finalized that we should be able to release and start shipping before the winter.

Stay tuned for more products and blog posts!

We have been thinking for a while about making a Crazyflie control board that could be used to make a bigger quadcopter using the Crazyflie firmware and deck. This idea has materialized in the Crazyflie RZR project.

The Crazyflie RZR is a quadcopter controller board based on the Crazyflie design, as pointed if our previous blog post, it is intending to bring the strength of the CF2 but in a little bit bigger package :-). It runs the Crazyflie firmware and feature the Crazyflie 2.0 deck port. It is capable of driving brush-less motor controller and has an uFL port for an external 2.4GHz antenna. It also contains the new quadcopter-optimized Bosch BMI088 IMU. We have made some progress lately on the Crazyflie RZR, we have just got the first initial sample from the manufacturer shown in the picture above.

We are not sure yet when the RZR will be in the shop, but the project is definitely going forward. We will keep posting information about the project as it develop. 

We already wrote in a previous blog post that we where working on a Lighthouse positioning receiver deck for the Crazyflie 2.0. In this post we will describe a bit what has been the development process so far for this deck as it is an example of how to develop with the Crazyflie. Basically, our way of working often is to try to get one things working after another, this is what we have done here: we start from a hack and then we replace hardware and software pieces one after the other to make sure we always have one half (hardware of software) we can relie on.

The lighthouse deck started as a Fun Friday project, and as such we usually want to hack something together to see if the idea can work. So I looked around the web to get some information as of how to receive the lighthouse positioning signals and decode it. I found the vive-diy-position-sensor GitHub project by ashtuchkin. The project describe the schematic and contains the software for a Teensy board to receive a lighthouse 1.0 signal and calculate the position of the receiver. I went forward and cabled the circuit on a Crazyflie prototyping deck and attached a Teensy board to another prototyping deck. The idea is to install these two board above and bellow a Crazyflie:

Discreet-component Lighthouse receiver

Teensy to decode the lighthouse signals

The signal from the lighthouse receiver goes to the Teensy, then the serial port of the Teensy is connected to the serial port of the Crazyflie. As a first approach the Teensy was configured and we could get the position data using the Teensy USB port. When everything was working correctly I could implement a small deck driver in the Crazyflie to receive the position and push it in the Kalman filter. This way I could get a Crazyflie 2.0 flying in lighthouse with minimal firmware work.

The obvious next step was to get rid of the Teensy, this was done by implementing the lighthouse pulse acquisition and interpretation in the Crazyflie. Once that was done, we could make our own deck. Instead of using op-amp we used the official receiving chip available at this time, the TS3633:

First lighthouse receiving deck prototype

This board implements up to two receiver which would allow to get the orientation as well as the Position of Crazyflie. Due to questionable soldering only one receiver has ever worked but the prototype was useful to test the concept anyway, one of the lesson learned is that the receiving angle of the two flat is not big enough to fly very high, with the two lighthouse base station near the ceiling we could only fly up to ~1.5m before loosing the signal.  We would need a microcontroller or other chip capable of acquiring the signals on the deck since the Crazyflie 2.0 deck port only has two input capable of acquiring the pulses.

At this point informations about Lighthouse 2.0, the next version of Lighthouse tracking that will allow to cover much bigger area, started appearing on the internet and a new receiver chip was release to receive the signal, the TS4231. One big difference was that Lighthouse 2.0 would transmit data in the laser carrier. The data transmitted are in the range of 1 to 10MHz dixit the TS4231 datasheet so it makes them impractical to acquire with a microcontroller. This gives us a perfect opportunity to play with the iCE40 FPGA and the icestorm open-source toolchain that has just been release. 

The result is a deck containing enough receiver to cover a much bigger flying space and an iCE40UP5K FPGA to acquire the signals sent by the lighthouse. There is already two prototype of this design: one without SPI flash, so the Crazyflie would have to embed the FPGA configuration bitstream and program it at startup and the latest one has an SPI flash so the deck can start by itself:

First FPGA-Based lighthouse deck prototype

 

Partially populated second FPGA-Based lighthouse deck prototype, now with SPI flash

As a first approach the FPGA will acquire the Lighthouse 1 pulses and send the raw timing via a serial port to the Crazyflie. The Crazyflie can then decode and interpret the pulse. I am currently playing with the idea of maybe running a picorv32 Risc-V 32 bits CPU core in the deck, this will allow to acquire and interpret the pulses in the deck and send angles to the Crazyflie, this would greatly lighten the processing load on the Crazyflie 2.0. Eventually this FPGA should be able to acquire and decode the Lighthouse 2.0 signals.

This is very much work in progress and we will write more about the Lighthouse deck when we have further results.

 

Last week we received the visit of Wolfgang from USC, he is the creator of the Crazyswarm project. It was great to have him here at the office. One of the subject of discussion was to prepare a demo for iROS 2018 on October 1-5 2018 in Madrid.

We will be in booth 91, if you are attending iROS 2018 feel free to pass-by and say hello. We are planning a couple of demos:

  • Crazyswarm with at least 6 Crazyflies flying in a Qualisys mocap system.
  • Running a fully autonomous Crazyflie with the Loco Positioning System.
  • Hopefully, some demo of autonomous flight using the lighthouse positioning. This is still not fully working but I have at least 2 full months to get something flying :-).

If you would like to see us demo anything more/else tell us in the comments and we will see if we can setup something.

We used Wolfgang’s visit to finalise the Qualisys support for Crazyswarm. It is now pushed and documented, this means that if you have a Qualisys system and a couple of Crazyflies you can now fly them autonomously using the Crazyswarm framework. It also means that we now have Crazyswarm up and running flawlessly at the office, it will help us testing related pull-request and supporting advanced functionality like the high-level-commander in the Crazyflie python lib.

 

As a side note, Bitcraze is spread very thin these weeks since most of us are in vacation (I am basically alone). We usually miss one Monday post per year, it was last week and the Wolfgang visit is my excuse :-). Sorry in advance if there is any delay to answer mail, forum or other requests. From next week, the rest of the team will slowly start to come back.

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 :-).