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

Survey rectangle with "No Go" area #2490

Closed
wants to merge 4 commits into from
Closed

Survey rectangle with "No Go" area #2490

wants to merge 4 commits into from

Conversation

jburns11
Copy link
Contributor

Here is a first shot implementation at a rotorcraft rectangle survey with a user-defined no-go zone. The no go zone is defined with two way points (like the rectangle). The survey will map the whole area, while not considering this area in its survey. I have also attached an example flight plan to run with.

This is not fully complete, but is probably an experimental feature. The things that are left to do...
1. Assure that the no-go zone is not violated by the u-turns between runs (possibly by shrinking the valid survey size)
2. Assure that the no-go zone is not violated by the travel between partial surveys (possibly done by defining the navigation path between surveys.

@noether noether self-requested a review February 25, 2020 07:54
@noether
Copy link
Member

noether commented Feb 25, 2020

Great to see you again, and thanks for the PR.

I will review it in detail as soon as I can this week.

@jburns11
Copy link
Contributor Author

Great, thanks for the help!

In case it helps. This module uses 9 types of survey. 4 type for when the avoided rectangle is in one of the 4 corners. Another 4 types are used for when the avoided rectangle is against one of the 4 sides. The last type is when the avoided rectangle is completely contained by the surveyed rectangle.

Also, I am still working on the two features mentioned in my last comment.

@noether
Copy link
Member

noether commented Mar 4, 2020

Hi @jburns11 . Finally, I will have time this Friday afternoon to review the PR. Sorry for the delay :P.

@noether
Copy link
Member

noether commented Mar 6, 2020

@jburns11

I was going to fix/change the following but I think it might make sense to do it in this PR.

For the fixed-wing aircraft version of the dynamic survey, the variable sweep_var is in the basic nav{c,h} functions

https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/firmwares/fixedwing/nav.c#L57
https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/firmwares/fixedwing/nav.h#L110

Is there any particular reason why they are there and not here? (similarly as you did with the rotorcraft)
https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/modules/nav/nav_survey_polygon.c

That would imply to change the corresponding dl_setting in
https://github.com/paparazzi/paparazzi/blob/master/conf/modules/nav_basic_fw.xml#L24

to (if possible changing the word "distance" by another one with better meaning such as "width distance?")
https://github.com/paparazzi/paparazzi/blob/master/conf/modules/nav_survey_polygon.xml

@OpenUAS do you have any other comments maybe?
@jburns11 of course, thanks in advance for attending this request, it was my fault in your previous PR I did not notice it.

@OpenUAS
Copy link
Contributor

OpenUAS commented Mar 11, 2020

@noether Yes, that is basically it. Just FYI the redefined "sweep_var" was to much for me ;) in the process of recompiling ~80 fixedwing airframes my room turned orange from all the warnings ... And the all had maxed out flightplan with all survey thingies in it... for all airframes.

Have not intensively tested de sweep_var

Oh, yes the sweep_var naming is IMHO a not so handy name to be honest

maybe:
nav_adaptable_sweep
nav_adjustable_sweep
nav_alterable_sweep
nav_changeable_sweep
nav_mutable_sweep
nav_malleable_sweep
nav_modifiable_sweep
nav_pliable_sweep

@OpenUAS
Copy link
Contributor

OpenUAS commented Mar 11, 2020

To be honest, also the use case of those changes is a bit beyond me. For the first 3, could one not define another bounding box? For the last case maybe the same and use things like "!InsideSquare"

Just a quick and dirty examle I use once in a while:
...

<sector color="lightblue" name="Square" type="dynamic">
  <corner name="Q1"/>
  <corner name="Q2"/>
  <corner name="Q3"/>
  <corner name="Q4"/>
</sector>

...

<block name="Fly in Square">
  <exception cond="!InsideSquare(GetPosX(), GetPosY())" deroute="Come back wp 1"/>
  <attitude alt="GetAltRef()+75" roll="0" vmode="alt"/>
</block>
<block name="Come back wp 1">
  <exception cond="InsideSquare(GetPosX(), GetPosY())" deroute="Fly in Square"/>
  <go wp="1"/>
  <deroute block="Fly in Square"/>
</block>

@noether
Copy link
Member

noether commented Mar 15, 2020

@noether Yes, that is basically it. Just FYI the redefined "sweep_var" was to much for me ;) in the process of recompiling ~80 fixedwing airframes my room turned orange from all the warnings ... And the all had maxed out flightplan with all survey thingies in it... for all airframes.

Have not intensively tested de sweep_var

Oh, yes the sweep_var naming is IMHO a not so handy name to be honest

maybe:
nav_adaptable_sweep
nav_adjustable_sweep
nav_alterable_sweep
nav_changeable_sweep
nav_mutable_sweep
nav_malleable_sweep
nav_modifiable_sweep
nav_pliable_sweep

If we do not have news from @jburns11 , I will open a PR with the requested changes.
I am moving this month from Denmark to Spain, so it might take me a while, the situation is quite challenging now.

@gautierhattenberger
Copy link
Member

Please take into account #2504 if needed. Hopefully I didn't break more things...

@gautierhattenberger
Copy link
Member

Is this PR still relevant ? @jburns11

@jburns11
Copy link
Contributor Author

Is this PR still relevant ? @jburns11

Hey Gautier,

Sorry for the lack of updates to this! I would close this PR, as I haven't been able to work on it for quite some time!

My apologies!

@gautierhattenberger
Copy link
Member

ok, thanks, no worries

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

Successfully merging this pull request may close these issues.

None yet

4 participants