Category: Loco Positioning

As noted in a previous post, Mike Hamer from ETH Zurich has been implementing an Extended Kalman Filter (EKF) for the Crazyflie. The beginning of this week I am visiting Michael at ETH and we have now pushed the EKF to the Crazyflie master branch!

Visiting ETH is really nice, and it is very impressive to see the Flying Machine Arena in real life. Though, owing to the Crazyflie’s size, we do not need such a big space and can work in a more regular-sized room.

The EKF has now been added to the master branch but is not enabled by default. It is currently intended to be used with the Loco positioning system (although it should be easy enough to integrate with onboard GPS, or potentially offboard motion capture measurements). While it does fly better than the currently used, offboard particle filter for autonomous flight, it requires some care to work properly. I am going to update the wiki description for the loco positioning to document how to get started with the EKF during the week. Our hope is that through community engagement and feedback, we can continue to improve and tune the filter, now that Mike has put the basic functionality in place.

The greatest enhancement is that the Crazyflie is now able to estimate its own position, without the help of an external computer. Coupled with the onboard controller, the Crazyflie can now fly fully autonomously. I have also pushed a new example in the Crazyflie python lib that shows how to send an X/Y/Z set-point to fly the Crazyflie, allowing it to fly through waypoints.

In the near future we (Bitcraze, and hopefully, the community!) need to work on a couple of more things to make it fly even better

  • Revamp of the controller: the current controller is a position controller, splitting it in two controllers, one for position and one for velocity, would allow for a more stable flight and to finally use TheSeanKelly new PID settings!
  • Implementing TDOA positioning on the LPS would allow more than one Crazyflie to fly at the same time
  • Implementing the new commander packet in the Crazyflie, python lib and ROS driver. This will allow us to stop hacking the current commander each time we need a new functionality (such as onboard position control) — and since I have push rights, only my hacks get pushed, which is unfair ;-).

Mike will describe the Kalman filter in greater details in a future post. In the mean time we will update on the progress in the Loco Positioning mailing list.

As summer is here, in the northern part of the hemisphere, in Sweden we like to have a bit of vacation to charge up with new energy. Thus the forward momentum will decline a bit but it also means less distraction from email requests, meetings etc. We take this opportunity to switch focus a bit and just as last year, we will put our effort in cleaning up. That means fixing bugs, improving documentation etc, things that normally doesn’t get prioritized enough.

Along with the cleanup, the Loco positioning system is still our highest priority and we work full thrust to get it in the hands of users. Hopefully we will be able to start shipping the first systems in the beginning of next week and more widely the week after that so make sure to stay tuned and sign up for the newsletter if you are interested! Have a great summer everyone!

Upcomming loco positioning indoor explorer bundle

The upcomming early access loco positioning indoor explorer bundle

The loco positioning hardware is now manufactured and we are working hard on making it available. Loco positioning is still in early access, which means that we have tested the hardware but that the software still requires some love.

One of the big features still to implement is a position stabilization and position sensor fusion in the Crazyflie. This has been worked on from two fronts in the last weeks.

Community member jackemoore has been working hard on getting the Crazyflie 2.0 with a GPS deck working with position hold. He is getting close to having a GPS position hold working but has stumbled upon some system bugs that have to be solved first. You can follow, or even better help out, with the development on the forum post.

Mike Hamer, from ETH Zurich, has started to implement a Kalman filter, based on one of his publications, for the Crazyflie 2.0 firmware. This is still very much a work in progress but the initial results look promising. Mike has found and fixed a bunch of bugs on the way, which has greatly improved the firmware quality and stability. Since it is able to fuse the position estimate with the internal sensors, the Kalman filter will pair nicely with the GPS implementation from jackemoore to add a new layer of stability, as well as with the Loco positioning system. In addition, the Kalman filter is being written in such a way that it should be easy to incorporate additional sensors into the estimate. Keep your eyes open for a blog post in a couple of weeks with more detail on the Kalman filter’s inner workings, and hopefully a fully functional Kalman filter in the Crazyflie shortly thereafter :-).

We are right now eagerly awaiting the first batch of the Loco positioning system to be done and ready for shipping. The interest for the early access release has been very encouraging and we are super happy about the attention we have received from all around the world.

