Running multiranger_pointcloud.py example

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
emoyers
Beginner
Posts: 12
Joined: Sat Feb 08, 2020 5:26 pm

Running multiranger_pointcloud.py example

Post by emoyers » Wed Mar 11, 2020 3:15 am

I'm having problems to run multiranger_pointcloud.py example, Do I need to use an specific version of python or vispy?
I'm getting this error: AttributeError: 'CanvasBackend' object has no attribute 'setParent'

If I comment these 2 lines, I'm able to run the script but I cannot visualize the datapoints:

#self.canvas.native.setParent(self)
#self.setCentralWidget(self.canvas.native)

Do you any idea on what can be the problem and how can I fix it?



tobias
Bitcraze
Posts: 1965
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Running multiranger_pointcloud.py example

Post by tobias » Wed Mar 11, 2020 12:01 pm

Yes this sound like a version issue. Are you running the example with python2 or python3? I'm not sure it works with python2.

emoyers
Beginner
Posts: 12
Joined: Sat Feb 08, 2020 5:26 pm

Re: Running multiranger_pointcloud.py example

Post by emoyers » Thu Mar 12, 2020 1:07 am

I'm using python 3.5.2. Do I need an specific version for vispy?

tobias
Bitcraze
Posts: 1965
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Running multiranger_pointcloud.py example

Post by tobias » Thu Mar 12, 2020 8:47 am

I'm running python 3.7.5 and it works for me but after smaller investigation it seams to be a Qt issue. They broke the API at some point but looks fixed now. Easiest solution is probably to update everything rather then downgrading Qt.

emoyers
Beginner
Posts: 12
Joined: Sat Feb 08, 2020 5:26 pm

Re: Running multiranger_pointcloud.py example

Post by emoyers » Thu Mar 12, 2020 11:05 pm

I'm using ubuntu right now. When you say update everything, do you mean run "app-get update" and install python 3.7.5?

tobias
Bitcraze
Posts: 1965
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Running multiranger_pointcloud.py example

Post by tobias » Fri Mar 13, 2020 8:04 am

You could try "app-get update" but it depends on what Ubuntu version (e.g. 19.04) you are on. Possible, at the version you have, 3.5.2 might be the latest.

emoyers
Beginner
Posts: 12
Joined: Sat Feb 08, 2020 5:26 pm

Re: Running multiranger_pointcloud.py example

Post by emoyers » Sat Mar 14, 2020 3:28 am

Thanks @tobias I was able to run it with python 3.7.5.

Post Reply