-
Notifications
You must be signed in to change notification settings - Fork 1
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
Replicate pbcmd #24
Replicate pbcmd #24
Conversation
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Also todo (in buoy_sim osrf/mbari_wec_gz#85):
|
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
pbcmd/scripts/install_aliases.sh
Outdated
ln -sf $SCRIPT_DIR/pbcmd $ALIAS_INSTALL_DIR/tf_SetStateMachine | ||
ln -sf $SCRIPT_DIR/pbcmd $ALIAS_INSTALL_DIR/tf_SetCurrLim | ||
ln -sf $SCRIPT_DIR/pbcmd $ALIAS_INSTALL_DIR/tf_WatchDog | ||
ln -sf $SCRIPT_DIR/pbcmd $ALIAS_INSTALL_DIR/tf_Reset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to automate this?
for directory in $ALIAS_INSTALL_DIR; do
ln -sf $SCRIPT_DIR/pbcmd $ALIAS_INSTALL_DIR/$directory
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why this shouldn't be installed with the package itself instead of running the script manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if everybody wanted to install it. And I wasn't sure about having a sudo
blocking the build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could have a flag to integrate this. Hmm, I'm not sure about the sudo
too.
@mjcarroll thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~/.local/bin
doesn't exist by default, but if you create the directory, it will be added to $PATH
automatically in Ubuntu. So, the install script could create the directory, and then create the symlinks locally so it wouldn't require sudo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the latest commit... I believe I did it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Tested, works out of the box. But system doesn't recognize pbcmd
directly, had to use .local/bin/pbcmd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try in a new terminal.
$ echo $PATH
Should also show ~/.local/bin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, source ~/.profile
should update $PATH
to include ~/.local/bin
after the folder is created buy the install script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool tool, tried them all, works for me! Good to go after comments on installation.
Signed-off-by: Michael Anderson <[email protected]>
The physical buoy has a cli called
pbcmd
with several aliases for commands:available commands aliases for
pbcmd
(help message):For the Sim, only a few of these are implemented:
aliases TODO:
Usage:
As part of the build, the post-install step will run the alias installer and install aliases to
~/.local/bin
To test:
Build and source the workspace and run the sim, then inspect
~/.local/bin
to see symlinks installed.In a new terminal, source the workspace and try running commands:
should print the available commands like above.
try other commands like:
should print
valve
usagemissing args should print something like
and using the command properly:
should run the valve in the sim for 10 seconds and:
should turn it off
commands that aren't implemented should let the user know: