Closed kyuhyong closed 3 years ago
I have never used this bridge but it seems that the connection to the Crazyflie has been lost. The message you see in the console (too many packets lost) mean that cflib cannot communicate with the Crazyflie anymore.
@ataffanel Hi, thanks for quick reply. No the connection lost message is returned when I unplug power from the drone to see if the connection is really made. I re-installed ubuntu 16.04 and still having this issue. QGC is waiting for vehicle connection when cfbridge is connected to the drone.
It looks like there is a bug in recent updates. My colder crazyflie-lib-python can connect to qgc successfully and have additional messages after connecting to the drone as follows
waiting to receive message INFO:cflib.crazyflie:Resending for pattern (93, 5) DEBUG:cflib.crazyflie:We want to resend and the pattern is there INFO:cflib.crazyflie:Resending for pattern (93, 5) DEBUG:cflib.crazyflie:We want to resend and the pattern is there INFO:cflib.crazyflie:Resending for pattern (93, 5) DEBUG:cflib.crazyflie:We want to resend and the pattern is there INFO:cflib.crazyflie:Resending for pattern (93, 5) DEBUG:cflib.crazyflie:We want to resend and the pattern is there INFO:cflib.crazyflie:Callback->Connected to [radio://0/70/2M] DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (255, 1, 39) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (255, 1, 39) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (255, 1, 39) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (255, 1, 39) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (255, 1, 39) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (255, 1, 39) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (255, 1, 39) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (140, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 33, 255, 84, 0, 8, 0, 0, 0, 107, 1, 100, 254, 42, 11, 1, 1, 230, 56, 83) DEBUG:cflib.crazyflie:Looking for pattern match on (93, 5) vs (93, 5, 54, 0) DEBUG:cflib.crazyflie:Found new longest match (93, 5) DEBUG:cflib.crazyflie.log:Logging reset, continue with TOC download DEBUG:cflib.crazyflie.toc:[5]: Start fetching... DEBUG:cflib.crazyflie:Adding callback on port [5] to [<bound method TocFetcher._new_packet_cb of <cflib.crazyflie.toc.TocFetcher instance at 0x7f62b2581758>>] DEBUG:cflib.crazyflie.toc:[5]: Got TOC CRC, 0 items and crc=0x00000000 DEBUG:cflib.crazyflie.toc:Requesting index 0 on port 5 DEBUG:cflib.crazyflie.toc:Added element [0] WARNING:cflib.crazyflie.toccache:Could not save cache, no writable directory DEBUG:cflib.crazyflie:Removing callback on port [5] to [<bound method TocFetcher._new_packet_cb of <cflib.crazyflie.toc.TocFetcher instance at 0x7f62b2581758>>] DEBUG:cflib.crazyflie.toc:[5]: Done! INFO:cflib.crazyflie:Log TOC finished updating INFO:cflib.crazyflie.mem:Requesting number of memories INFO:cflib.crazyflie.mem:0 memories found INFO:cflib.crazyflie:Memories finished updating DEBUG:cflib.crazyflie.toc:[2]: Start fetching... DEBUG:cflib.crazyflie:Adding callback on port [2] to [<bound method TocFetcher._new_packet_cb of <cflib.crazyflie.toc.TocFetcher instance at 0x7f62b2581758>>] DEBUG:cflib.crazyflie.toc:[2]: Got TOC CRC, 0 items and crc=0x00000000 DEBUG:cflib.crazyflie.toc:Requesting index 0 on port 2 DEBUG:cflib.crazyflie.toc:Added element [0] WARNING:cflib.crazyflie.toccache:Could not save cache, no writable directory DEBUG:cflib.crazyflie:Removing callback on port [2] to [<bound method TocFetcher._new_packet_cb of <cflib.crazyflie.toc.TocFetcher instance at 0x7f62b2581758>>] DEBUG:cflib.crazyflie.toc:[2]: Done! INFO:cflib.crazyflie:Param TOC finished updating INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/70/2M] Connected to radio://0/70/2M DEBUG:cflib.crazyflie.param:Requesting request to update param [0] DEBUG:cflib.crazyflie.param:Updated parameter [.]
Without above additional messages, it won't connect to qgc.
I have this same issue, but I don't have any older version of crazyflie-lib-python. Can you tell me which I should be using?
I don't know whether this is issue with qgc or not but my other system works just fine with same qgc version so I post here.
I am running ubuntu 16.04 and git cloned the repository. moved to crazyflie-lib-python folder and did following make venv source venv-cflib/bin/activate cd examples python cfbridge.py 110 0xe7e7e7e7e7
I get following messages Scanning interfaces for Crazyflies...
Then I opened qgc in other terminal with same system but no connection. When I unplug power of the drone, I get connection lost message as here
So I assume connection between cfbridge and drone is established but it does not talk to qgc. How can I connect my qgc to cfbridge?