Sorry for the double comments. But I’m facing an issue that I don’t understand.
The mission is to stabilize the drone at z = 2 m, and then at z = 4 m (at the same point, x = 0, y = 0).
In Gazebo, all is working well, the drone receive the desired point, and go there without any problem.
You can see it with the logs :
log_6_UnknownDate.bin (662.9 KB)
But when it is for the Pixhawk in “real life”, for the same code and same way to work, the desired pose is not taking into account in the logs. For example, when taking the drone by hand, we have for the altitude :
For both case, simulation and real life, the topics :
- /mavros/localpoint_position/local is publishing the desired pose
- /mavros/local_position/pose is publishing the pose state
So the drone is fed by position, and take it into account. But for the desired pose, I don’t have the same behavior.
Here is the parameters if needed :
Pixhawk_Firmware_27.02.2019_GUIDED_NO_GPS.parm (13.8 KB)
For the difference, I see “New mission” in Gazebo. Is it because I use the function “take off” that it starts a new mission ?
For the real flight, I’m going to take off manually (“ALT_HOLD”), and then switch to “GUIDED” flight.
Is it possible to start a new mission without the take off function throught rospy ?
If you have any idea where it can come from, I’m taking it ! Thanks a lot guys
P.S. : By the way, I realize that the altitude is using the vision pose state, and not the rangefinder (here a lidar). If you know how to fix it, it would be awesome ! Otherwise, it is not a critical point for now, I will focus on this point later.