I just finished building the code for Aruco landing, i.e. gazebo_precision_landing.py. I’d like to adjust the flying course after takeoff and before initiaing precision landing. Any suggestions?
Cheers,
Daniel
Adjusting Flying distance and course in Aruco Landing sim
Could you be a bit more specific how you want to ‘adjust’ the course?
For example, if you want to fly to a specific waypoint with an Aruco marker from your Home location, you could add a goto(wp) statement based on an assigned wp geo location where x = lat, y = lon and z = alt:
![image](http://community.dojofordrones.com/uploads/default/original/1X/97cf20e79b28abd6fd223c12359af43b25d2a35f.png)
This is very helpful, thank you.
More clearly put: I’d like to:
- initiate takeoff to a given height
- navigate to a point in space and hover for 5 seconds
- Navigate to another point in space and hover for 10 seconds.
- Then return to the original takeoff spot, marked with an aruco marker.
Also, I’m curious if there’s a certain location within the code where the function and command you shared should go within the context of gazebo_precision_landing.py?
Thanks,
Daniel
Actually the taco delivery lesson goes over this sort of thing. Use that and what I said above for your mission.
The goto() function includes a time.sleep(x) function that you can adjust to 5 seconds or whatever. Or you can put the sleep function for hovering outside the if statement and between waypoints down in your executables.
![image](http://community.dojofordrones.com/uploads/default/original/1X/93859842f97b19b9b3c66f8f35fda4cea85041ea.png)
Add as many waypoints as you want, the last is the original takeoff spot. Alternatively you can create a list of waypoints and then use a for loop to run through each. You might want to switch to Loiter mode when hovering over a waypoint, then switch back to Guided before going to the next place.
Regarding your last question, study the structure of the gazebo_precision_landing.py or taco_delivery.py code. I would modify the taco_delivery.py code. Add waypoints and remove the lander() function until you go home. You can remove the controlServo() function unless you want to drop something.