rosflight / rosplane

Fixed-wing autopilot for ROSflight
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

46 seeding estimator #60

Closed iandareid closed 1 week ago

iandareid commented 1 week ago

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.

iandareid commented 1 week ago

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.

iandareid commented 1 week ago

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

iandareid commented 1 week ago

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?

JMoore5353 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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?