PX4-Autopilot
PX4-Autopilot copied to clipboard
Make sitl-ignition plugins publish to user-defined topics
Problem
So far, all ign topics that the gps-, magnetometer-, and barometer-plugin publish to are hardcoded. The gazebo-mavlink-interface similarly ignores the user-defined topics that it should subscribe to and uses hard-coded topics instead.
Allowing for user-defined topics gives the user much more flexibility.
Solution
Add magPubTopic
, baroPubTopic
, and gpsPubTopic
to their respective plugins. Use the magSubTopic
etc. tags in the gazebo-mavlink-interface to set the subscribers (the tags are already read out, but the variables that their values are saved in are unused).
Use these topics in the PX4-Autopilot/Tools/simulation-ignition/models/x3-model and the PX4-Autopilot/Tools/simulation-ignition/worlds/iris.world-world.
EDIT: Pull request #3 on px4-simulation-ignition would fix this issue.