I’ve pushed the precision landing using IRLock into master. So I’m sure everyone here’s seen the blog posts by Thomas & Brandon Stone.
http://diydrones.com/profiles/blogs/safe-landings-in-tight-spaces
..and I successfully reproduced this a few months ago: https://www.youtube.com/watch?v=2z14S_a6bNk
At the moment, the precision landing only kicks in when the IRLock sensor is healthy, the vehicle is landing in regular GPS assisted LAND flight mode (i.e. not RTL, not Auto). Also if the pilot overrides the roll, pitch inputs it stops using the IRLock sensor for that landing.
The precision landing will go out with AC3.4 so we have some time to fix up other issues including:
· Create a wiki page showing how to connect the IRLock sensor to the Pixhawk although I think some of that info is already on the irlock web page (http://irlock.com/).
· Implement a velocity control (currently it uses a position controller)
· Extend the precision landing to RTL and AUTO.
-Randy
Here’s a wiki page with details on the setup in case anyone wants to give it a try.
http://copter.ardupilot.com/wiki/precision-landing-with-irlock/
-Randy
Thomas,
Leonard is the controls expert but I think we should take the 2D earth-frame angle to the target from the precision landing library and convert it into a 3D velocity request. To do that conversion we can use the pi_precland 2-axis PI controller (class is here: https://github.com/diydrones/ardupilot/blob/master/libraries/AC_PID/AC_PI_2D.h). This object is already declared in the code but not used.
So say the target is 10deg North and 10deg East we would take that (10,10) and pass it into the pi_precland.set_input(Vector2f(10,10)). Then we would call pi_precland.get_PI() to retrieve a 2D Vector which we can use for the north & east velocities. For the downward velocity we could just use the g.land_speed parameter (normally 50cm/s). So now we have a 3-axis desired velocity which we want to somehow command the vehicle to fly.
Using the velocity controller is quite different than using the existing LAND mode’s loiter controller so we should create new landing functions called “land_precision_init” and “land_precision_run” which should be similar to the Guided mode’s velocity controller functions “guided_vel_control_start” and “guided_vel_control_run”.
https://github.com/diydrones/ardupilot/blob/master/ArduCopter/control_guided.cpp#L83
https://github.com/diydrones/ardupilot/blob/master/ArduCopter/control_guided.cpp#L256
Within these new functions we would call the pos_control.set_desired_velocity() with the 3-axis desired velocity vector from above.
In order to call these new land-precision-init and land-precision-run functions we need to make some changes to the land_init() and land_run() functions to call them if the vehicle has GPS and a healthy precision landing sensor.
-Randy
--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Daniel Nugent brought up the same point regarding the camera update rate and the control method used.
I don’t think the update rate change of the sensor changes the decision on which controller is used. Neither IRLock nor a slower vision camera will be as fast as the 400hz update rate of the velocity controller so in both cases we keep using the last known desired velocity until it’s older than a defined timeout period (like 0.2 seconds). After that timeout we decay the desired velocity back to zero and perhaps perform some kind of failsafe action (like climb back up until we see the target again).
Imagine we only got a single update from the sensor. If that was used to come up with a desired velocity which we then used indefinitely, or if it was used to calculate an estimated position, the vehicle would end up in the same spot (assuming no errors in the distance estimate).
I think the velocity controller thing will become obvious later. It’s a bit like I can point at the door across the street and say, “walk that direction at 1m/s” or I can give an estimated lat,lon position of the door. Either way, you’ll get there.
Re issues, on my latest test, the overall solution was having quite a bit of trouble with the earth frame X and Y angles (see attached pic). I think the issue was either that it was seeing multiple targets (because I didn’t calibrated the sensor for the light levels) or I may have introduced a bug during some refactoring.
If it turns out that it’s because of multiple targets we may need to add some checks to make it easy for users to check this. Maybe messages to the GCSs with the target info and the maybe ability to set the light sensitivity through the pixhawk.
I have not looked into copter-camera angle errors. I think a more likely source of error is the image and IMU being out of sync. I am working on syncing the frame capture with the IMU using timestamps. Haven't had the chance to test it yet.
I also ran an off board(companion computer) test of the new velocity controller proposal and it works quite well. Still tweaking to make it better but it looks promising.
Daniel
I need tutoring (I pay $ to you ) for builing/compiling IRlock precision landing pixhawk firmware. Please HELP! I am an experienced real-time C programmer. I need a make kickstart from someone in this forum subject. I am in Montreal , Canada. My phone is 5144474920