Skip to content

Commit

Permalink
Merge pull request #11 from mini-1235/main
Browse files Browse the repository at this point in the history
Fix tf2_echo to tf_echo in readme & Add packages skip argument for cb
  • Loading branch information
tonynajjar authored Jan 21, 2025
2 parents 7a73faa + adf109a commit 30a88b7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
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

0 comments on commit 30a88b7

Please sign in to comment.