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.
@rmackay9 I really try not to ping devs becuase I know you’re busy, but I saw the discussion over on this post that seemed somewhat related - Drone Swarming telemetry data
Would you have any insight into why I’m having the issue with my Follow Mode testing? I was attempting to follow the wiki page, but I’m not sure what I’m missing. Thank you in advance.
So the issue is likely in the networking setup (not AP directly). I suspect OpenWrt is not forwarding the mavlink traffic between vehicles so while you can see them on the MP map, they can’t see each other.
It should be possible to verify this by connecting MP via a USB port to one of the vehicles. I think you’ll see only the vehicle you’re connected to and not the other one.
BTW I think that DroneBridge supports a mesh network but I haven’t tried it yet.
Thanks @rmackay9 ! I appreciate you taking a look. I will look into getting the packets forwarded between vehicles if possible. I don’t know that Dronebridge has any kind of mesh networking capability yet, even with the drone light show edition, but I could’ve missed something there as well. I appreciate the help.
One other thing - would/should the “Forward between links” work in my current scenario? I tried that as well, but it didn’t seem to change anything and it’s a bit of a mystery button to me in the first place.
From reading the above description it seems like the network setup is something like below but it’s unclear to me if from MP’s point of view there are two links or only one. I suspect there are but two be clear, when you connect with MP, do you still need to right-mouse-button-click to the left of the Connect button and select “Connection Options” and then individually connect to two different IP addresses?
If there are two links then I would expect the “forward between links” to work. If it doesn’t then it sounds like a Mission Planner issue which would belong on the MP issues list.
Thanks again for taking the time to reply @rmackay9 . Yes, the network setup is essentially what you diagrammed. I do in fact have to still right-mouse-button-click and individually connect to each IP address in Mission Planner to see all the vehicles. I didn’t even consider the fact that if the vehicles could all see each other’s mavlink messages, I probably wouldn’t have had to do that for each vehicle - that makes a lot of sense now that I think of it.
I tried the “forward between links” previously, but it was a brief test the day of the flights when nothing else was working, so I’ll return to that and see I can do some more conclusive testing. Is the “forward between links” function what you used in your Rover following demo video on the Follow Mode Wiki page?
It seems that maybe what I’m really after is some way of configuring the router to allow the vehicles to see each other on the network. I think something like this? GitHub - mavlink-router/mavlink-router: Route mavlink packets between endpoints · GitHub Unfortunately my networking/programming knowledge is such that just trying to understand the README on that page has me a bit lost, but I’ll keep on looking around. If anyone has any other suggestions, that would be great.