GithubHelp home page GithubHelp logo

crazyflie_cpp's People

Contributors

ataffanel avatar jpreiss avatar katzuv avatar theseankelly avatar whoenig avatar yotamgani avatar zhenghao-dai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

crazyflie_cpp's Issues

takeoff() and land() functions don't seem to do anything

Hey wolfgang,
I'm back in developping LaMoucheFolle and switching over to fully use your lib. Almost everything is implemented, and I modified the lib to work on windows (VS2019) as well (I'll post a PR when i see it working).

I'm testing without any calibration so the drone's detected position is getting crazy.
The sendPositionSetpoint function seems to work as the propellers start spinning when I send the commands, and the stop() function as well.
However, the sendSetPoint (ypr thrust command) is not doing anything, and the takeoff and land() functions as well.
Is there a specific configuration that needs to be met for those commands to work ? Have this groupmask set up, or using the mellinger controller ?

Thanks !

broadcast support for setpoint message (?)

Hello,

When connected to multiple Crazyflies (2.0) on the same radio, sending setpoints (Commander, port 3, crtpSetpointRequest) to more than one CF results in very poor performance in flight. I suspect this is because by default this packet is ack'd and is sent on a unicast-type link, so switching between each of the CFs causes a bottleneck. The CrazyflieBroadcaster class doesn't have an appropriate method for sending these packets; they don't have an id field associated with them.

What would be the appropriate way to send crtpSetpointRequest packets to multiple connected CFs? I have tried sending these via sendPacketNoAck() methods (with arc set to zero, and forcing setAckEnable to false after initialisation), however, I can't definitively say that this has improved anything much.

This may be an unusual use-case, so, apologies if there's a better/recommended way of achieving this that I haven't found.

Thanks for all the work on the cpp libraries!

Pitch value in Crazyflie::sendSetpoint method

Hello,

I had been looking into your library and comparing it with the python implementation in Cflib Repository, a nuance difference caught my eye. There is a negative sign behind pitch value here which is not the same as the cpp implementation. I was wondering what is the source of this difference? In my own application, it seemed that I should go with the negative sign (although I haven't been completely successful using crazyflie_cpp for my project).
Previously, I was able to successfully use Cflib Repository to fly my drones using external motion capture system, however, I need to switch to C++ for my main project and I'm still struggling with it. I would be grateful if you can provide me some information about this function and its differences with its python counterpart.

Thank you.

Unable to connect to Crazyflie 2.0 with Crazyradio PA

Hello
I am trying to use your library to connect my Ubuntu 18.04 machine to my Crazyflie 2.0, using a Crazyradio PA (firmware version 0.53).

My first question would be: is your library ready to work with that setup?

I will try to describe the problem that I am facing, maybe you can help me with some ideas about what is wrong.

I am facing an issue when I try to declare a new Crazyflie object. And what I could understand is that this will create a Crazyflie object, which will create a Crazyradio object.
In my main.cpp code I have:

Crazyflie vehicle1 = Crazyflie(	(const string&)"radio://0/10/250K");
std::cout << "getProtocolVersion " << vehicle1.getProtocolVersion() << std::endl;
std::cout << "getFirmwareVersion " << vehicle1.getFirmwareVersion() << std::endl;
std::cout << "getDeviceTypeName "  << vehicle1.getDeviceTypeName() << std::endl;

I took the liberty to insert some prints in the code, just to understand what is happening. The output was the following:

Crazyflie.cpp: Constructor parameters = m_devId=0 channel=10 datarate=250 datarateType=K m_address=E7E7E7E7E7
USBDevices.cpp: USB initialized successfuly
Crazyradio.cpp: Start of crazyradio devid=[0] object constructor!
USBDevices.cpp: The id from USB match with the id I passed to the function!
USBDevices.cpp: foundid == devid!
USBDevices.cpp: libusb_open / opened USB device and initialized m_handle!
USBDevices.cpp: libusb_get_device_descriptor / got a descriptor for the device!
USBDevices.cpp: libusb_set_configuration / set an active configuration for the device: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: libusb_claim_interface / claim the interface: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x01] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
Crazyradio.cpp: sendVendorSetup request: [0x02] status: LIBUSB_TRANSFER_NO_DEVICE
USBDevices.cpp: sendVendorSetup request: [0x03] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x20] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x04] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x05] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x06] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x10] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
Crazyradio.cpp: End of crazyradio [0] object constructor!
USBDevices.cpp: sendVendorSetup request: [0x10] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x06] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x01] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
USBDevices.cpp: sendVendorSetup request: [0x03] status: LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED
Crazyflie.cpp:  enabled safelink 
Crazyflie.cpp: End of Crazyflie constructor
--- 
getProtocolVersion 2
getFirmwareVersion 2016.09
terminate called after throwing an instance of 'std::runtime_error'
  what():  timeout
Aborted (core dumped)

It looks like the command sent in Crazyradio.cpp -> setAddress(uint64_t address),

libusb_control_transfer(
        m_handle,
        LIBUSB_REQUEST_TYPE_VENDOR,
        SET_RADIO_ADDRESS,
        0,
        0,
        a,
        5,
        /*timeout*/ 1000);

was not sucessfull (even with address being equal to 0xE7E7E7E7E7).

Also, the call Crazyflie.cpp -> getDeviceTypeName() times out.

Do you have any idea what might be happening? And also why the only request that fails to be sent to the radio is "SET_RADIO_ADDRESS (0x02)"?

Thank you very much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.