PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

Make sitl-ignition plugins publish to user-defined topics

Open snimu opened this issue 2 years ago • 0 comments

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.

snimu avatar Jul 28 '22 13:07 snimu