Comments (3)
The cited code in main.c might just be a hardware transform (maybe the sensor is physically rotated against the printed coordinate axis on the px4flow pcb). So that snippet makes sure that x_rate and y_rate correspond with the printed axis.
If that is the case then the sign switch in the commit of szobov might not be correct. Because we need exactly the transform that mike239x explained to match the rates with the flow values. It might be confusing to see the same transformation twice.
To verify that we would need to know the actual coordinate axis of the gyro sensor. It could be that during the design of the pcb the sensor was mounted such that the rate readings of the sensor could be directly used for compensation.
from px4-flow.
I should say in advance I probably don't understand what I'm saying, so be careful and think for yourself.
I think the reason is the following:
What is being computed here is offset to the flow based on gyro data.
Assuming the camera is stationary, if we rotate it along X axis, the image from camera would move along Y axis, as if the camera moved along Y axis horizontally. This is exactly why X-s and Y-s get swapped like that. Similar effect for rotating along Y axis - it results in the camera image looking as if it moves along the X axis. The minus sign appears because... well... it's hard to explain without a drawing...
Side note: rotation along Z axis would not move the image at all, and instead would rotate the image, so I think that one will be treated completely differently in the code.
from px4-flow.
Also, according to szobov@7aa3516
the signs are wrong, I guess.
from px4-flow.
Related Issues (20)
- What is the official release commit? HOT 1
- Why use flow as a angular sensor rather than a linear velocity/position sensor? HOT 3
- PX4FLOW can not work outside HOT 1
- PX4FLOW and PixHawk 4 mini issue HOT 1
- px4flow sonar no distance. Help! HOT 5
- Vehicle reject position control when using optical flow HOT 2
- Firmware version onboard HOT 2
- Binning HOT 4
- Links in the readme become unavailable HOT 2
- Sonar requirements HOT 1
- Using px4flow as a robot-cart part HOT 6
- usage of ABSDIFF macro in flow.c
- Move to Python3
- How good is the pose estimation at 18 m HOT 1
- Error in build HOT 3
- Data Output from PX4Flow camera board
- <uavcan/protocol/GetNodeInfo.hpp> not detected HOT 2
- Low and fluctuating quality of flow over i2c while USB works fine HOT 4
- Strange local_position_ned and need for a "forced" reboot to work
- Live video view Totally Striped with VIDEO_ONLY = 0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from px4-flow.