Page 2 of 2

Re: Controlling the LED ring deck from Python

Posted: Thu Oct 08, 2020 3:26 pm
by cgpenguin
kimberly wrote: Thu Oct 08, 2020 7:55 am Hi!

So you are trying to change the LED's in flight? Have you tried this example yet from this blogpost?

By the way, your code was not available anymore in the link that you posted. You can use gist?
I tried the example and I noticed a couple things:
  • Drone doesn't start flying right when I see entry Step x: Takeoff(...)/Goto(...)
  • When it starts flying (happens around step 7-10 I think), it goes hectic, falls on it's back and crashes
  • The LED color change also happens the very moment it starts flying

Re: Controlling the LED ring deck from Python

Posted: Fri Oct 09, 2020 7:35 am
by kristoffer
I tried your script, it works as expected.

I also verified that the examples/swarm/synchronizedSequence.py script works. If you are using one drone only, you have to remove two of the uris in the

Code: Select all

URI
list and remove all entries in the

Code: Select all

sequence
where the id is not 0.

Which positioning system are you using?

Re: Controlling the LED ring deck from Python

Posted: Fri Oct 09, 2020 7:49 am
by cgpenguin
I am using Lighthouse (currently v1).

Thing is, the scripts actually work, but there's the issue of some things only starting to work after a certain time period (namely the LEDs and in the example you had linked before, the flying too (plus it crashed, but it might have been related to drone trying to get to the position instantly rather than the 1 or so second timeframe given in the script). And in those cases it appears that the drone is not doing any tasks and then suddenly it instantly tries to do all the tasks dumped on it (therefore the script I posted in previous post gets the lights suddenly flickering through a lot of colors before starting to update at each interval where new goto command is given).

I will also film the behavior later today to hopefully explain the issues better.

Re: Controlling the LED ring deck from Python

Posted: Sun Oct 11, 2020 8:14 pm
by cgpenguin
https://www.youtube.com/watch?v=Xa1A3ov ... e=youtu.be

Here's the video. It's running the code I posted before. As you can see, the ring only starts changing colors at around the 4th checkpoint where it bursts through a lot of colors before starting to behave as expected.

Re: Controlling the LED ring deck from Python

Posted: Mon Oct 12, 2020 11:05 am
by kristoffer
Thanks for the video, it makes it easier to understand what you see,
Your script works OK when I try it, so we know the script is fine.

The first thing to check is that all your firmware (both NRF and STM) are on the latest version and works together. The easiest way to flash them both is to use the (latest) python client and flash the 2020.09 release (see https://www.bitcraze.io/documentation/r ... re-upgrade). It is possible that you could get the problems you see if your NRF firmware is old.

Let us know if it makes any difference.

Re: Controlling the LED ring deck from Python

Posted: Mon Oct 12, 2020 3:16 pm
by cgpenguin
Hey!

I updated both stm and nrf through client (and then stm again with make cload to include the lighthouse driver) and now it appears to work just fine. Thank you!

Re: Controlling the LED ring deck from Python

Posted: Tue Oct 13, 2020 7:51 am
by kristoffer
Excellent!
Good luck with your future adventures!