I am making some new applications to control my px4 vehicle, and I am wondering what is the best way to listen to a topic. I can either
orb_copy the topic every loop, or use the
if(fds.revents & POLLIN) to copy once new data is available, but I am not sure which one is suitable for which.
The current application I am working on is to receive a custom mavlink message and perform a special manoeuvre, the two key topics are “vehicle_command” and “vehicle_attitude”. I use the
px4_poll method on the command topic since I think it doesn’t matter if it is slow, and I force the
orb_copy call on the attitude topic every loop once the manoeuvre is initiated since I think it has to be fast.
Is this the correct thinking, or am I missing the point of