Leap Motion problems

Firmware/software/electronics/mechanics
Post Reply
fmc159
Beginner
Posts: 6
Joined: Sat Jun 14, 2014 4:46 pm

Leap Motion problems

Post by fmc159 »

Hi all,

Hopefully a simple answer to this question. I've switched to the dev-leapmotion branch of the client, plugged in my leapmotion and started the leap daemon, then started the CFclient, but I don't think the Leap Motion is being picked up - moving my hand does not register anything in the client (Leap is definitely working, as tested in the Leap Motion visualiser). Any suggestions as to why it is not being picked up?

Many thanks!
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Leap Motion problems

Post by marcus »

Hi,

There might be an issue with an API changed made in the Leap Python API. Exchange the following lines:
This should be removed:

Code: Select all

if not frame.hands.empty:
And this should be added:

Code: Select all

if not frame.hands.is_empty:
Could you paste the output from the terminal when you run the application?
fmc159
Beginner
Posts: 6
Joined: Sat Jun 14, 2014 4:46 pm

Re: Leap Motion problems

Post by fmc159 »

Hi marcus, thanks for your reply. STill no luck I'm afraid. I can connect to crazyflie fine but nothing from the leap motion. Getting these errors at the end of the terminal output:

Code: Select all

Fergus@fergus-MacBookPro:~/Development/Leap_Motion/crazyflie-clients-python-dev-leapmotion/bin$ ./cfclient
INFO:cfclient.cfclient:Disabling STL printouts
INFO:cfclient.utils.leapreader:Initializing
INFO:cfclient.utils.leapreader:Created listender
INFO:cfclient.utils.leapreader:Created controller
INFO:cfclient.utils.leapreader:Initialized
INFO:cfclient.utils.leapreader:Registered listener
INFO:cfclient.utils.config:Dist config read from /home/fergus/Development/Leap_Motion/crazyflie-clients-python-dev-leapmotion/lib/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/fergus/Development/Leap_Motion/crazyflie-clients-python-dev-leapmotion/lib/../conf/config.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_3.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_1.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_2.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1_linux.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1.json]
INFO:cfclient.utils.config_manager:Parsing [Generic_OS_X.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_3.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_1.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_2.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1_linux.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1.json]
INFO:cfclient.utils.config_manager:Parsing [Generic_OS_X.json]
INFO:cfclient.utils.config:Dist config read from /home/fergus/Development/Leap_Motion/crazyflie-clients-python-dev-leapmotion/lib/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/fergus/Development/Leap_Motion/crazyflie-clients-python-dev-leapmotion/lib/../conf/config.json]
INFO:cfclient.utils.logconfigreader:Parsing [stabilizer.json]
INFO:cfclient.ui.tabs.FlightTab:Changed flightmode to Normal
INFO:cflib.crtp.radiodriver:v0.52 dongle with serial N/A found
INFO:cflib.crazyflie:Callback->Connection initialized[radio://0/10/250K]
INFO:cflib.crazyflie:We are connected[radio://0/10/250K], request connection setup
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
INFO:cflib.crazyflie:Callback->Connected to [radio://0/10/250K]
ERROR:cflib.crazyflie.toc:Got packet that was not on TOC channel, TOC fetch will probably not succeed
INFO:cflib.crazyflie.toc:TOC for port [5] found in cache
INFO:cflib.crazyflie:Log TOC finished updating
INFO:cflib.crazyflie.toc:TOC for port [2] found in cache
INFO:cflib.crazyflie:Param TOC finished updating
INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/10/250K]
<cfclient.ui.widgets.rtplotwidget.PlotDataSet instance at 0x7f00e67098c0>
<cfclient.ui.widgets.rtplotwidget.PlotDataSet instance at 0x7f00e6709950>
<cfclient.ui.widgets.rtplotwidget.PlotDataSet instance at 0x7f00e67097e8>
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
INFO:cflib.crazyflie.log:Have successfully logging for block=1
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
INFO:cflib.crazyflie.log:Have successfully logging for block=2
INFO:cflib.crazyflie.log:Have successfully logging for block=3
INFO:cflib.crazyflie.log:Have successfully logging for block=4
INFO:cflib.crazyflie.log:Have successfully logging for block=5
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Was doing retry buttimer was None
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Was doing retry buttimer was None

marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Leap Motion problems

Post by marcus »

You don't need to connect to the Crazyflie to test the Leap, you should see the output without being connected. In newer versions of the Leap software you don't have to run the server part, but in order ones you did. So if you are using an older version you will have to start the server (leapd) to get connected to the Leap.
fmc159
Beginner
Posts: 6
Joined: Sat Jun 14, 2014 4:46 pm

Re: Leap Motion problems

Post by fmc159 »

Well, I've just re-installed everything and now it's all working. It was almost certainly something I had done wrong! Thanks for your help!
jsalts
Beginner
Posts: 14
Joined: Tue Jan 16, 2018 12:34 pm

Re: Leap Motion problems

Post by jsalts »

Having the same problem. I cannot connect the Leap Motion Controller to the CrazyFlie. Pls help!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Leap Motion problems

Post by arnaud »

Hi,
This thread is 3 years old now, a lot of things might have changed. Can you create a new thread explaining a little bit more what you have done, what does not work?
jsalts
Beginner
Posts: 14
Joined: Tue Jan 16, 2018 12:34 pm

Re: Leap Motion problems

Post by jsalts »

Alright, here's the link for the new thread viewtopic.php?f=6&t=2805&p=13974&hilit= ... ion#p13974
Post Reply