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

Support of GPS setpoints in OFFBOARD mode #7552

Closed
mzahana opened this issue Jul 7, 2017 · 11 comments
Closed

Support of GPS setpoints in OFFBOARD mode #7552

mzahana opened this issue Jul 7, 2017 · 11 comments

Comments

@mzahana
Copy link
Contributor

mzahana commented Jul 7, 2017

Hi.
I would like to know if I can send GPS setpoint to PX4 in offboard mode. One work around that I know is to to do some transofrmation to transform the difference between current gps point and target point to a local_ned position setpoint which px4 accepts. However, it would be more convenient to have this directly implemented in px4 firmware.

If not currently implemented, where should it be implemented ? Maybe I can give it a try. Also, a corresponding mavlink msg would be required, right?

Thanks.

@TSC21
Copy link
Member

TSC21 commented Jul 7, 2017

@mzahana PX4 is currently working torwards having navigation on the local frame only, meaning there is going to be always a correspondence/transformation between global and local frames on the Firmware side. If you are using MAVROS, maybe you will want to try fake_gps plugin, which transforms GPS into local coordinates already before sending the setpoint msg to the target FCU. It considers as the local origin the Home Position.

@TSC21
Copy link
Member

TSC21 commented Jul 7, 2017

In any case the support you are talking about is also possible by adding an handler for SET_POSITION_TARGET_GLOBAL_INT and then the respective usage on the the Firmware.

@mzahana
Copy link
Contributor Author

mzahana commented Jul 7, 2017 via email

@TSC21
Copy link
Member

TSC21 commented Jul 7, 2017

You don't need to create a new msg as the one I told you is enough. fake_gps fits another purpose, you are right, I just wasn't sure what was the source of the data. But a new plugin called setpoint_global would make sense, considering that it receives lla data (geographic_msgs can handle data perfectly) and then do the conversion as it is done on fake_gps (LLA->ECEF->ENU->NED). You are welcomed to add the support and will gladly review it. The same thing if you bet on support global setpoint on the FCU side, but you should consider add that support for the global_to_local branch.

@mzahana
Copy link
Contributor Author

mzahana commented Jul 10, 2017

I will start with the Mavros option as I had that implemented and tested in flight some time ago. Then, probably later I will look into the FCU implementation.

@TSC21
Copy link
Member

TSC21 commented Jul 10, 2017

I will start with the Mavros option as I had that implemented and tested in flight some time ago. Then, probably later I will look into the FCU implementation.

Great. Have a look at fake_gps so to know what functions you can use to apply the transform LLA->ECEF->ENU.

@TSC21
Copy link
Member

TSC21 commented Jul 27, 2017

@mzahana done any progress in this?

@mzahana
Copy link
Contributor Author

mzahana commented Jul 27, 2017 via email

@mzahana
Copy link
Contributor Author

mzahana commented Aug 6, 2017

I created a mavros plugin in
mavlink/mavros#764

@TSC21
Copy link
Member

TSC21 commented Aug 13, 2017

@mzahana we need an update on the PR so it can be merged. Thank you

@mzahana
Copy link
Contributor Author

mzahana commented Dec 14, 2017

Now, using mavlink/mavros#764 (already merged into mavros master), GPS setpoints can be sent via MAVROS.

@TSC21 TSC21 closed this as completed Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants