Closed fanshi14 closed 7 years ago
Very good and simple planning!
@chibi314 If we change the control to global whiling returning to home. It will be easier for @KahnShi to solve the above issue. However, I also realize the problem to using the global odometry for control.
To conclude, the options we have are:
Ok. I understood the problem. I think global control is the better one. The problem of the odometry drift matters only during returning home phase. Returning home phase doesn't take so much time, so it is not a big problem.
First, the circle motion is finished, the UAV goes to the place where it started the circle motion by local control(referring to the target tree with vision). Next, using global control(its odometry), the UAV turns around 180 degrees. Finally, using global control, it returns home. Ideally, the global position of the home is (0, 0), but may be drifted. So, the global position of home should be re-calculated. Given that the global tree position is (x1, y1) in the takeoff phase and (x2, y2) in the return home phase, the home position can be re-calculated as (x2-x1, y2-y1) (ideally, (0,0)).
sent PR #46 implemented this algorithm.
First, the circle motion is finished, the UAV goes to the place where it started the circle motion by local control(referring to the target tree with vision). Next, using global control(its odometry), the UAV turns around 180 degrees. Finally, using global control, it returns home. Ideally, the global position of the home is (0, 0), but may be drifted. So, the global position of home should be re-calculated. Given that the global tree position is (x1, y1) in the takeoff phase and (x2, y2) in the return home phase, the home position can be re-calculated as (x2-x1, y2-y1) (ideally, (0,0)).
@chibi314 @tongtybj
https://drive.google.com/open?id=0B-G59LPGm9CKbmEySFo5R0ZPWlE
Here is a demo for simple object avoidance and going home. I found that when going home, if uav is not facing the obstalces, it will be possible to crash the obstacle without perception for feedback.
So I suggest we have more discussions on going home action.