tudelft / SGBA_code_SR_2019

26 stars 5 forks source link

Can't find python scripts used in bash files #4

Closed Curt-Park closed 4 years ago

Curt-Park commented 4 years ago

Hi. This is a following issue of https://github.com/tudelft/SGBA_code_SR_2019/issues/3 .

Some bash files use python scripts which are located in the author's local storage. For example, in start_swarm_exploration_experiment.sh,

cd /home/knmcguire/Documents/Onedrive/PhD/system_test/scripts/python
... (omitted)
xterm -title "$i: flying and logging" -geometry 71x31+$X+$Y -hold -e "python cf2_gbug_logging.py $radio_id

Could you please share the python scripts as well for reproduction?

Thanks!

Best Regards, Curt

knmcguire commented 4 years ago

Thanks for thoroughly testing this all. It was way too much code apparently to get this all working. I will fix this this evening.

knmcguire commented 4 years ago

By the way, I'm curious a bit though. Is there a reason why you would like to use this code that dates from 2018 instead of the new applayer code of https://github.com/tudelft/SGBA_CF2_App_layer ? This code also does not work on the new CF 2.1, and it seems al lot of hassle to get this to work on new machines.

Curt-Park commented 4 years ago

@knmcguire I tried to run the applayer code at first, so I built and flashed the firmware. However, the crazyflie doesn't take off after running python3 take_off.py. (It is not connected to the crazyradio PA.) To investigate the issue, I looked into the official document, but it has very few information: https://www.bitcraze.io/docs/crazyflie-firmware/master/app_layer/

Could you please give me any advice to learn the running progress in detail?

knmcguire commented 4 years ago

Hi, I opened up the issue tracker of that repo and made an issue about that here: https://github.com/tudelft/SGBA_CF2_App_layer/issues/1

I'm investigating the issue currently. It might also be that your crazyflie is not on the same channel as the crazyradio (must be 56)

I do definitely prefer to fix the App layer version for the newest code, since now the SGBA code is truly separated from the rest. Then problems like you had in the NRF (old sdk update problems) will not be a problem anymore.

knmcguire commented 4 years ago

About your question about the applayer, there will be more instructions in the future but that are the plans at Bitcraze. Right now there are only build instructions and not really the explanation of the code itself. For now, the best way to understand the process is to dig into the firmware code and to read the comments.

knmcguire commented 4 years ago

fyi, this issue https://github.com/tudelft/SGBA_CF2_App_layer/issues/1 is fixed now. Please try it out and if you still experience problems, create an issue there.

Curt-Park commented 4 years ago

@knmcguire Thanks for your update. Sorry, but one more. I would like to ask if there is something wrong with the procedure I conducted.

  1. Install the newest NRF firmware with Bluetooth disabled. (commit id: e11db79)
  2. Install the STM firmware built on the SGBA Applayer repository. (https://github.com/tudelft/SGBA_CF2_App_layer)
  3. Set the crazyflie's channel and ID; I used channel no. 10 and ID 0xE7E7E7E701.
  4. Plugin Crazyradio PA x 2
  5. Execute RSSI_beacon.py and take_off.py

and nothing happens. Should I do something more to activate APP mode?

knmcguire commented 4 years ago

Probably the crazyradio in the scripts should be on the same channel (so also 10) or else the CF will not receive it. But please continue posting these issues on the issue list of https://github.com/tudelft/SGBA_CF2_App_layer/ or else this will get a bit confusing :)

Curt-Park commented 4 years ago

Success! In addition to your advice, I removed the following line from take_off.py and land_all.py

cr.set_ack_enable(False)

Thanks for your great help! I will close this issue. :)