How to transmit position data required for mode Follow?

Hello,

I try to implement following with two drones using mode Follow in Gazebo.

I’ve set the following parameters:

FOLL_ENABLE = 1 
FOLL_SYSID = 1 
FOLL_OFS_X = -1
FOLL_OFS_Y = -1 
FOLL_OFS_TYPE = 1

Also, these for 1 and 2 drone respectively.

SYSID_THISMAV    1 
SYSID_THISMAV    2

When I arm and takeoff in Guided, then switch to Follow on second drone, it doesn’t follow the first one. I suppose, I need to provide telemetry to the second drone, but I don’t know how to do that correctly.

I’ve tried sending GLOBAL_POSITION_INT by establishing:

  • New output connection on 14580
  • New master connection on 14580

but it has no effect on following.

Here I found a very similar question, but I’m using Gazebo and not Mission Planner Simulation.

How can I achieve it?

According to this video, the 2nd drone should use GLOBAL_POSITION_INT from the 1st drone. I am able to sent it to the 2nd drone as described above, but how do I differ the messages and make mode Follow use it?

@rmackay9, sorry for bothering, but since you presented this mode, maybe you will be able to lend some advice?