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/new prefix #8

Open
wants to merge 2 commits into
base: noetic-devel
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion snap/local/core_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ TURTLEBOT3_MODEL="$(snapctl get turtlebot3-model)"
export LDS_MODEL
export TURTLEBOT3_MODEL

${SNAP}/opt/ros/noetic/bin/roslaunch turtlebot3c_bringup turtlebot3c_bringup.launch simulation:=$SIMULATION
${SNAP}/roslaunch turtlebot3c_bringup turtlebot3c_bringup.launch simulation:=$SIMULATION
Copy link
Collaborator

Choose a reason for hiding this comment

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

You shouldn't even need the $SNAP/ prefix in these script.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So I tested since I thought I remembered something weird, and indeed there is something. While here in the core_launcher.sh I could remove the $SNAP it's not the case of all the scripts. The scripts mux_select_* in the command chain, when I remove the $SNAP prefix I get:

/snap/turtlebot3c/x2/usr/bin/mux_select_key_vel.sh: line 2: opt/ros/noetic/bin/rosservice: No s
uch file or directory

I am not sure if this is a bug. I am concerned that it might be confusing for users. I would prefer to keep the "$SNAP" in anything that is outside the snapcraft.yaml before we know more if it's a bug or not.


2 changes: 1 addition & 1 deletion snap/local/mapping_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ TURTLEBOT3_MODEL="$(snapctl get turtlebot3-model)"

export TURTLEBOT3_MODEL

${SNAP}/opt/ros/noetic/bin/roslaunch turtlebot3c_2dnav turtlebot3c_mapping.launch
${SNAP}/roslaunch turtlebot3c_2dnav turtlebot3c_mapping.launch

2 changes: 1 addition & 1 deletion snap/local/navigation_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TURTLEBOT3_MODEL="$(snapctl get turtlebot3-model)"
export TURTLEBOT3_MODEL

if [ -f "${SNAP_USER_COMMON}/map/current_map.yaml" ]; then
${SNAP}/opt/ros/noetic/bin/roslaunch turtlebot3c_2dnav turtlebot3c_navigation.launch
${SNAP}/roslaunch turtlebot3c_2dnav turtlebot3c_navigation.launch
else
>&2 echo "File ${SNAP_USER_COMMON}/map/current_map.yaml does not exist." \
"Have you run the mapping application?"
Expand Down
2 changes: 1 addition & 1 deletion snap/local/save_map.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# make map directory if not existing
mkdir -p ${SNAP_USER_COMMON}/map

$SNAP/opt/ros/noetic/bin/rosrun map_server map_saver -f "${SNAP_USER_COMMON}/map/new_map"
$SNAP/rosrun map_server map_saver -f "${SNAP_USER_COMMON}/map/new_map"

6 changes: 3 additions & 3 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,23 @@ apps:
environment:
ROS_HOME: $SNAP_USER_DATA/ros
command-chain: [usr/bin/ros_network.sh]
command: opt/ros/noetic/bin/roslaunch turtlebot3c_teleop turtlebot3c_teleop.launch
command: roslaunch turtlebot3c_teleop turtlebot3c_teleop.launch
plugs: [network, network-bind]
extensions: [ros1-noetic]

key:
environment:
ROS_HOME: $SNAP_USER_DATA/ros
command-chain: [usr/bin/ros_network.sh, usr/bin/mux_select_key_vel.sh]
command: opt/ros/noetic/bin/roslaunch turtlebot3c_teleop key.launch
command: roslaunch turtlebot3c_teleop key.launch
plugs: [network, network-bind]
extensions: [ros1-noetic]

joy:
environment:
ROS_HOME: $SNAP_USER_DATA/ros
command-chain: [usr/bin/ros_network.sh, usr/bin/mux_select_joy_vel.sh]
command: opt/ros/noetic/bin/roslaunch turtlebot3c_teleop joy.launch
command: roslaunch turtlebot3c_teleop joy.launch
plugs: [network, network-bind, joystick]
extensions: [ros1-noetic]

Expand Down