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

Estimator-real position inversion #164

Closed
iandareid opened this issue May 18, 2024 · 2 comments · Fixed by rosflight/rosplane#30
Closed

Estimator-real position inversion #164

iandareid opened this issue May 18, 2024 · 2 comments · Fixed by rosflight/rosplane#30
Assignees
Labels

Comments

@iandareid
Copy link
Contributor

The Estimated position North and East is opposite to what it should be based on the output of path_planner and the full_estimator (MAVSim estimator with a ROS wrapper) says it should be. In order to match truth in Simulation the estimator North and East had to be inverted. This issue became clear while testing path following, in a recent flight test.

@iandareid iandareid self-assigned this May 18, 2024
@iandareid iandareid added the bug label May 18, 2024
@iandareid
Copy link
Contributor Author

iandareid commented May 18, 2024

  • Gazebo's /fixedwing/truth/NED does not agree with /state (a repackaging of Gazebo truth to a ROSplane state message. /fixedwing/truth/NWU also does not agree. However I know that /state as it stands is correct (uninverting N and E). This is because it agrees with /full_estimator/estimated_state and /path_planner's output.
    • The path planner could be faulty and the full state estimator from MAVSim.
      • This seems very unlikely. These bugs would manifest in MAVSim which they do not.
    • Alternatively Gazebo is publishing NED incorrectly. This issue would have arisen in ROScopter as well.
      • This also feels unlikely. Though investigating how ROScopter deals with this could be enlightening.
    • The last alternative is that I am publishing the state wrong. However, looking through the code it is just a item by item copy of the /fixedwing/truth/NED.
      • For now I am going to fix the issue in Gazebo state transcription node by inverting N and E, but the issue needs to be fixed more permanently.
      • Testing waypoint functionality in sim is necessary.

@iandareid iandareid transferred this issue from rosflight/rosplane May 22, 2024
@iandareid
Copy link
Contributor Author

Turns out that the fix was to invert the rotation that aligned the spherical coordinate frame for the LLA. It was rotated by 90 degrees to align the axes, but it should have been rotated in the opposite direction by 90.

@github-project-automation github-project-automation bot moved this from In Progress to Done in v2.0 Release May 22, 2024
@iandareid iandareid linked a pull request May 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant