Skip to content

Commit

Permalink
[robot-demo-user] fix ROS in PS1
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Nov 14, 2023
1 parent 681fbd3 commit a2eb64e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions robot-demo-user/setup
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GIT_PS1_DESCRIBE_STYLE="branch"
GIT_PS1_SHOWUPSTREAM="auto git"

function _ROS_MASTER_NAME {
[[ "${TUE_ROS_VERSION}" -ne 1 ]] && return
# shellcheck disable=SC2001
ROS_MASTER=$(echo "$ROS_MASTER_URI" | sed 's#http://\(.*\):.*#\1#')
if [ "$ROS_MASTER" == "localhost" ] || [ "$ROBOT_REAL" == "true" ]; then
Expand All @@ -39,6 +40,7 @@ function _ROS_MASTER_NAME {
}

function _ROS2_DISCOVERY {
[[ "${TUE_ROS_VERSION}" -ne 2 ]] && return
# shellcheck disable=SC2153
local ros_domain_id=${ROS_DOMAIN_ID}
[[ -n "${ros_domain_id}" ]] || ros_domain_id=0 # default
Expand Down

0 comments on commit a2eb64e

Please sign in to comment.