Why after adding a subscriber for mavros/altitude
and then drone cannot take off by offboard python control in simulation
There is no error in the python script.
When running the python, it gets stuck in “landed state changed from MAV_LANDED_STATE_UNDEFINED to MAV_LANDED_STATE_ON_GROUND”
Last, the script ends and shows that ‘alt:’ False,
failed to hear from all subscribed simulation topic.
However, I actually can print the Altitude from my subscriber.
I suspect whether because I add a mavros/altitude subscriber in my code will interfere the MAVROS or PX4?
but I think adding one more the same subscriber should not affect MAVROS or PX4?.
In the callback function, both of “pass” or “rospy.info” do not work.
If deleting this callback function, the drone can successfully take off, like the below screenshot.