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

fixing path in granite #149

Merged
merged 4 commits into from
Feb 28, 2024
Merged

Conversation

marinagmoreira
Copy link
Member

These paths were not compatible with the real robots, fixing it

Copy link
Contributor

@trey0 trey0 left a comment

Choose a reason for hiding this comment

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

Thanks for working this! I raised some concerns where I'm not sure if they are real problems but generally this looks great! (Sorry it took me a while to get to the review.)

exit_code = first_non_zero(exit_code, cexec.change_exposure(exposure_value))
exit_code = first_non_zero(
exit_code, self.command_executor.change_exposure(exposure_value)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I had intentionally made this change to create a new CommandExecutor every time because I ran into trouble with another action that reused a CommandExecutor and I thought the problem might have to do with the CommandExecutor having been left in an inconsistent state somehow such that it failed on the second pass.

The logic of CommandExecutor state is hard enough to follow that I felt more confident discarding the old one and creating a new one every time. Is there a significant resource concern with doing it that way? (I think it's generally a good idea in terms of isolation.)

I also want to point out that this code is probably not getting tested unless you are really going out of your way to do that (running multi-module scenarios), so we don't really know if either the old or the new version is working.

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting. If there is a bug regarding that, we should focus on fixing the bug instead.
Creating a CommandExecutor instance takes something like 3 seconds because it has to publish and wait for subscribers. It seems like bad practice introducing a lag this big 3 times in a row xD

@@ -120,15 +120,15 @@ def get_ops_plan_path():
# Check if the environment variable $ASTROBEE_OPS exists
astrobee_ops_path = os.getenv("ASTROBEE_OPS")
if astrobee_ops_path:
return os.path.join(astrobee_ops_path, "gds/plans")
return os.path.join(astrobee_ops_path, "dock_scripts/hsc/gds/plans")
Copy link
Contributor

Choose a reason for hiding this comment

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

Obviously it's critical for this to work on the real robot, but I hope it can work in multi-robot software sim as well. Did you check it to see if the instructions here still work?

This looks like it may be depending on an environment variable $ASTROBEE_OPS. If so, the sim instructions should probably be updated to explain how to set that. (Note that the $OPS_REPO variable name wasn't something I made up but rather comes from older wiki instructions.

Note: I'm not saying this is broken, I just haven't had a chance to test it yet and want to make sure the issue is on your radar. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it still works because there are symlinks inside the ops repo. So doing gds/plans is the same as dock_scripts/hsc/gds/plans, but to the robot, we only copy the folder dock_scripts/hsc/

Copy link
Member Author

Choose a reason for hiding this comment

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

regarding the env variable name, that's only used if you want to overwrite the usual path. If you have GDS installed, that's used if no OPS_REPO defined

@marinagmoreira marinagmoreira merged commit eb235f8 into nasa:develop Feb 28, 2024
4 checks passed
@marinagmoreira marinagmoreira deleted the fix_paths_granite branch February 28, 2024 00:18
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.

3 participants