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

ACU Sun Avoidance #559

Merged
merged 21 commits into from
Nov 7, 2023
Merged

ACU Sun Avoidance #559

merged 21 commits into from
Nov 7, 2023

Conversation

mhasself
Copy link
Member

@mhasself mhasself commented Nov 1, 2023

Description

The ACU Agent monitors and reports the Sun position. If active_avoidance is enabled, it will reject non-Sun-safe moves, and even slew to safe position if idle and the Sun gets too close. "Too close" is controllable, to some extent, through command line args.

Note this currently the changes from #554.

Motivation and Context

SATPs do not have built-in Sun Avoidance. But we might run this on the LAT too, to have more fine-grained / easily configurable control.

How Has This Been Tested?

I developed this on SATP2, and ran through a number of different situations.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mhasself
Copy link
Member Author

mhasself commented Nov 1, 2023

The ocs-web widget, coming soon, will look something like this:
image

@BrianJKoopman
Copy link
Member

Now that #554 is merged, I think a rebase would be good here. (This'll test whether I lose the couple of comments I have pending too...)

@mhasself
Copy link
Member Author

mhasself commented Nov 3, 2023

Now that #554 is merged, I think a rebase would be good here. (This'll test whether I lose the couple of comments I have pending too...)

Yup, will do ... also one more commit coming...

Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the caveat that I don't really have a setup to test this in, this is looking good. One thing I would love to see (though let me know if it's going to hold this up) is some fixed time (i.e. repeatable) examples via some unit tests of the avoidance.py module.

Other requests are mostly documentation related below.

socs/agents/acu/avoidance.py Outdated Show resolved Hide resolved
socs/agents/acu/avoidance.py Outdated Show resolved Hide resolved
socs/agents/acu/avoidance.py Show resolved Hide resolved
socs/agents/acu/agent.py Outdated Show resolved Hide resolved
socs/agents/acu/agent.py Outdated Show resolved Hide resolved
socs/agents/acu/agent.py Outdated Show resolved Hide resolved
@mhasself
Copy link
Member Author

mhasself commented Nov 6, 2023

With the caveat that I don't really have a setup to test this in, this is looking good. One thing I would love to see (though let me know if it's going to hold this up) is some fixed time (i.e. repeatable) examples via some unit tests of the avoidance.py module.

Other requests are mostly documentation related below.

Thanks -- I think I've dealt with that all.

I actually did have slightly better docs, and some tests, but somehow omitted those commits on my initial PR. But I took another pass at it in any case.

@BrianJKoopman BrianJKoopman self-requested a review November 6, 2023 19:52
Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for adding the tests and updating the docs! Two small docs formatting suggestions, but otherwise this is ready to go.

I pushed a commit (330be86) that includes the new dependencies in the build process and documents how to install them as well.

socs/agents/acu/agent.py Outdated Show resolved Hide resolved
socs/agents/acu/avoidance.py Outdated Show resolved Hide resolved
@mhasself
Copy link
Member Author

mhasself commented Nov 7, 2023

Definitely squash this if you want ... lots of commits, mostly noise ...

@BrianJKoopman BrianJKoopman merged commit c4fe959 into main Nov 7, 2023
7 checks passed
@BrianJKoopman BrianJKoopman deleted the acu-sunvoidance branch November 7, 2023 16:54
hnakata-JP pushed a commit that referenced this pull request Apr 12, 2024
* ACU: sun avoidance

* ACU sun: update .sun in the process

* ACU sun: working non-blocking state machine to seek safety

Can be triggered for testing.  Needs logging and a bit more
safetyizing.

* ACU sun: faster sun map computation

* ACU sun: capacity to time-shift the Sun's position, for testing

Also ability to temporarily disable the feature.

* ACU sun: generate_scan checks traj before starting

Also the safe position seek clears faults.

* ACU sun: create Task to handle seek_to_sunsafe

* ACU sun: consolidate SunTracker code and organize policy

* ACU sun: more clean up; catch edge cases

* ACU sun: args, more

* ACU sun: consistencyize, reterminologize.

* ACU sun: one more tweak to escape path computation

* ACU sun: monitor_sun session.data + docs

* ACU sun: fix direct path bug; remove "escape=True" switch

* ACU sun: generate_scan initial seek must be sun-safe too!

* ACU: fix bug where empty blocks were pushed to feed

This wasn't causing any trouble other than lots of log messages in
influxpublisher.

* ACU sun: docs and requirements

* ACU sun: add tests, cleanup

* ACU sunvoidance: more docs cleanup

* ACU sun: Add new dependencies to setup.py

* ACU sunvoidance: couple more docs fixes

---------

Co-authored-by: Brian Koopman <[email protected]>
BrianJKoopman added a commit that referenced this pull request May 8, 2024
* ACU: sun avoidance

* ACU sun: update .sun in the process

* ACU sun: working non-blocking state machine to seek safety

Can be triggered for testing.  Needs logging and a bit more
safetyizing.

* ACU sun: faster sun map computation

* ACU sun: capacity to time-shift the Sun's position, for testing

Also ability to temporarily disable the feature.

* ACU sun: generate_scan checks traj before starting

Also the safe position seek clears faults.

* ACU sun: create Task to handle seek_to_sunsafe

* ACU sun: consolidate SunTracker code and organize policy

* ACU sun: more clean up; catch edge cases

* ACU sun: args, more

* ACU sun: consistencyize, reterminologize.

* ACU sun: one more tweak to escape path computation

* ACU sun: monitor_sun session.data + docs

* ACU sun: fix direct path bug; remove "escape=True" switch

* ACU sun: generate_scan initial seek must be sun-safe too!

* ACU: fix bug where empty blocks were pushed to feed

This wasn't causing any trouble other than lots of log messages in
influxpublisher.

* ACU sun: docs and requirements

* ACU sun: add tests, cleanup

* ACU sunvoidance: more docs cleanup

* ACU sun: Add new dependencies to setup.py

* ACU sunvoidance: couple more docs fixes

---------

Co-authored-by: Brian Koopman <[email protected]>
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.

2 participants