Open attilafustos opened 3 years ago
@attilafustos The formula is for MPU9250 gyro sensor.
Your flight controller has 8bit accuracy, it is not enough accurate for video stabilization.
@yossato Thank you for your reply. BetaFlight compatible flight controllers use STM32 processor.
@yossato So if I understand correctly, Gyro Raw / 16.4 gives me rotation in angles/sec. From this I have to convert radian_per_sec = angle_per_sec * (PI/180) ? 1° × π/180 = 0.01745rad
Yes, you are right @attilafustos
I tried stabilizing the Gopro video, which I put on my flight control, but it hasn't worked so far
@wenzhicode Did you encounter an error or just no stabilization on the resulting video?
I encountered an error .
Here are my steps:
I think the steps are correct, but the separated data or video format is wrong.
@wenzhicode To get the gyro data from the flight controller I made my own app. You need to store the data as a json file, scaled to radian/sec. Also you need to set the sampling rate on json to sampling rate used to get gyro data. I set it to 1000 hz. The exception I got from the stabilizer is assertion error. I have another issue open where I posted a screenshot.
Hi all. I just stumbled across this repo doing research for making a tool just like this for my quadcopter using gyro data from blackbox, but seems i'm not the only one that had the same idea. BTW @yossato brilliant idea! I like the concept of this project a lot! Good job! @attilafustos do you think you can share the tool to convert from blackbox to json? Maybe a github repo so we can help eachother?
From the README, the sampling rate of the gyroscope in the gopro video is related to the model, I separated the gyroscope data directly from the video. I guess the separated data does not meet the requirements. Yeah, I'm converting the gyroscope data to radian/ SEC.
I think you can use Python to convert the data in CSV to JSON format, and CSV files can be exported from BBL files. @fgiudice98 blackbox2gpmf You can look at this
Yeah, i was going to make a thing like that, but since we are basically working on the same thing why not working together?
What can I do?
If Yossato can find time to write some documentation on this, such as what steps to take from start to finish. I mean, let's say we're going to stabilize the flight video, maybe we used different devices, and now we need to extract some common points from it, and then divide the work to implement those common points, I think it's going to be a lot faster.
@wenzhicode @fgiudice98 https://github.com/attilafustos/bf2json
@wenzhicode I think a repo with scripts to adapt and configure for the use with blackbox data along with some preconfigured cameras (such as Hero7, or Caddx integrated) can be a good start
Yes.
As I understand it, virtualGimbal needs to have the following pieces of data:
@wenzhicode what are the specs of the video you are trying to stabilize?
I am not sure how to calculate properly the gyro values stored in the json file. I seen a formula in the code but I am not sure about it: 1.f/16.4f*M_PI/180.0f The values I get from the flight controller seem to be in the -128 to 128 range. Thank you.