PX4 Autopilot firmware's mavlink stream to serial isn't turned on by default
Conclusion
Understanding and working with Mavlink and Pixhawk can initially seem daunting. Even though you have installed the suitable packages for Python and the correct script, you may experience nothing is printed. This is because of the PX4's firmware. The firmware does not have a stream instance as default for serial connection. It needs to be wakened up manually; We can wake it up by simply sending a heartbeat message request.
Indeed, this manual "wake-up" step was not even murky from the official Mavlnik documentation around 2017, probably until now. This kind of "absence" makes the people turn around. Yet, I will make it easy and accessible.
PX4 Workshop
Need to master all the PX4 topics with ROS for your robotics project? I got you covered! 🚀🤖✨ Checkout this PX4-ROS workshop: PX4-ROS Workshop
PX4 Workshop
Need to master all the PX4 topics with ROS for your robotics project? I got you covered! 🚀🤖✨ Checkout this PX4-ROS workshop: PX4-ROS Workshop