Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: simple avoidance (i.e. stopping) should work in RTL, Auto, Guided, etc #5607

Open
rmackay9 opened this issue Jan 24, 2017 · 31 comments

Comments

@rmackay9
Copy link
Contributor

Copter's object avoidance only works in Loiter, Guided mode's velocity control and AltHold. We should extend it to work in more modes including RTL, Auto and Guided (Waypoint).

@zhjgod
Copy link

zhjgod commented Feb 15, 2017

When will the Auto mode use object avoidance?

@felipeviveiros
Copy link

news about Auto mode use object avoidance?

@lakshaydang
Copy link

Is object avoidance in auto mode is added with tera ranger tower?

@X1aero
Copy link

X1aero commented Oct 19, 2017

Object avoidance using two LW20 in auto mode would be awesome... Just sayin' : )

@charleslinquist
Copy link

I realize that no one will want to commit but...
Can anyone give me an idea of when Object Avoidance will be available in AUTO mode? If it won't be completed within the next 6 months, I'll continue working on a system that performs this function using a companion computer. But I certainly don't want to duplicate efforts.

@rmackay9
Copy link
Contributor Author

rmackay9 commented Feb 8, 2018

@charleslinquist, I'm pretty sure it'll be in within 6 months. It's not hard to make Auto mode stop before hitting things, the problem is avoid getting stuck behind things and resolving that problem requires "path planning" which is tough and could take more than 6 months. Still, I suspect we will push in the object avoidance in Auto (RTL, Guided, etc) as a first step.

@charleslinquist
Copy link

charleslinquist commented Feb 8, 2018

You might want to consider something that I was planning:
When an object is detected,

  1. brake hard (stop)
  2. move slowly to the right and upwards at a diagonal until the object is no longer detected.
  3. continue on the up-and-right trajectory for 5 seconds
  4. move toward the next waypoint slowly for 10 seconds.
  5. if an object is detected go back to step 2
  6. if no object is detected, resume mission.

Not a perfect solution, because it might take quite awhile to negotiate a mountain, but the method is unlikely to get stuck behind a building.

@rmackay9
Copy link
Contributor Author

rmackay9 commented Feb 8, 2018

@charleslinquist, txs for that!

@mshajeehm
Copy link

waiting impatiently for this feature to be commit by SOMEONE ...

@jihadrahmawan
Copy link

What is posible to read value sensor obstacle over mavlink? I'm connected sf40c to my pixhawk and i'll try to read that.. i'll make planing in my dronekit python for obstacle in guided gps waypoint mission..

@peterbarker
Copy link
Contributor

peterbarker commented Mar 1, 2018 via email

@kostkar
Copy link

kostkar commented Oct 31, 2018

The VFH or VFH* might be a good method if you have a waypoint target, in this method the vehicle would go to the direction closest to the intended direction of travel that is not obstructed.

Advantages:
-It can navigate a complex terrain.
-avoid moving obstacles.
-work in 2d and 3d implementations.
-work regardless of sensor (more resolution of sensor just allows for tighter histograms and smoother motion).
-Can support external input (ie NN Cameras, 1d-2d-3d Lidar, Depth Cameras)

Resources:
https://en.wikipedia.org/wiki/Vector_Field_Histogram
https://www.youtube.com/watch?v=T68MmIue0KI

@Brooce
Copy link

Brooce commented Dec 4, 2018

Hello everyone.

It's been some time since last statements here and I'd like to ask what's the expected date for releasing Object Avoidance in AUTO mode. Is anyone working on it?

We will need this feature in UAVs developed by my company and possibly I'd try to implement some solution. But I don't have experience in Ardupilot development so it will take lots of time - thus I wanted to know if it's worth doing on my own. Do we know anything about the progress (@rmackay9)?

@xfojta00
Copy link

Hi,
I'm in a similar situation like Brooce. We need object avoidance in Auto,RTL etc. modes. Is anybody working on this? Is it going to be released soon? We might want to add to the current development activities in this field if there are any.

@rmackay9
Copy link
Contributor Author

It's still on the to-do list but it's not be actively worked on right now... at least I'm not currently working on it. It's not terribly hard to make it kind-of-work. It is a matter of changing the AC_PosControl library so that the _vel_desired.x and _vel_desired.y are shortened using the AC_Avoid::adjust_velocity() function.

@Djmarck22
Copy link

It's still on the to-do list but it's not be actively worked on right now... at least I'm not currently working on it. It's not terribly hard to make it kind-of-work. It is a matter of changing the AC_PosControl library so that the _vel_desired.x and _vel_desired.y are shortened using the AC_Avoid::adjust_velocity() function.

