tum-vision / tum_ardrone

Repository for the tum_ardrone ROS package, implementing autonomous flight with PTAM-based visual navigation for the Parrot AR.Drone.
http://wiki.ros.org/tum_ardrone
GNU General Public License v3.0
226 stars 192 forks source link

Updating the goal #3

Open sameerparekh opened 11 years ago

sameerparekh commented 11 years ago

Hi there-- this is a great piece of work. I have only just started fiddling with it.

I think I'd like to be able to update the goal position before the drone actually reaches the goal. I've reviewed the code briefly and I think I know how I would do this, but before I dive in I'd appreciate your feedback.

I'm thinking I would add another command to the comCb callback with some sort of "updateGoal" command. The command then wouldn't go on the stack, but it would check to see if currentKI was non-NULL, and then call a new method on the KI, "updateGoal" which changes the goal. If the 'currentKI' was a KI without a goal (i.e., not a KIFlyTo), then updateGoal would return an error...

(There would be two updateGoal commands, one which took an absolute position and one that took a relative position, just like the fly to commands, but both would call the same updateGoal method.)

If would be nice to figure out a way where the user would not have to figure out if a KIFlyTo command were currently active though, and it could just send a command and the drone would either create a new KIFlyTo if there wasn't one already active. Maybe another approach would be to have a separate non-blocking command channel?

In order to actually change the goal in the controller could I just call setTarget or would I need to reset the PID controller as well? (my understanding of control systems is quite limited at this stage.)

Thanks -s

tmagcaya commented 9 years ago

couldn't you do this by playing with setStayTime and setInitialReachDist within the wps?

I just asked the following question about an issue with the autopilot. Can you help?: https://github.com/tum-vision/tum_ardrone/issues/51