Conversation
Signed-off-by: sunrisepeak <speakshen@163.com>
Signed-off-by: sunrisepeak <speakshen@163.com>
- ament/ament_package#164 - ros2#326 Signed-off-by: sunrisepeak <speakshen@163.com>
- ament/ament_package#164 - ros2#326 Signed-off-by: sunrisepeak <speakshen@163.com>
Test on Ubuntu24.4 (jazzy)Test (test_fish_support.sh)#!/bin/bash
set -e
# Test Repo Path
# - $1: ament_package
# - $2: ros2cli
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <ament_package_repo> <ros2cli_repo>"
exit 1
fi
AP=$1/ament_package
RC=$2/ros2cli
ROSD=jazzy
echo rosd: $ROSD
echo ament_packge: $AP
echo ros2cli: $RC
echo ---
AP=$1/ament_package
RC=$2/ros2cli
# install prefix-level files
sudo cp $AP/template/prefix_level/setup.fish /opt/ros/$ROSD/setup.fish
sed -e "s|@CMAKE_INSTALL_PREFIX@|/opt/ros/$ROSD|g" \
-e 's|@ament_package_PYTHON_EXECUTABLE@|/usr/bin/python3|g' \
$AP/template/prefix_level/local_setup.fish.in | sudo tee /opt/ros/$ROSD/local_setup.fish > /dev/null
sudo cp $AP/template/prefix_level/_local_setup_util.py /opt/ros/$ROSD/_local_setup_util.py
# install ros2cli fish complete
sudo cp $RC/completion/ros2-argcomplete.fish /opt/ros/$ROSD/share/ros2cli/environment/ros2-argcomplete.fish
grep -q 'argcomplete.fish' /opt/ros/$ROSD/share/ros2cli/package.dsv || \
echo 'source;share/ros2cli/environment/ros2-argcomplete.fish' | sudo tee -a /opt/ros/$ROSD/share/ros2cli/package.dsv > /dev/null
# test
fish -c "
source /opt/ros/$ROSD/setup.fish
echo \"ROS_DISTRO = \$ROS_DISTRO\"
ros2 -h
functions -q __fish_ros2_complete; and echo \"ros2 completion: OK\"
"Use in fish shellOutput |
Signed-off-by: sunrisepeak <speakshen@163.com>
Signed-off-by: sunrisepeak <speakshen@163.com>
|
pr ready
|
|
@skyegalaxy tagging you for a review on this one, as I can't seem to assign it to you. |
@asymingt I don't seem to have write access or merge capabilities to the ament repo |
|
@Sunrisepeak - I ran your branch locally and the generation of package level |
Q1: I would expect that by switching my rolling workspace's ament_package to this branch, that I would see a top level install/setup.fish inside my workspace's install folder, but that doesn't seem to be the case
Q2: a bit confused - manually add the
for support shell(fish), it isnt same mechanism for workspace level and top level similar (setup.bash):
pls free talk with me, if I have any mistake for setup mechanism |
|
If you want test in workspace, you can install colcon-fish
|
understood, thank you for clarifying! |
skyegalaxy
left a comment
There was a problem hiding this comment.
I tested the changes in this repo and ros2cli as well as colcon-fish and everything seems to be working! I played around with the cli a bit as well and I'm really happy with the fish tab complete for ROS topics.
|
Pulls: #164, ros2/ros2cli#1211 |
|
@skyegalaxy the ci-unstable seem not related with the pr, Does it need to be rerun? |
agreed, seems like a bunch of unrelated failures (not atypical for rolling). @asymingt - I can merge the ros2/ros2cli#1211 PR, but my approval here has no effect since I have no write access to the ament repo. |
No description provided.