-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run PX4 on crazyflie2.1 #15361
Comments
Waiting on I2C support for the BMI088. |
But when I upload px4 firmware onto CF2.1.I cannot start sensors.Can you please help. |
Can you try this PR? #15421 |
The CF2.1 use BMI088(not mpu9250 like CF2.0) imu so i think we also needs some drivers( like other imu in src/drivers/imu) not just editting some configs.. |
I find a bmi088 driver.It support i2c. |
if you direct to /src/drivers/imu/borsch/ you'll see BMI088, and BMP388 is in /src/drivers/barometer. |
Thank you.My mail address is 2276835336@qq.com. |
Hi @KimHyungSub @LJ0707 @datwwe, Any progress so far? It would be nice to know if you finally made PX4 work on our Crazyflies 2.1 |
I have a Crazyflie v2.1 in a box somewhere, I'll take a look this weekend. |
I'm working on adding generic register read/write helpers to the I2C/SPI interfaces so we can cleanly support drivers like the BMI088 for both. |
Thanks, really appreciate it. Let me know if there is anything we can do to help. |
@dagar Do you have a branch going that we could help test and possibly help with development? |
@dagar Any updates on this? We would really like to push this through to support PX4 on the crazyflies in our lab. We are willing to do the leg work, but just want to make sure we sync up with you. If you can get us started, we can do the rest. We have crazyflies with debuggers etc ready to go. |
While trying to connect bmi088 on SPI bus From gdb, the 'ACC_CHIP_ID' read is '0xff', while the actual 'ID' is '0x1e'. |
Hi guys! @zp-yang and I are trying to get PX4 to run on Crazyflie 2.1 as well. We are new to driver development. Currently, the failing point we found is at
The I traced down the function call flow:
I don't see any logical flaw along the flow. My guess is that the issue of RegisterRead(Register::ACC_CHIP_ID) not returning 0x1E might be associated with hardware specifications in the code, e.g., pin number or bus number (I'm not as familiar with the hardware, this is just my guess). We will look into this as well as keep debugging to see if any issue happens during reading. We will keep posting updates here. If anyone has experience in driver development and is interested in working on this issue as well, please feel free to join us. It would be great if we could have someone with experience. If you are too busy to work on this with us, any advice would to greatly appreciated too :) ####################################
@dagar Daniel said waiting on I2C support for the BMI088. Based on what I found in the crazyflie-firmware, BMI088 on Crazyflie supports both SPI and I2C. I was wondering if developing I2C support is a must? Or as long as we fix the SPI support of BMI088 in PX4, we would be able to get Crazyflie 2.1 to fly? Updated 11/8/2020: Thank you :) |
Hi @JizhouChen, I'm trying to make it work too but I'm having a hard time figuring out on how to debug it? How could you check that the ACC_CHIP_ID is returning 0xFF? Thanks |
You need to have a debugger (the one I'm using is ST-LINK/V2) and debug the firmware with gdb |
Thanks @JizhouChen :) I'll need to buy one then. Thanks |
Update 11/18: Based on our debugging result, the bmi088_i2c_main() goes through without any problem. We suspect that it has something to do with our I/O implementation and we will keep debugging it. Please feel free to leave a comment if you have any thoughts. Thank you! |
Hi @JizhouChen I've been working on an I2C version for the BMI088 too. I can start accel and gyro on the I2C bus but I'm having some problems with the FIFO data samples. I checked yours and it's very similar we both used Daniel's SPI implementation as a base. But for some reason the fifo read is not working as expected. I tried to implement the recommended steps in the datasheet for self-test and sometimes it works and sometimes it doesn't. I hit a bit of a wall now. There was some iterations that I was able to publish correct data frames to PX4 but I can't complete accel calibration (it seems that some of the data don't have correct values when published). If you want, check it. https://github.com/TheLegendaryJedi/Firmware/tree/crazyflieV21 Thanks |
@TheLegendaryJedi Awesome! We will check it out and update you once we find anything. |
The problem I'm having now is during the fifo transfer. That is, I check the number of samples available multiply by 7 specified by the datasheet (6 for x,y,z and one for header) and the transfer always fails, it returns -1. |
Hi @TheLegendaryJedi , are you on the PX4 Slack channel (px4.slack.com) by any chance? |
Yes, I'm "GONCALO" there. I just pushed some more commits to the branch. I was able to make it work (but without the FIFO). Now I'm having problems with the attitude estimator. If you test with my branch you should be able to calibrate accel and gyro with no problem at all. |
Hi. I'm working on getting the BMI088 with I2C and FIFO to work as well for the PX4 with a crazyflight2.1 I've tried lowering the output data rate to 400hz because this is recommended with an I2C speed of 100kHz, but with no luck. |
Hi @jancoow, I've been working on it too. Are you on slack? We have a thread there regarding this. Basically I started with fifo and then I checked that the data was all wrong. I tried with 100kHz and 400kHz and no luck. Next I tried to read the data directly from the data registers and I was able to calibrate it. But during the gyro calibration the QGC is always saying that the drone is moving. That's because the gyro data varies a lot. The accel is all good for calibration. But now I'm trying again to implement it with fifo because it's the correct way to do it. I would like to know if crazyflie2.1 original firmware is using fifo or not. I need to ask on their forum. |
Any update on this? |
If anyone is motivated to bring these back to full support I'd be happy to try and assist (eg debug drivers), but otherwise I don't think I have time to fully review and test the system. |
I want to run PX4 on crazyflie2.1.But now PX4 only support crazyflie2.0.I know there are some difference between crazyflie2.0 and crazyflie2.1.
So I add bmi088 and bmp388 drivers in ./boards/bitcraze/crazyflie/default.cmake.
And I start them in ./boards/bitcraze/crazyflie/init/rc.borad_sensors.
But in qgroundcontrol when I input command to check sensors status,there is no sensor.
The text was updated successfully, but these errors were encountered: