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

46 seeding estimator #60

Merged
merged 6 commits into from
Jun 26, 2024
Merged

46 seeding estimator #60

merged 6 commits into from
Jun 26, 2024

Conversation

iandareid
Copy link
Collaborator

The estimator now saves the calibration of each of the initialization for lat, lon, alt and baro reading in the parameters file. You can now pass an argument to the estimator node individually or the launch file as a whole, that will allow you to boot using the saved initialization rather than calibrating again.

These parameters are not used in this commit, only saved.
You can now override the calibration for GPS and baro with whatever
value is in the parameters. The parameters are update on every
calibration that does occur. This means that in flight you can
immeadiatley restart as long as the seed_estimator flag is passed to the
launch or run command.
@iandareid iandareid self-assigned this Jun 25, 2024
@iandareid iandareid linked an issue Jun 25, 2024 that may be closed by this pull request
@iandareid iandareid added the enhancement New feature or request label Jun 25, 2024
@iandareid
Copy link
Collaborator Author

So essentially if the estimator crashes, your you need to restart it you can simply do ros2 run rosplane rosplane_estimator_node true and it will start it from saved params. In the case from launch, you can do ros2 launch rosplane rosplane.launch.py seed_estimator:=true. Either would work, and if the estimator crashes it may be better to restart all of rosplane anyway.

Copy link
Contributor

@JMoore5353 JMoore5353 left a comment

Choose a reason for hiding this comment

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

Will this work with symlink-ed parameter files?

@iandareid
Copy link
Collaborator Author

iandareid commented Jun 25, 2024

It does! Actually it may only work for symlink files...

@iandareid
Copy link
Collaborator Author

iandareid commented Jun 25, 2024

To be fair, I think we should transition to have everyone by default use symlink installation. It is better in every way (I think).

@JMoore5353 @bsutherland333 is this a bad idea?

@iandareid iandareid requested a review from JMoore5353 June 25, 2024 23:21
@JMoore5353
Copy link
Contributor

JMoore5353 commented Jun 26, 2024

It also works without it being symlinked installed (I just tested it). However, you won't see the saved parameters in the rosflight_ws. You have to go to the share folder to find the actual param file that gets loaded.

symlink-install is a good thing to do, but I don't think we can rely on everyone having done it. That means we should just put in the documentation somewhere that a user should go to the share folder to find the saved params if he/she didn't symlink install.

@bsutherland333
Copy link
Collaborator

Something we also want to keep in mind is if we ever publish binaries of ROSplane, then I don't think they'll be installing the source files at all, only the install folder. So if it doesn't work on a non-symlink build, then that would be a problem.

@iandareid
Copy link
Collaborator Author

I hadn't even thought of the binaries. I think we should start testing ROSplane for that soonish. Any Idea on how that is done typically @bsutherland333?

@iandareid iandareid requested a review from JMoore5353 June 26, 2024 22:11
@iandareid
Copy link
Collaborator Author

Something we also want to keep in mind is if we ever publish binaries of ROSplane, then I don't think they'll be installing the source files at all, only the install folder. So if it doesn't work on a non-symlink build, then that would be a problem.

Since it does work for non-symlinked files, we should be fine correct? Obviously we will have to check, but it should, right?

@iandareid iandareid merged commit a00e15d into main Jun 26, 2024
2 checks passed
@iandareid iandareid deleted the 46-seeding-estimator branch June 26, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Seeding Estimator for better restart in air.
3 participants