Skip to content
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

odometry data is incorrect #2362

Open
0725-wen opened this issue Jul 29, 2024 · 3 comments
Open

odometry data is incorrect #2362

0725-wen opened this issue Jul 29, 2024 · 3 comments

Comments

@0725-wen
Copy link

"When I retrieve the odometry data, I find that the data is inaccurate and the errors vary greatly, making it difficult to use the offboard mode to control the drone. Is this an issue with the PX4 flight controller or MAVSDK? Below, I'll post the odometry data I retrieved."
12BBAC67-EE09-4fcb-8568-DD727B68C8D7
95A74845-CF46-4170-8C5B-2D9CB82C86FD
C91354F7-DE77-4dba-8D06-753D82DF7A03

below is my code to get odometry data:

 while(1){
        Telemetry::Odometry odom = telemetry.odometry();
        std::cout << "odom: frameid:" << odom.frame_id << "x:" << odom.position_body.x << ", y:" << odom.position_body.y << ", z:" << odom.position_body.z << std::endl;
        std::this_thread::sleep_for(std::chrono::milliseconds(100));
    }
@julianoes
Copy link
Collaborator

Can you give some context what you're trying to do? And what versions you're using?

@0725-wen
Copy link
Author

Can you give some context what you're trying to do? And what versions you're using?

I am using offboard mode to control a drone, which requires odometry data. However, during testing, I found that the data is inaccurate, making it impossible to precisely control the drone. We are using PX4 firmware version 14.3, MAVSDK version 2.6.0, and the flight controller hardware is Pixhawk 6C. The odometry data printed above is from a test case I wrote. Ideally, when the drone is stationary and powered on, the body_end's x, y, z should be (0, 0, 0). However, this is not the case, and the x, y, z values are fluctuating.

@julianoes
Copy link
Collaborator

So, what's generating the odometry data? Isn't odometry for a vision system that provides that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants