eschnou / arduino-px4flow-i2c Goto Github PK
View Code? Open in Web Editor NEWArduino library wrapping the Wire I2C calls to a PX4Flow Optical Flow Tracker.
License: MIT License
Arduino library wrapping the Wire I2C calls to a PX4Flow Optical Flow Tracker.
License: MIT License
When the Wire.requestFrom() returns, the I2C transaction has completely finished and the received data is waiting in a buffer in the Wire library.
There is no need to wait for something after a call to Wire.requestFrom().
The function wait() in the file "arduino-px4flow-i2c/PX4Flow/PX4Flow.cpp" is not needed.
You can write your code like this:
// request 22 bytes from the module
Wire.requestFrom(PX4FLOW_ADDRESS, 22);
// read the data
frame.frame_count = read16();
...
or something like this:
// request 22 bytes from the module
Wire.requestFrom(PX4FLOW_ADDRESS, 22);
if (wire.available() != 22) {
return false;
}
// read the data
frame.frame_count = read16();
...
Also draining the buffer (removing any remaining data) is not needed. The Wire library uses packets of data and starts with a cleared buffer before doing a I2C transaction.
There was a bug in the library for the SAMD processors that a buffer was not cleared, but that bug has been solved a year and a half ago.
Hi, I have been trying to use the pose_estimate example to estimate the position of my vehicle but sometimes the problem is that the velocity_x and velocity_y returns 'nan' and I can not figure out why. Can you please help me? Thanks a ton in advance!
can i get position x,y or velocity vx,vy without the ultrasonic ?
Hi
Could i not use the built in sonar and use an external one to get the Ground distance data?
so i can replace the sensor.quality_integral with the readings from the external sonar in the pose_estimate.ino code
also should i only take when the readings when the quality is more than 100 as sometime it hit zero
if (quality > 100)
It seems like you havent initialize the type in pose_estimate.ino
` x_rate = sensor.gyro_x_rate_integral() / 10.0f; // mrad
y_rate = sensor.gyro_y_rate_integral() / 10.0f; // mrad
flow_x = sensor.pixel_flow_x_integral() / 10.0f; // mrad
flow_y = sensor.pixel_flow_y_integral() / 10.0f; // mrad `
Hi there,
Im trying to add px4flow(Lucas-Kanade method custom firmware) to pixhawk(3.3rc1) I think, Its work :)
My question:
1.Use USB connect PIX : I can in Mission Plannner's user items "opt_m_x" and "opt_m_y" for optical flow .
2.Use Battery powered : Can't in Mission Plannner's user items "opt_m_x" and "opt_m_y" for optical flow.
But only reset PIX . I can in Mission Plannner's user items "opt_m_x" and "opt_m_y" for optical flow.
the ultrasonic MB1043 works alone properly but when it's put in the px4flow chip it doesn't give ground distance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.