LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   USB [pyrocket] Launcher (https://www.linuxquestions.org/questions/slackware-14/usb-%5Bpyrocket%5D-launcher-873831/)

Jinx-Wolf 04-08-2011 03:08 PM

USB [pyrocket] Launcher
 
Greetings Programs!

I just received a USB Rocket Launcher as a gift today... However, I'm sure she didn't intend for me to have more fun setting it up than using it.

I have found something called pyrocket, but I'm having a hell of a time getting it to actually work.

After installation, it started fussing about dependencies so I managed to get most of them installed. One dependency, however, I can't get it to detect at all. It spits out this (concerning OpenCV):

Code:

Traceback (most recent call last):
  File "/usr/bin/pyrocket", line 17, in <module>
    from rocket_frontend import RocketWindow
  File "/usr/lib/python2.6/site-packages/rocket_frontend.py", line 11, in <module>
    from rocket_webcam import VideoWindow
  File "/usr/lib/python2.6/site-packages/rocket_webcam.py", line 2, in <module>
    from opencv import cv, highgui
ImportError: No module named opencv

Since this model does not have a webcam, and I do not own a joystick, I took it upon myself to comment out the lines in rocket_webcam.py and rocket_joystick.py that called for opencv. I then continued to install the rest of the dependencies it asked for.

With everything ready, I put on my battle gear and got ready for war... but all my fun halted abruptly with a Permission error:
Code:

Located blue Rocket Launcher device.
libusb couldn't open USB device /dev/bus/usb/002/004: Permission denied.
libusb requires write access to USB device nodes.
Fatal Python error: (pygame parachute) Segmentation Fault
Aborted

Well... if it's a permissions issue, then I know just the user that can help me out. The SuperUser! So I logged in as root and gave pyrocket another go.... resulting in:
A little window pops up and starts to load... and then...!
Code:

Located blue Rocket Launcher device.
/usr/lib/python2.6/site-packages/rocket_backend.py:99: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  if e.message.find("could not claim interface") >= 0:
Traceback (most recent call last):
  File "/usr/bin/pyrocket", line 27, in <module>
    launcher = RocketWindow()
  File "/usr/lib/python2.6/site-packages/rocket_frontend.py", line 206, in __init__
    self.connect_everything()
  File "/usr/lib/python2.6/site-packages/rocket_frontend.py", line 407, in connect_everything
    err_msg = self.rocket_controller.acquire_devices()
  File "/usr/lib/python2.6/site-packages/rocket_backend.py", line 39, in acquire_devices
    return_code = launcher.acquire( dev )
  File "/usr/lib/python2.6/site-packages/rocket_backend.py", line 103, in acquire
    self.handle.setAltInterface(0)
usb.USBError: Invalid argument

POW! And here, I am lost. I'm not sure if I entirely understand the error... There's a deprecation warning, followed by some complaints about particular lines in some python files, but nothing of any significants as far as I can see.

Maybe another few sets of eyes can help me get this working... my four just don't seem to be enough.

Thank you =^^=
-Jinx

corp769 04-08-2011 03:55 PM

While doing research, I came across the following projects: (maybe one of these may work for the time being?)
http://www.fatal.se/fulhack/ahmissile/
https://code.google.com/p/pymissile/

I haven't bought one yet, but I am hoping one of those work for that specific device. I got looking around and some slack users had no luck with pyrocket.

Jinx-Wolf 04-08-2011 04:46 PM

Quote:

Originally Posted by corp769 (Post 4318422)
While doing research, I came across the following projects: (maybe one of these may work for the time being?)
http://www.fatal.se/fulhack/ahmissile/
https://code.google.com/p/pymissile/

I haven't bought one yet, but I am hoping one of those work for that specific device. I got looking around and some slack users had no luck with pyrocket.

Thanks for the assistance!

I would've LOVED to get pymissile working, but it does not recognize this particular brand. After installation, and running as root, all I get is "No WMDs found". :(
I did manage to get ahmissile running, but it's VERY unresponsive. I'm going to keep playing with it and see what I can do. :)

Thank you again!

EDIT: Just for fun (something was wrong with the sound)
http://qik.com/video/39032876
&
http://qik.com/video/39033434

jstadler 08-28-2012 05:13 PM

Hi
This might be a little late but I found the answer.
The problem is that opencv has had some major interface changes since version 2.0.
Since e.g. Ubuntu 10.04 this is the version that is included by default.

However I managed to adapt pyrocket to use the new opencv API. You can find the latest version here for now: [1]

I hope it'll be merged back into the original SVN trunk [2] soon.

[1] http_s://github.com\stadler\pyrocket
[2] http_://code.google.com/\p\pyrocket/


All times are GMT -5. The time now is 01:57 AM.