python3 position_commander_demo.py command

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
thefeiyu
Beginner
Posts: 12
Joined: Fri Dec 18, 2020 10:07 pm

python3 position_commander_demo.py command

Post by thefeiyu »

Hello,

I am trying to run the "python3 position_commander_demo.py" command, but I get the error:

Connecting to radio://0/80/250K/E7E7E7E7E7
Got link error callback [Too many packets lost] in state [1]
Connection to radio://0/80/250K/E7E7E7E7E7 failed: Too many packets lost
Traceback (most recent call last):
File "position_commander_demo.py", line 81, in <module>
simple_sequence()
File "position_commander_demo.py", line 70, in simple_sequence
with SyncCrazyflie(uri, cf=Crazyflie(rw_cache='./cache')) as scf:
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/syncCrazyflie.py", line 72, in __enter__
self.open_link()
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/syncCrazyflie.py", line 69, in open_link
raise Exception(self._error_message)
Exception: Too many packets lost

Does anyone know how I can fix this?

Thanks!
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: python3 position_commander_demo.py command

Post by kimberly »

Hi,


Are you sure that your crazyflie has the URI radio://0/80/250K/E7E7E7E7E7, and if your Crazyradio PA correctly recognized by our computer? You can check that with the cfclient here
thefeiyu
Beginner
Posts: 12
Joined: Fri Dec 18, 2020 10:07 pm

Re: python3 position_commander_demo.py command

Post by thefeiyu »

Hi,

The crazyflie does have the URI radio://0/80/250K/E7E7E7E7E7, although in the "python3 position_commander_demo.py" file, it was radio://0/66/250K/E7E7E7E7E7, so I changed it to 80 but then this happens:

Connecting to radio://0/80/250K/E7E7E7E7E7
Error no LogEntry to handle id=3
Error no LogEntry to handle id=5
Error no LogEntry to handle id=4
Error no LogEntry to handle id=4
Error no LogEntry to handle id=3
Error no LogEntry to handle id=5
Error no LogEntry to handle id=5
Error no LogEntry to handle id=3
Error no LogEntry to handle id=4


and it just keeps going
thefeiyu
Beginner
Posts: 12
Joined: Fri Dec 18, 2020 10:07 pm

Re: python3 position_commander_demo.py command

Post by thefeiyu »

Update:

I just tried it again and it says:

Connecting to radio://0/80/250K/E7E7E7E7E7
Connected to radio://0/80/250K/E7E7E7E7E7

but nothing happens with the crazyflie.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: python3 position_commander_demo.py command

Post by kimberly »

Which firmware is flashed on the Crazyflie? There is a new release out so it would be good to try that one out.

Also, have you tried any other scripts? If you are using the flowdeck, try out the motion commander demo, and if you are using Lighthouse or such, use one of the autonomous sequence examples (with LPS make sure to turn off the line that activates the melliinger controller). Just make sure that you go through the script first and double check the coordinates.
Post Reply