problems getting base station geometry

Firmware/software/electronics/mechanics
Post Reply
rucy
Beginner
Posts: 4
Joined: Fri Apr 03, 2020 9:59 am

problems getting base station geometry

Post by rucy » Wed Apr 29, 2020 2:44 pm

Hi, all

I am testing cflib's autonomous_sequence_high_level.py using the lighthouse position system.

I have installed two base stations v1 and I think I installed them correctly referring to vive's official documentation.

And after installing the base station, I ran:

Code: Select all

tools/lighthouse/get_bs_geometry.py --uri radio://0/80/2M
I expected that the exact result would come out,
but only one base station geometry is normal and the other is a different geometry each time it is run.

I ran the command three times that I get these results
{.origin = {0.595244, 1.060281, 1.934383, }, .mat = {{-0.455730, 0.788947, -0.412156, }, {-0.677533, -0.607763, -0.414214, }, {-0.577286, 0.090480, 0.811514, }, }},
{.origin = {-5.426270, 2.259761, -0.058355, }, .mat = {{0.797720, 0.022701, -0.602601, }, {0.601988, 0.028703, 0.797989, }, {0.035411, -0.999330, 0.009231, }, }},

{.origin = {0.596560, 1.059974, 1.934279, }, .mat = {{-0.456384, 0.788531, -0.412229, }, {-0.677225, -0.608332, -0.413881, }, {-0.577130, 0.090283, 0.811646, }, }},
{.origin = {7.356262, -3.705989, 2.482249, }, .mat = {{-0.051861, -0.273307, 0.960528, }, {0.991799, 0.098408, 0.081551, }, {-0.116812, 0.956880, 0.265962, }, }},

{.origin = {0.594895, 1.058138, 1.936268, }, .mat = {{-0.455453, 0.789151, -0.412073, }, {-0.676922, -0.607610, -0.415436, }, {-0.578221, 0.089730, 0.810931, }, }},
{.origin = {3.441278, -0.893505, 0.774578, }, .mat = {{-0.236820, -0.166063, 0.957256, }, {0.942980, 0.197908, 0.267621, }, {-0.233891, 0.966052, 0.109726, }, }},
My base stations and crazyflie were in a fixed position while executing the command and
I worked using the latest crazyflie-firmware repository.

How can I solve this problem?

Thanks in advance for the reply.



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

Re: problems getting base station geometry

Post by kimberly » Wed Apr 29, 2020 3:14 pm

Hi!

This script is very new and not tested a lot of times yet, for thanks for letting us know this problem!

So it seems that it is able to detect the first basestation's geometry but has difficulty finding the second. Can you try to move the second basestation? Either rotating more in the CF2's direction or at another location? The lighthouse deck is maybe not receiving the angles of the second one correctly. If the installation is more fixed, you can maybe try to move the crazyflie closer to the second base station and let us know the result.

rucy
Beginner
Posts: 4
Joined: Fri Apr 03, 2020 9:59 am

Re: problems getting base station geometry

Post by rucy » Fri May 01, 2020 11:08 am

Hi!

Apologize for the late response.

I was able to achieve a constant level of geometry by adjusting the head angle of the base station.

But I still think there is a problem.

Because after modify this script with the obtained geomerty, and re-compile and flash firmware,

Code: Select all

src/modules/src/lighthouse/lighthouse_position_est.c
I ran again:

Code: Select all

tools/lighthouse/get_bs_geometry.py --uri radio://0/80/2M
Strangely, the result is different from the first one.

Is this normal?

Thanks in advance for your response.
Regards

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

Re: problems getting base station geometry

Post by kristoffer » Mon May 04, 2020 6:59 am

Hi!

The result of the get_bs_geometry.py script is not affected by the values in lighthouse_position_est.c.

get_bs_geometry.py uses only the angular data recorded by the sensors on the Lighthouse deck to estimate the position of the Crazyflie. Like Kimberly mentioned, the script is pretty new and it is possible that there are situation where it does not produce a good result. It is good practise to look at the resulting geometry data and check that it seems to be reasonable.

You can also look at the recorded angles if you want to check that the data you get looks OK. You can find the names of the log variables in the get_bs_geometry.py script.

rucy
Beginner
Posts: 4
Joined: Fri Apr 03, 2020 9:59 am

Re: problems getting base station geometry

Post by rucy » Wed May 06, 2020 10:46 am

Hi, kristoffer!

get_by_geometry.py still doesn't seem to work,
but fortunately I had a vive controller, so I used it to get the coordinates and successfully executed the script that
position_commander_demo.py and autonomous_sequence_high_level.py without any problems.

Thanks for the answer.
Best regards.

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

Re: problems getting base station geometry

Post by kristoffer » Thu May 07, 2020 8:47 am

I'm glad it worked out!
Would be interesting to understand why get_by_geometry.py did not work though :-)

Post Reply