-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
[Bug] Terrain Following Not Working in PX4 Gazebo Simulation Environment #24315
Comments
Could you share the flight log? |
When I check the log file in this section, the distance sensor shows 1 meter. However, in the QGC application, the value appears to be fluctuating, and my actual position matches the altitude shown in QGC. The received altitude data is displayed this way on the image |
When I check the parameter for this log, EKF2_HGT_MODE is set to 1, not 2 as you mentioned. Could you recheck if the parameter was indeed properly set during simulation? I suggest modifying the startup script of the airframe to set the parameters you want to set to desired values as vehicle default. |
@junwoo091400 I made the corrections you suggested and tried again, but the flight still does not adjust according to the received distance data |
Could you share the log for the fixed flight? |
@junwoo091400 The location change can be seen in the distance data, but I cannot change the height of the drone at all. This is the log |
Describe the bug
I conduct tests in the PX4 simulation environment before transitioning to the real system. In this case, I added a distance sensor in the simulation and publish its data at 30 Hz to /fmu/in/distance_sensor via ROS2. I can verify that the vehicle receives this data through QGroundControl (QGC). However, even though the sensor values change in uneven terrain, the drone in the simulation does not follow these changes and continues to fly at a constant altitude
Note: Although the sensor data is broadcasting at 30 Hz, it appears as 0.2 Hz in QGC.
To Reproduce
Expected behavior
The vehicle should maintain a constant height relative to the ground based on the sensor data.
Screenshot / Media
Despite the changes in the sensor data, the vehicle did not correct its distance to the ground
Flight Log
No response
Software Version
PX4: 1.15 version
Simulation: Gazebo Harmonic
ROS2 Humble
Flight controller
simulation
Vehicle type
Multicopter
How are the different components wired up (including port information)
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: