I am a beginner of using mission planner. Basically, I want to fly from home to the point where I want to fly in square patterns three times within 60s and move on. I tried using loiter_turn within radius, but it only flues in a circle. I want to fly in a box shape centered on the point. I don’t know which command I should execute. Please help.
Using the command DO_SET_ROI will also keep the quad pointed to the centre of the box (or wherever you have the ROI set.) But as Dave said, you’ll need to plan the waypoints to create the box.
If you have the ROI coordinates, and you want it in the middle of the square, simply add/subtract half square side or half diagonal in degrees to get the waypoints coordinates for two simple squares (squares with side or diagonal north-south (no rotation)). Check here.
I don’t think so. Just as easy to drop the waypoints and set the ROI.
Are you trying to import a KML file of a polygon? It’s not straight forward but it’s doable. How accurate do your waypoints need to be? Are we talking meters or centimetres?
The thing with Mission Planner (like a lot of Ardupilot) there’s often many different ways to achieve your goal.
Thanks again for your answer. I am not trying to import anything. There is no given number, but we are talking about in terms of time limits. Here is what I have been trying to do.
1. Auto take off from home and proceed to your north 100 meters 2. Once you hit this point, fly a square box shape centered on the point. Fly the square pattern three times within 60 seconds. 3. Then proceed to your west and hover for 15 seconds and proceed home to the original location.
That was quick and I just realized I missed an important step. But since I’m guessing this is for a class or competition I’ll let you fill in the gaps.
Up left: first mission (messed).
Up right: second mission.
Down: height on second mission (shows six squares). Both missions should do 4x3=12 squares, but on the second DO_JUMP the loop counter is messed.
I can’t make heads or tails of the way you have the waypoints written out there in terms of what the DO_JUMP is doing. That doesn’t mean something’s wrong, I just don’t understand the format.
I notice you’re using QGC, and I used Mission Planner for my example. They do handle somethings slightly differently so that might play into this. Not sure though.
Simply, read any .waypoints file with a text editor and compare. You can also copy&paste lines above into a .waypoints file, change spaces in tabs and it should work (if not, inspect it with a binary editor for any strange characters).
QGC or MP shouldn’t matter; for simulation they just observe. I first observed this in SITL, so for real life missions I have always inserted the dummy jump points. Referring to the double jump, I suppose there is a unique loop counter internally, so no solution (in real life it doesn’t work either).
I just ran this mission in the simulator on Mission Planner. The DO_JUMP performed as expected. No extra commands required.
One thing I’ve noticed with DO_SET_ROI, is that if it’s repeated in the jump the projected flight path (yellow lines) on the planner will show it like it’s a waypoint, but when you fly it or run the SITL it doesn’t actually fly there. In the example I just created I put the ROI command before the looped section of waypoint and that didn’t happen.
I’m not sure why you are needing the dummy jump point. I’ve never run into that on Plane or Copter. Try the mission I posted here in MP if you can and see what happens.
Yes, that’s what the OP was looking to do and that’s what my mission plan does.
Here’s the video. This was with the same waypoint file I posted above.
The DO_JUMP to waypoint 4 on yours is correct. But for some reason your WP4 and my WP4 are different. In my file WP4 is the lower left corner of the box, so that’s why it’s not cutting the corner. Your WP4 is the upper left corner, so it is making the triangle to go from lower right to upper left.
When you re-order or delete/add commands & waypoints DO_JUMP commands do not change. You need to manually adjust them. So if you added any command to the mission before the DO_JUMP that will screw up the flow.