Giter Club home page Giter Club logo

Comments (3)

tpetri avatar tpetri commented on July 26, 2024 1

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.

mike239x avatar mike239x commented on July 26, 2024

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.

mike239x avatar mike239x commented on July 26, 2024

Also, according to szobov@7aa3516
the signs are wrong, I guess.

from px4-flow.

Related Issues (20)

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.