We have made a new video about how to get started with the Loco positioning system that we hope you will enjoy. The video is showing the process from receiving the Loco Positioning system up to having an autonomous flying Crazyflie. The written information can be found on the wiki.

At Lund University PhD student Kenneth Bastone and professor Kalle Åström are currently using the Crazyflie and the Bitcraze ultra-wide band based Loco Positioning system as part of their research involving local positioning systems at Centre for Mathematical Sciences. We visited them a couple of week ago and though we would write a blog post to explains a bit how they use Crazyflie and the Loco positioning system.

lps-research-loco-positioning-kalle-åström

A local positioning system creates a number of interesting mathematical problems that PhD student Kenneth Bastone and professor Kalle Åström have decided to focus their current research on.

By experimenting with different technologies to create position estimations in 3D space they have come across a variety of different ways to explore indoor localization using a local positioning system. The origin of this work area was with optical tracking and localisation, it has since grown to include any technologies and configuration capable to be used for local positioning like radio and sound.

One focus area for instance is how to estimate transceiver node positions from measured transceiver distances, this is a key issue concerning for example radio antenna array calibration or mapping and positioning using ultra-wide band. Another problem is how to determine how many nodes the system needs to generate sufficient information and to understand how often the system needs to make estimations to work sufficiently well.

According to Kalle Åström solving this kind of problems regarding local positioning systems is one step closer to a whole new area of future applications. In particular it is a technology enabler that opens up the possibilities for new ways to study motion and/or behavior, for instance in healthcare or for analyzing performance in sports.

Recently Kalle and his team has had access to an Alpha Loco Positioning System, this has allowed them to apply their algorithm more specifically to ultra-wide-band based localisation. The algorithm is able to estimate the position of the anchors and of the Crazyflie from a set of distance measurements only. Using the local positioning system the Crazyflie can estimate its position by using the distances to the anchors and the position of the anchors in space. Here we have visualized the idea in 2D:

anchors1In this diagram the red point is the Crazyflie and the green and blue points are the anchors. We will look more at the anchor A3. If we see things the other way around, from the Crazyflie point of view, all we know about anchor A3 is how far away it is. So it could be anywhere on a circle:

anchors2

Now if we decide to go forward a little bit, the possible positions of A3 is reduced to 2 locations:

anchors3anchors4

As you can see in the figure, it is not enough to only go forward, we still have two intersection for the possible positions of A3. We need to make a turn:

anchors5

Now we have reduced the possible positions down to 1. We are not done yet because in reality the Crazyflie position is not known but by applying the same idea to anchor 1 and 2 the system is constrained so that the positions of all 3 anchors and of the Crazyflie can be found over time.

The algorithm is already working with the Crazyflie and the Loco Positioning system and allows the system to find the position of the anchors and the Crazyflie using a couple of seconds of data while the Crazyflie is moving around.

According to Kalle using the Crazyflie and the Loco Positioning system has proved to have some benefits. It is open-source which means that it can be modified easily to fit the research purpose. It is also safe and very practical to work with: a test system can easily and quickly be set-up as the Crazyflie does not require specific protection for people or equipment around it.

Like we announced last week we will be releasing the Loco Positioning system in a couple of weeks. Last week, we added product pages for the Loco Positioning boards on our website. We have also made a new short video explaining a bit on how it works with a demo:

Early access means that we have tested the hardware and are pretty confident it performs well. Though the software is still in a beta stage and requires some more love and will be evolving a lot over time. Right now we made sure that the ranging is working and we have some software, based on ROS, to fly the Crazyflie autonomously. We will make sure to document carefully the steps so that you can get started with the system quickly. We see two big functionalities that will be worked-on first: making the system able to control much more Crazyflies at once (right now the software is designed to handle only one Crazyflie), and moving positioning and controller into the Crazyflie which has the potential to enhance the flight performance a lot. More on that later.

If you want to receive information as the system evolves, sign up to our mailing list (we have added everyone that mailed us last week ;-). If you want to talk to us directly do not hesitate to comment or send us a mail at locopositioning@bitcraze.io.