crazyflie 2 won't take off properly commander.send_position_setpoint

Discussions about all things Bitcraze
Post Reply
jimbob
Beginner
Posts: 4
Joined: Tue Feb 11, 2020 12:36 pm

crazyflie 2 won't take off properly commander.send_position_setpoint

Post by jimbob » Tue Feb 11, 2020 12:43 pm

I''m using the LPS system with a crazyflie 2 and trying to run the autonomousSequence example. I'm pretty sure I have the drone set up correctly as I can fly it with a bluetooth game control ok, at least it takes off and moves around.

But when I run the autonomouseSequence example 3 motors start spinning but the 4th barely spins at all and the drone ends up flying along the ground until it hits something.

I'm wondering what i'm doing wrong? I have the lps system set up with the trackers and they seem to be tracking ok.

Any ideas?



kristoffer
Bitcraze
Posts: 176
Joined: Tue Jun 30, 2015 7:47 am

Re: crazyflie 2 won't take off properly commander.send_position_setpoint

Post by kristoffer » Wed Feb 12, 2020 7:25 am

Not sure what might be the problem.
Have you checked what the estimated Z is when the Crazyflie is on the ground? The easiest way is look at the "Height" box at the bottom of the "Flight control" tab in the client. If there is an offset in estimated Z, the controller might aim for the "wrong" height.

jimbob
Beginner
Posts: 4
Joined: Tue Feb 11, 2020 12:36 pm

Re: crazyflie 2 won't take off properly commander.send_position_setpoint

Post by jimbob » Wed Feb 12, 2020 10:41 am

kristoffer wrote:
Wed Feb 12, 2020 7:25 am
Not sure what might be the problem.
Have you checked what the estimated Z is when the Crazyflie is on the ground? The easiest way is look at the "Height" box at the bottom of the "Flight control" tab in the client. If there is an offset in estimated Z, the controller might aim for the "wrong" height.
thanks for the reply. The height box says 0.85 when it is placed on the ground which doesn't seem right?

I'm not sure how to change this though?
crazyflie_client.jpg

kimberly
Bitcraze
Posts: 220
Joined: Fri Jul 06, 2018 11:13 am

Re: crazyflie 2 won't take off properly commander.send_position_setpoint

Post by kimberly » Thu Feb 13, 2020 2:33 pm

So right now the drone already thinks it is at 84 cm and won't go to the height setpoints given by the script, since it either thinks it is 'in the floor'

Are you sure that all the nodes are configured properly as in the tutorial: https://www.bitcraze.io/getting-started ... ng-system/

Could you also send us a printscreen of your LPS tab of the cfclient?

jimbob
Beginner
Posts: 4
Joined: Tue Feb 11, 2020 12:36 pm

Re: crazyflie 2 won't take off properly commander.send_position_setpoint

Post by jimbob » Fri Feb 14, 2020 11:35 am

thanks for the reply this is a screenshot of the lps tab
Untitled.png
And yes it is probable that my setup is not ideal but it is fairly close to what is specified in the documentation. In the lps tab the position seems to be correct? It's strange that the flight control height is different?

kimberly
Bitcraze
Posts: 220
Joined: Fri Jul 06, 2018 11:13 am

Re: crazyflie 2 won't take off properly commander.send_position_setpoint

Post by kimberly » Mon Feb 17, 2020 1:52 pm

Hi,

So from the first sight, the anchors are not exactly located as specified here: https://www.bitcraze.io/getting-started ... n-the-room. (6 anchors). In the example, it goes from id 0 to 5 and in yours number 0 and 2 are missing. Do you only have 6 anchors or do you have 8 ? Also they do not seem to be placed at exactly the same positions.

Have you also manually entered their real positions in the anchor position configuration ? (https://www.bitcraze.io/getting-started ... to-anchors). Beware that you do have to measure this yourself, since your configuration is different than ours.

jimbob
Beginner
Posts: 4
Joined: Tue Feb 11, 2020 12:36 pm

Re: crazyflie 2 won't take off properly commander.send_position_setpoint

Post by jimbob » Tue Feb 18, 2020 3:55 am

shouldn't the height displayed in the flight data be read from the altimeter?

yes you are correct the placement of the tracker nodes is not optimal but by manually moving the drone around it seems reasonably accurate.I've tested with an 8 node setup arranged and measured carefully and still had the same issues.

kristoffer
Bitcraze
Posts: 176
Joined: Tue Jun 30, 2015 7:47 am

Re: crazyflie 2 won't take off properly commander.send_position_setpoint

Post by kristoffer » Tue Feb 18, 2020 7:35 am

shouldn't the height displayed in the flight data be read from the altimeter?
The barometer is not used by default. It can be enable it with a compile flag though.

As long as the configured anchor position is within +-5 cm of their real positions, it should be OK.

There are log variables for the distances that the Crazyflie measures to the anchors. you could check them out to see if they look reasonable.
The log variables are ranging.distance0, ranging.distance1, ranging.distance2 and so on

Post Reply