Custom firmware: waypoint modification.

Hello. We are currently working on a drone for a university project work. 

It is quadcopter and flight controller is APM 2.5. 

The point of the project is to implement A* algorithm (finding short path on a discretized terrain). So the flight of the drone should be described in advance according to algorithm work results, sent from GCS via Mavlink protocol. 

We are dealing ArduCopter 3.2.1-apm-px4 release from here: https://github.com/diydrones/ardupilot/releases

Using modified Arduino IDE as said in this guidance: http://dev.ardupilot.com/wiki/building-ardupilot-with-arduino-windows/#install_ardupilot-arduino

Then we are supposed to modify the code and download it to the APM (either via Arduino or as a custom firmware in Mission Planner).

THE QUESTION is how to compose a custom flight (of waypoints, for example) in the code and not in Mission Planner. It is also worth mentioning that we need waypoints to be based not in GPS because of large error, which does not fit the discretization. Or maybe we could force MP to trigger the flight by changing its code, which is also open source, it is directly from GCS to drone with no user participation in MP program. Which files (in ArduCopter project or MP) should we change in order to give the drone a set of arbitrary instructions? 

Thank you for your attention.


Best wishes

Artur 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • The copter is going to drift and there will be position errors.

    Lets say you used two laser range finders and mounted them on a wall.  One Longitude and one Latitude.  These units would then transmit the distance to the copter.  Now the GPS routine could be modified to return these measurements and you can now move the craft based on position/way points.

     

  • The firmware on the copter already understands waypoints so it would be simple to build your own GCS.  It could then use either Guided mode to fly to a position or build a custom flight plan based on input parameters.

    In either case the only way to fly would be based on GPS coordinates.  otherwise how do you know where you are and where you want to go.  If you have your own coordinate system then it becomes very difficult.  You would have to modify the GPS routine to input your coordinate system and then you could fly based on that.

    https://www.dronecode.org/dronecode-software-platform

    • As far as I know, the drone can keep its constant speed (the testing will happen indoors, so there will be no disturbance), so the positioning will be based on timing. If we know, that it takes the drone 5 seconds to travel one node, then, starting from node 0, we will be at node 3 after 15 seconds. Some calibration with distance sensors is supposed to be included.

      So, is it possible to set a waypoint on a terrain without GPS (somehow) or, better, tell the drone something like "go forward"/"go backwards", and which modifications of the code this would involve? 

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…