-
Notifications
You must be signed in to change notification settings - Fork 1k
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
setpoint_raw/global not working? #728
Comments
I just found that it went into the failsafe mode after arming. |
@Changliu52 PX4 doesn't handle |
OK, I see, Thanks @TSC21 . The mavlink in px4 doesn't handle any position set point... So what is the appropriate way to command GPS location in offboard mode? Thank you advance. Chang |
The projection is a thing already going on in the PX4 repo. Check https://github.com/PX4/Firmware/tree/global_to_local |
What do you mean? https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_receiver.cpp#L210 |
Sorry typo the px4 v1.5.5 doesn't handle any global position set point. |
1.5.5? I'm mostly sure it does. |
Oh, so what did I do wrong? I just need to command global set point in offboard mode. |
Sorry I read wrong, it allows local position but not global. |
No. You have three options:
Will gladly review the implementation of 1 and 2 if you decide to move forward to it. |
Interesting. For the 1st option, you seems to have integrated the GeographicLib successfully. So I guess all I need to do is to use some of the functions to do the conversion and use the local setpoint for control. Which function from GeographicLib should I use to do the conversion? I am not really familiar with the library. Thanks |
https://geographiclib.sourceforge.io/html/classGeographicLib_1_1Geocentric.html |
Also in addiction, in |
Really sorry @TSC21 , having looked at the packages, It seems really difficult for me to do this at the moment, I have to make the drone follow the GPS waypoint offboard this week. I will come back for the develop in later stage. Maybe sending waypoint service request to mavros/mission/push would work? |
You can only use that for geodetic (LLA) coordinates. |
I'm closing this for now. @Changliu52 let us know if you got a solution for your case in the meantime. Feel free to open a PR with useful changes and features regarding sending global setpoints from ROS side. |
Complete implementation, but according to mavlink/mavros#728 (comment), current px4 version does not allow "SET_POSITION_TARGET_GLOBAL_INT".
This is only bug and feature tracker, please use it
to report bugs or request features.
Issue details
I was testing in gazebo simulation.
After offboard mode and arming
I send to
mavros/setpoint_raw/global
asheader: seq: 1135 stamp: secs: 1497020453 nsecs: 330054297 frame_id: '' coordinate_frame: 5 type_mask: 3064 latitude: 47.3977432251 longitude: 8.54559803009 altitude: 490.0 velocity: x: 0.0 y: 0.0 z: 0.0 acceleration_or_force: x: 0.0 y: 0.0 z: 0.0 yaw: -1.57079637051 yaw_rate: 0.0
while monitoring
/mavros/global_position/global
showingheader: seq: 7322 stamp: secs: 1497020388 nsecs: 743959040 frame_id: fcu status: status: 0 service: 1 latitude: 47.397742 longitude: 8.5455937 altitude: 488.158 position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] position_covariance_type: 1
The quad in simulation stays on the ground armed without taking off.
The same setup was working with
setpoint_raw/local
without problem.MAVROS version and platform
Mavros: ?0.18.4?
ROS: indigo
Ubuntu:14.04
Autopilot type and version
[ ] ArduPilot
[X] PX4
Version: v1.5.5
Node logs
Diagnostics
Check ID
The text was updated successfully, but these errors were encountered: