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

Fix tf2_echo to tf_echo in readme & Add packages skip argument for cb #11

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ Zsh:
| Command | Alias | Arguments |
| --- | --- | --- |
| `ros2 run tf2_tools view_frames` | `view_frames` | namespace of TF topic [Optional] |
| `ros2 run tf2_ros tf2_echo` | `tf2_echo`| frame 1 [Required], frame 2 [Required], namespace of TF topic [Optional] |
| `ros2 run tf2_ros tf2_echo` | `tf_echo`| frame 1 [Required], frame 2 [Required], namespace of TF topic [Optional] |

## Colcon

| Command | Alias | Arguments |
| --- | --- | --- |
| `colcon build --symlink-install` | `cb` |
| `colcon build --symlink-install --packages-select` | `cbp`| package 1 [Optional] ... package n [Optional] |
| `colcon build --symlink-install --packages-skip` | `cbs`| package 1 [Optional] ... package n [Optional] |
| `colcon list` | `cl` |

## Rosdep
Expand Down
14 changes: 14 additions & 0 deletions ros2_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,20 @@ function cbp {
history -s $CMD
}

function cbs {
if [ $# -eq 0 ]; then
PACKAGE=$(colcon list -n | fzf)
[[ -z "$PACKAGE" ]] && return
local CMD="colcon build --symlink-install --packages-skip $PACKAGE"
else
local CMD="colcon build --symlink-install --packages-skip $@"
fi
echo $CMD
$CMD
history -s cbs $@
history -s $CMD
}

function cl {
CMD="colcon list -n"
echo $CMD
Expand Down
14 changes: 14 additions & 0 deletions ros2_utils.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,20 @@ function cbp {
print -s $CMD
}

function cbs {
if [ $# -eq 0 ]; then
PACKAGE=$(colcon list -n | fzf)
[[ -z "$PACKAGE" ]] && return
CMD="colcon build --symlink-install --packages-skip $PACKAGE"
else
CMD="colcon build --symlink-install --packages-skip $@"
fi
echo $CMD
eval $CMD
print -s cbs $@
print -s $CMD
}

function cl {
CMD=(colcon list -n)
echo $CMD
Expand Down