Hi all - I’m not new to Ardupilot, but I’m brand new to Follow Mode, specifically in this case with Arducopter. Today I was trying to see if I could get the SITL built into Mission Planner to “follow” my Holybro X500 around as I actually flew it in real life. I thought I had everything set up -
FOLL_ENABLE = 1
FOLL_SYSID = 2 (current ID of my Holybro X500)
FOLL_OFS_X = -8 (arbitrary number I thought would be easy to see on the map)
FOLL_OFS_TYPE = 1
I left the other Follow related parameters all at defaults.
I connected to SITL, with its home point in the same place as my in-real-life copter approximately, and then also connected to my in-real-life copter simultaneously in Mission Planner.
I then had SITL take off to 10m, and switched it into Follow Mode. I armed the real life copter, and took off in Loiter mode. Flew it around, and the SITL copter just sat there without moving - no following going on that I could see.
The SITL connects to Mission Planner via TCP, but my real life aircraft connects via UDP (ELRS Mavlink) or UDPCI (Dronebridge).
Is the reason that no following was taking place between the two copters because they couldn’t “see” each other on the network? Please forgive my terminology, I’m not very familiar with networking in this sense.
Is there some way I could make my scenario work? I would like to test it with SITL in Mission Planner before trying it with two real life copters both on the same UDPCI network, just to make sure I know what to expect.
Thanks @LupusTheCanine - do you have any idea which option would be relevant? There’s a few different “follow” and “swarm” options on the menu and I’m not sure which one would do what I’m looking for.
Thanks @Yuri_Rage ! I should be able to test this afternoon. Do you know if this button forwards between all links currently connected to Mission Planner when you click on that option? Right now I can only test between SITL and one real life copter, but I hope to try this with multiple copters at the same time - would this basically connect all of them - make Mission Planner into a Mavlink router of sorts?
I was able to go out and test this this afternoon and saw some promising results, but I wanted to ask for clarification on something that I noticed.
For clarity my setup was this -
MAV 2 is the real life copter I’m manually flying around in Loiter Mode - the “leader”
MAV 1 is SITL on my laptop placed in follow mode with the following parameters
FOLL_ENABLE = 1
FOLL_SYSID = 2 (current ID of my Holybro X500)
FOLL_OFS_X = -8 (arbitrary number I thought would be easy to see on the map)
FOLL_OFS_TYPE = 1
I left the other Follow related parameters all at defaults.
I used the method yuri mentioned above to “Forward between links” so the SITL could see the real life copter while they’re both connected to the same Mission Planner instance running on my laptop.
Things seemed to be going great at the start - and the following SITL copter was mirroring my maneuvers from the real life flight. However, I was flying in a rather small area and being a bit aggressive on yaw turns, etc. and all of a sudden the SITL copter just stopped “following”. Was the position data sent from the lead copter changing too quickly and the SITL that was following just lost the ability to follow? I’m not sure how to see this in the logs, both copters appear to have fairly normal logs.
MAV 1 Log - SITL - “Follower” - SITL_Follow_Test.bin (sorry the log file is so big ~26MB, I forgot to land/disarm the SITL for a while after the flight)
Finally got the chance to test this in real life with two copters today, unfortunately no following took place. Would anyone be willing to run a sanity check on my setup?
2x Holybro X500s, each with Dronebridge modules connected in client mode to a Raspberry Pi running OpenWrt to act as a router. The router was also connected to my laptop with Mission Planner and I connected simultaneously to both aircraft and could see them with their unique SYSID_THISMAV params set. One aircraft was “2” , the other “5”.
Mav #2 was the leader, and #5 was the follower. We used the following params on Mav #5.
FOLL_ENABLE = 1
FOLL_SYSID = 2
FOLL_OFS_TYPE = 1
FOLL_OFS_X = 0
FOLL_OFS_Y = - 40
FOLL_OFS_Z = 0
FOLL_YAW_BEHAVE = 2
FOLL_ALT_TYPE = 1
I’m not sure how I would share a log of this as essentially “nothing happened”. I’m not a networking pro, so I’m suspecting that for some reason Mav 5 couldn’t see Mav 2, but I’m not sure how I could verify that. I did try the “Forward between links” that Yuri mentioned earlier, but it seemed to make no difference. What am I missing?
You could post both vehicles logs and tlogs from the GCS. Did you check that both vehicles were connected to the same instance of Mission Planner at the same time? You can select the active vehicle in the drop-down menu under the connect button.
Thanks @LupusTheCanine . Unfortunately it’s looking like for some reason there aren’t any tlogs from the flight attempt? I’m not sure how Mission Planner handles tlogs when multiple vehicles are connected. Here’s the .bin log from the “leader” aircraft. I’ll try to get the log from the follower aircraft, but that aircraft doesn’t belong to me, so it might take a bit.
I did have them connected to Mission Planner at the same time and could select whichever one necessary via the drop-down under the connect button. I could also see both vehicle icons present on the map live, at least before takeoff when I was checking things.