-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy ros.env if for some reason don't exist
- Loading branch information
Showing
5 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export ROS_DOMAIN_ID=0 | ||
export ROS_LOCALHOST_ONLY=0 | ||
unset ROS_NAMESPACE | ||
unset CYCLONEDDS_URI | ||
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp | ||
export FASTRTPS_DEFAULT_PROFILES_FILE=/var/snap/rosbot-xl/common/udp.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
#!/bin/bash -e | ||
|
||
source $SNAP_COMMON/ros.env | ||
source $SNAP/usr/bin/utils.sh | ||
|
||
exec $@ | ||
# Path to the ros.env file | ||
ROS_ENV_FILE="$SNAP_COMMON/ros.env" | ||
|
||
# Check if the ros.env file exists | ||
if [[ ! -f "$ROS_ENV_FILE" ]]; then | ||
log "Copying ros.env file to $SNAP_COMMON" | ||
cp -r ${SNAP}/usr/share/${SNAP_NAME}/config/ros.env ${SNAP_COMMON}/ | ||
fi | ||
|
||
# Source the ros.env file | ||
source "$ROS_ENV_FILE" | ||
|
||
# Execute the passed command | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters