Hello,
Since I didn't know where to start contributing, I started by trying to understand the pc client code better by rewriting it. The outcome is Ruby bindings for the Crazyflie (more or less a lightweight clone of the basic current pytho pc-client), which I have released them as a gem (Crubyflie).
So far it can read/write parameters, logging blocks, send commands etc. and of course, fly the Crazyflie using a joystick controller!
If you would like to use it/test/contribute to it visit https://github.com/hsanjuan/crubyflie
Thanks for creating this beautiful device and keep the good work up!
Ruby client for Crazyflie (Crubyflie)
Re: Ruby client for Crazyflie (Crubyflie)
That is a lot of work, and great work .
I know Arnaud will be pleased with a Ruby client as he always talks so well about Ruby (compared to python)!
I know Arnaud will be pleased with a Ruby client as he always talks so well about Ruby (compared to python)!
Re: Ruby client for Crazyflie (Crubyflie)
Hi All
I'm using the crubyflie Ruby library on OSX, and seem to have successfully installed all the dependencies:
However when I try and connect to the crazyflie over the USB radio I get the following error message:
I suspect that on a Linux machine I could set the udev rules:
However I'm unsure how to set the libusb configuration on an OSX machine.
I wrote a quick driver check script and can see the USB radio device on my machine:
Any tips or ideas would be greatly appreciated.
Many thanks
I'm using the crubyflie Ruby library on OSX, and seem to have successfully installed all the dependencies:
However when I try and connect to the crazyflie over the USB radio I get the following error message:
Code: Select all
LIBUSB::ERROR_NO_DEVICE in libusb_set_configuration
Code: Select all
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
I wrote a quick driver check script and can see the USB radio device on my machine:
Code: Select all
require "libusb"
usb = LIBUSB::Context.new
device = usb.devices.last
puts device.inspect
Many thanks
Re: Ruby client for Crazyflie (Crubyflie)
Hello there,
Im not really sure what this means and know little about OSX.
I suspect the offending line is 112 here:
https://github.com/hsanjuan/crubyflie/b ... io.rb#L112
I am not sure it has to do with udev rules (can you run it with root and check?). If Ruby sees your dongle, you could do further testing
that is basicly what the ruby code does to the dongle. See if you can find where it exactly breaks...
I think it would be good if you could open an issue in https://github.com/hsanjuan/crubyflie to track this.
Im not really sure what this means and know little about OSX.
I suspect the offending line is 112 here:
https://github.com/hsanjuan/crubyflie/b ... io.rb#L112
I am not sure it has to do with udev rules (can you run it with root and check?). If Ruby sees your dongle, you could do further testing
Code: Select all
require "libusb"
usb = LIBUSB::Context.new
device = usb.devices.first # we use the first dongle available
puts device.inspect
handle = devices.open()
handle.configuration = 1
handle.claim_interface(0)
I think it would be good if you could open an issue in https://github.com/hsanjuan/crubyflie to track this.
-
- Member
- Posts: 46
- Joined: Sun Jun 09, 2013 3:04 am
Re: Ruby client for Crazyflie (Crubyflie)
I can vouch for the Crubyflie client, however. I have it on my Rasberry Pi, and it's awesome! I can edit the control parameters file via SSH (X mode, 100% thrust, etc.) and there's way more speed & flexibility with the program than the CF headless version on an R-Pi. On a Mac machine with lots of processing power, however, I don't see an advantage over the Python client because the Python version has a GUI and greater versatility (firmware updating, attitude indicator, etc.).emson wrote:Hi All
I'm using the crubyflie Ruby library on OSX, and seem to have successfully installed all the dependencies:
However when I try and connect to the crazyflie over the USB radio I get the following error message:
Code: Select all
LIBUSB::ERROR_NO_DEVICE in libusb_set_configuration
Emson, I had the same problem when trying to install the Python CF client on my iMac. For some reason the system didn't recognize or detect my USB dongle. Then I tried the same steps to install the Python client on my Macbook Air, and the system detected the USB radio dongle just fine. So now I can fly my CF using my MB Air--even though it has the same version of OSX (Mountain Lion) as my iMac.
I suggest trying to at least get the Python CF client working, so you can at least isolate the problem to the Ruby version, rather than issues with your Mac itself. If you can't even get the Python client working, than try another Mac machine. Otherwise, I'm not sure what else to do...
Re: Ruby client for Crazyflie (Crubyflie)
Hi people,
I have got my Crazyflie out of the drawer, upgraded the firmware etc, and have added hover support to the Crubyflie gem (v.0.2.1) (https://github.com/hsanjuan/crubyflie), in case anyone is interested.
Cheers
I have got my Crazyflie out of the drawer, upgraded the firmware etc, and have added hover support to the Crubyflie gem (v.0.2.1) (https://github.com/hsanjuan/crubyflie), in case anyone is interested.
Cheers