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 »

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: 630
Joined: Tue Jun 30, 2015 7:47 am

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

Post by kristoffer »

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 »

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: 1050
Joined: Fri Jul 06, 2018 11:13 am

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

Post by kimberly »

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 »

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: 1050
Joined: Fri Jul 06, 2018 11:13 am

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

Post by kimberly »

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 »

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: 630
Joined: Tue Jun 30, 2015 7:47 am

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

Post by kristoffer »

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
danteppc
Beginner
Posts: 8
Joined: Tue Mar 09, 2021 9:41 am

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

Post by danteppc »

kristoffer wrote: 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
I want to use send_position_setpoints without LP, the drone never takes off with send_position_setpoints! how to enable the barometer?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

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

Post by tobias »

With LP do you mean Loco Positioning? For the Crazyflie to do position control some form of positioning is needed, at minimum the Flow deck is needed which does relative positioning.
Post Reply