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

Question about EKF Origin Setting for Offboard Flight Mode Transition #238

Closed
Mitchell-Lee-93 opened this issue Nov 17, 2023 · 8 comments
Closed

Comments

@Mitchell-Lee-93
Copy link

Mitchell-Lee-93 commented Nov 17, 2023

Hi Jaeyoung,

I want to say that you've done some amazing work with this code! I've been exploring it for an indoor offboard flight in a real drone.

According to the PX4 documentation (Link), even though local position data is obtained from Vicon, setting the global origin is necessary to establish a global position, a requirement for transitioning the drone into offboard mode. While going through the code, however, it seems like there isn't a part in the code that sends the EKF origin information to PX4.

Could you please clarify how the transition to offboard mode is achieved without the global coordinate being explicitly sent? I might be missing something in the code, or misunderstood the transition to offboard mode.

Thanks in advance for your help and the great work on this project!

@Jaeyoung-Lim
Copy link
Owner

@Mitchell-Lee-93 Sorry for the late response,

Could you please clarify how the transition to offboard mode is achieved without the global coordinate being explicitly sent? I might be missing something in the code, or misunderstood the transition to offboard mode.

Offboard mode does not need any reference of global position. I think the confusion comes from the fact that auto flight modes (which do not include offboard) are tracking GPS waypoints.

Could you elaborate on why you are trying to use global position estimates

@Mitchell-Lee-93
Copy link
Author

Thank you very much for the clarification Jaeyoung!

To provide more detail, I successfully conducted indoor flights using an Omnicopter. Following this, I attempted to use the MAVROS C++ offboard control example to enable the Omnicopter to follow a predefined trajectory. However, when I tried to switch to offboard mode using the RC stick, I encountered the message, "Switching to mode 'Offboard' currently not possible." Initially, I thought this issue was due to the lack of a global position origin, but now I realize that might not be the case. 🤔

@Jaeyoung-Lim
Copy link
Owner

To provide more detail, I successfully conducted indoor flights using an Omnicopter.

@Mitchell-Lee-93 Do you have a video? :)

I thought this issue was due to the lack of a global position origin, but now I realize that might not be the case. 🤔

It means that you either don't have a local position estimate, or the offboard control message flags are not sent properly.

@Mitchell-Lee-93
Copy link
Author

I don't have a video of the experiment at the moment, but I'll be sure to share it here as soon as I have one.

Thank you very much for highlighting the potential issues. I'm confident that the system has a valid vision_pose and local position estimate, as it was able to fly in position control mode. Based on your suggestion, I will take a closer look at the offboard control message flags!

@Jaeyoung-Lim
Copy link
Owner

Jaeyoung-Lim commented Dec 2, 2023

@Mitchell-Lee-93 If you can share a flight log, would be easier to find what the problem is.

Edit: Similar issue: PX4/PX4-Autopilot#22456

@Mitchell-Lee-93
Copy link
Author

Mitchell-Lee-93 commented Dec 11, 2023

Thank you a lot for your help and advice! I would have kept wasting my time on the global position thing if you haven't pointed it out. I was able to make it fly offboard mode by changing the setpoint topic from '/mavros/setpoint_position/local' to '/mavros/setpoint_raw/local' in MAVROS C++ offboard control example. This is the flight video of 8-figure trajectory tracking while rotating, to check 6 DOF flight capability (Video). Thank you again for the help!

@Jaeyoung-Lim
Copy link
Owner

@Mitchell-Lee-93 Thank you for the video!

I also have a ros2 implementation specifically for omnidirectional vehicles: https://github.com/Jaeyoung-Lim/px4-manipulation

Let me know if there is any way we can further collaborate :)

@Mitchell-Lee-93
Copy link
Author

That sounds awesome! I'll contact you by email :)

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