Open michaelb-sm opened 2 years ago
Edit: Added readout from MAVlink Inspector
I do not see any trouble on mavros side. Probably you need to change some firmware parameters to select mocap position source.
I'm inclined to agree, but I'm not sure which parameters in QGroundControl would help that I haven't already changed. Since I don't have a GPS module connected, GPS_1CONFIG doesn't have any obvious port to be assigned. If I set it to TELEM1 (since technically I'm sending the GPS data over that port) then it blocks communication from mavros over that port. Outside of MAV or GPS_ parameters, of which I have looked into, I'm unaware of any other parameters which would specifically grab this data (since it's supposed to be read as GPS data using fake_gps).
I know EKF2 is used for state estimation on the Mini, but i'm not very familiar with it. Is it possible that it's having trouble reading this source?
Sorry, but i never tried to setup it. So i mostly guessing. Perhaps you could find something useful here: https://docs.px4.io/v1.12/en/ros/external_position_estimation.html
Just one common thing to check: do you update header.stamp?
Thanks for the resource, looking into it now but I'm not sure if this will properly substitute a GPS signal.
I am updating header.stamp with ros::Time::now() every time it's published
Hi @michaelb-sm ,
Not sure if this is the only issue blocking you, but the data sent by your fake_gps doesn't pass the EKF requirements. This is a reason why it is not using the data (e.g.: number of satellites is 5 while the min specified by the parameter is 6 by default, see https://docs.px4.io/master/en/advanced_config/tuning_the_ecl_ekf.html#gnss-performance-requirements).
So you can change the data you send using your fake GPS or relax the EKF requirements (EKF2_REQ_xxx
) or disable some checks using EKF2_GPS_CHECK
.
Issue details
I am attempting to fly indoor in a GPS denied environment, and so am trying to use fake_gps to allow me to enter offboard mode. Currently I do not have a mocap/vision system available so I am publishing a static pose estimate to the /mavros/fake_gps/mocap/pose topic from a custom node. However even with this node running in the background, I don't see any data being published to /mavros/global_position/global or /mavros/hil/gps, and thus am unable to either set my home position or enter offboard mode.
I am using a Pixhawk 4 Mini with Jetson Nano 2GB as a companion computer, and QGroundControl to configure the Mini. I have MAV_USEHILGPS set to 1 in QGroundControl and am receiving data on GPS_RAW_INT in Mavlink Inspector, so I know that the Mini is receiving data of some kind. Connection to the Mini is established over the Jetson's GPIO pins, and I launch mavros with the following:
fake_gps plugin in px4_config.yaml
Readout from GPS_RAW_INT in MAVlink Inspector
This data does differ from that specified in the plugin config, not sure why/how that would change, but it only appears when I publish to fake_gps
Published message to /mavros/fake_gps/mocap/pose
MAVROS version and platform
Mavros: ?0.18.4? ROS: Melodic Ubuntu: 18.04
Autopilot type and version
[ ] ArduPilot [ X ] PX4
Version: ?3.7.1?
Node logs
Diagnostics
Check ID