I’ve found why the incorrect ground truth feedback is received. As you mentioned before, the /world/$WORLD/pose/info
topic doesn’t take into account nesting. I printed all of the names found with pose.pose(p).name()
below to confirm this:
Printing the pose of the nested x500_1 after it has taken off shows no update. However, the pose of connected_group shows an update to the z value as x500_1 rises. I’m assuming this is because whatever is publishing the topic "/world/" + _world_name + "/pose/info"
is using movements from the lowest-level model to change the pose of the highest-level model. Any idea where this topic might be published so I could rectify this? I’m assuming it’s in Gazebo somewhere rather than PX4…
Edit: SOLVED!!
Turns out that the connected_group
model’s pose is taken relative to the first link nested in it. Because x500_1 was the first link, when it was taking off, connected_group
was moving too. Simply adding a reference link before the first drone in connected_group
solves this problem. See a screenshot of the result below (drones mid-flight)!
Thanks so much for your help @Benja!