Hi rmackay.... can I email you?

@rmackay9
Copy link
Contributor Author

rmackay9 commented Feb 4, 2019

@Djmarck22, sure, I'm rmackay9 at yahoo.com

@highfreq

This comment was marked as abuse.

@apryamostanov
Copy link

Dear Team,

Why not adding a Collision Failsafe?

Use case:

  • Terrain: mountains
  • Mode: Auto
  • Situation: user wrongly set the altitude and drone collides with the mountain

If Collision risk is detected, RTL/Smart RTL could have been triggered and avoided the collision.

@auturgy
Copy link
Contributor

auturgy commented Jun 10, 2019 via email

@rmackay9
Copy link
Contributor Author

@apryamostanov, yes, it's a good idea and I've been thinking about it as well. Some of it can be done before the mission is even run because we can calculate if a target waypoint is below the terrain at that point.

@apryamostanov
Copy link

@auturgy - thanks for info about terrain following.

@rmackay9 - thanks for the feedback!
The validation feature is nice! But probably more complex. It will probably require uploading of terrain data to vehicle (correct me if I'm wrong).

Are you seeing it as a pre-arm check, or it will reject uploaded mission?
Or Auto mode will not activate?

Thus the two features can be split: de-facto Failsafe and pre-validation check.

For my scenario it is more important in-flight feature (Failsafe):

  • I plan route at the spot, and in my setup GC is connected to Vehicle - and none of them have internet at the moment of mission upload.
  • Sometimes I fly in the desert with high dunes (even as high as 30 meters), but dunes change and thus there is no static altitude data available for desert.

@rmackay9
Copy link
Contributor Author

@apryamostanov, it might be a pre-arm check..

By the way, we do load terrain information onto the flight controller.. this allows performing terrain altitude missions without the user of a lidar..

In any case, I can't make any promises about when this will be implemented.. support for object avoidance in Auto, RTL etc should arrive with Copter-3.7 but I suspect terrain avoidance will be later.. perhaps Copter-3.8..

@apryamostanov
Copy link

Oh, that's great news about object avoidance in Copter 3.7.

That can suffice to my use case - the mountain is sheer, ~75 degrees angle - that's not normal terrain, rather an extremum/object.

Thank you very much!

@charleslinquist
Copy link

For those who are interested, I have a prototype that I'm testing. It uses a TEENSY3.5 and sits between the radio(s) and the telemetry port and uses an Ainstein US-D1 radar (~ 150' range with a 45 X 30 degree FOV). When an object is detected by the radar, The TEENSY changes the MODE, and then does its best to fly the craft around/over the obstacle and when the obstacle is no longer seen, goes back to the original mode (which was stored). It doesn't operate below 10M (as reported by the FC) to avoid ground reflections. A RTL or LAND command from the ground over-rides everything. I still have a lot of "fine tuning" to do but it is starting to work. It appears likely that I'll have a package to sell before Copter 3.7 - which may make my method obsolete, we will have to see.

@apryamostanov
Copy link

That's an excellent method, @charleslinquist . I was thinking of same thing.

@rmackay9
Copy link
Contributor Author

@apryamostanov, I've created a new issue here for the terrain based avoidance feature request.

@silegc-xguard
Copy link

Hi, I'm wondering since the issue is still open... Has object avoidance been implemented in Auto mode yet ? If not, do you have a workaround to make it kinda work ?

Thanks !

@rmackay9 rmackay9 changed the title Copter: object avoidance should work in RTL, Auto, Guided, etc Copter: simple object avoidance should work in RTL, Auto, Guided, etc Nov 5, 2021
@rmackay9 rmackay9 changed the title Copter: simple object avoidance should work in RTL, Auto, Guided, etc Copter: simple avoidance (i.e. stopping) should work in RTL, Auto, Guided, etc Nov 5, 2021
@rmackay9
Copy link
Contributor Author

rmackay9 commented Nov 5, 2021

@silegc-xguard,

Path planning works in autonomous modes but not "simple avoidance" which is stopping. There's some explanation here on the wiki https://ardupilot.org/copter/docs/common-object-avoidance-landing-page.html#avoidance-types

@silegc-xguard
Copy link

Oh ok I see. Do you know why it hasn't been enabled yet ? Is there some implications to it or is it just a bandwith issue ?

We're trying to do collision avoidance using an OAK-D camera on an autonomous multirotor. Since the path planning aspect of the project is scheduled for later, simple object avoidance (with maybe a call to RTL on obstacle detection) would be a good milestone for us. With some insight we might be able to add it/submit a PR for it.

@kaancevher
Copy link

  • Trrə.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests