## Flow deck suggestions

giandoman
Member
Posts: 33
Joined: Wed Sep 27, 2017 1:23 pm

### Flow deck suggestions

Hello everybody i just received my flow deck and i'm really excited about that. It works very good.
I had a look at the examples and i saw that the only main function that is used to move the drove is the function commander.send_hover_setpoint. It's clear how to use it but my question is: Is there a function (already implemented) that given a DX, DY, Z, and YAW moves the drone?
thanks
Gianni

arnaud
Bitcraze
Posts: 2043
Joined: Tue Feb 06, 2007 12:36 pm

### Re: Flow deck suggestions

Hi, the send_hover_setpoint function takes vx, vy, yaw_rate and Z, isn't it what you are looking for?

giandoman
Member
Posts: 33
Joined: Wed Sep 27, 2017 1:23 pm

### Re: Flow deck suggestions

arnaud wrote:
Thu Oct 19, 2017 1:37 pm
Hi, the send_hover_setpoint function takes vx, vy, yaw_rate and Z, isn't it what you are looking for?
vx and vy are the speeds along the x and y axis right? I'm looking for something like "move 1 meter along x and 2 meters along y"
The yaw rate is the yaw angle right?
Gianni

arnaud
Bitcraze
Posts: 2043
Joined: Tue Feb 06, 2007 12:36 pm

### Re: Flow deck suggestions

VX and VY are velocity in the body referential. yaw_rate is the rate at witch the yaw is turning in degree per second.

So if you set VX to 0.5 and have a positive yaw_rate the Crazyflie will go forward turning right.

If you keep the yaw_rate at 0, you can send "move 0.5m/s on X and 1m/s on Y", if you send this command for 2 seconds you will get what you are looking for.

Otherwise you can try the absolute setpoint. For instance the sequence python example should work with the flow: https://github.com/bitcraze/crazyflie-l ... equence.py. Make sure to choose small steps for the sequence though, it will also work best not too high and with the latest Master firmware.

giandoman
Member
Posts: 33
Joined: Wed Sep 27, 2017 1:23 pm

### Re: Flow deck suggestions

arnaud wrote:
Mon Oct 23, 2017 12:21 pm
VX and VY are velocity in the body referential. yaw_rate is the rate at witch the yaw is turning in degree per second.

So if you set VX to 0.5 and have a positive yaw_rate the Crazyflie will go forward turning right.

If you keep the yaw_rate at 0, you can send "move 0.5m/s on X and 1m/s on Y", if you send this command for 2 seconds you will get what you are looking for.

Otherwise you can try the absolute setpoint. For instance the sequence python example should work with the flow: https://github.com/bitcraze/crazyflie-l ... equence.py. Make sure to choose small steps for the sequence though, it will also work best not too high and with the latest Master firmware.
Thank you Arnaud.
For the autonomous sequence you need the loco position nodes am I right? otherwise the drone (only with the flow deck) is not able to know its absolute position.

arnaud
Bitcraze
Posts: 2043
Joined: Tue Feb 06, 2007 12:36 pm

### Re: Flow deck suggestions

With the flow, the kalman filter will still keep track of and output an absolute position that you can use, though this absolute position will drift over time. The amount of drift should be very small in good conditions but there is no way to know the precision. If you want to recalibrate the absolute position you indeed need something like the LPS.

giandoman
Member
Posts: 33
Joined: Wed Sep 27, 2017 1:23 pm

### Re: Flow deck suggestions

arnaud wrote:
Tue Oct 24, 2017 7:50 am
With the flow, the kalman filter will still keep track of and output an absolute position that you can use, though this absolute position will drift over time. The amount of drift should be very small in good conditions but there is no way to know the precision. If you want to recalibrate the absolute position you indeed need something like the LPS.
indeed i tried the autonomous fly without the lps and the drone doesn't work.

arnaud
Bitcraze
Posts: 2043
Joined: Tue Feb 06, 2007 12:36 pm

### Re: Flow deck suggestions

Hum, what does happen? With the flow it should 'work'.

Actually I just tried with this sequence:

Code: Select all

``````sequence = [
(0, 0, 0.15, 0),
(0, 0, 0.3, 0),
(0.5, 0, 0.3, 0),
(0.5, 0.5, 0.3, 0),
(0, 0.5, 0.3, 0),
(0, 0, 0.3, 0),
]
``````
Takeoff is an issue, I get it to take-off right about 3 times in 5, I added a step at 0.15m to help but it barely helps. I guess one solution would be to go up in hover mode first and then switch to position mode, if position mode is wanted. Anyway, passed the take-off it looks good: https://photos.app.goo.gl/ayCHpzsxfQ5s9HGo1

giandoman
Member
Posts: 33
Joined: Wed Sep 27, 2017 1:23 pm

### Re: Flow deck suggestions

arnaud wrote:
Wed Oct 25, 2017 1:42 pm
Hum, what does happen? With the flow it should 'work'.

Actually I just tried with this sequence:

Code: Select all

``````sequence = [
(0, 0, 0.15, 0),
(0, 0, 0.3, 0),
(0.5, 0, 0.3, 0),
(0.5, 0.5, 0.3, 0),
(0, 0.5, 0.3, 0),
(0, 0, 0.3, 0),
]
``````
Takeoff is an issue, I get it to take-off right about 3 times in 5, I added a step at 0.15m to help but it barely helps. I guess one solution would be to go up in hover mode first and then switch to position mode, if position mode is wanted. Anyway, passed the take-off it looks good: https://photos.app.goo.gl/ayCHpzsxfQ5s9HGo1
Definetively the take off is a little bit strange, but you are right. after the taking off it goes perfectly. When i tried the drone always failed the take-off.
Thanks again
Gianni

wydmynd
Beginner
Posts: 28
Joined: Thu Dec 06, 2018 9:25 am

### Re: Flow deck suggestions

hi! I have a similar issue, when using flow deck and Mellinger controller, takeoff is very unstable, like in the initial moment the drone is trying to fly somewhere else, and then tries to correct. after initial stabilizing, if it did not crash, it flies great. once in a while it takes off normally.

important to mention - when using hover commands like hover.py with crazyflie_ros , drone takes off great 100% of the time!

is it possible that some parameter is not initialized? i'm using test_high_level.py with crazyflie_ros

thanks!