Skip to content

Commit

Permalink
Enable packages names as arguments to rosd command
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Jun 27, 2024
1 parent 3a36fe6 commit c139288
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions scripts/_RosTeamWs_Defines.bash
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,10 @@ function RosTeamWS_setup_exports {
# TODO(denis): add this into setup.bash
function RosTeamWS_setup_aliases {

# ROS
alias rosd="cd \$ROS_WS"
# ROS
alias rosds="cd \$ROS_WS/src"
alias rosdb="cd \$ROS_WS/build"
alias rosdi="cd \$ROS_WS/install"

}

function RosTeamWS_setup_ros1_exports {
Expand All @@ -143,6 +141,7 @@ export ROSCONSOLE_CONFIG_FILE='~/workspace/ros_ws/rosconsole.config'
function RosTeamWS_setup_ros1_aliases {

# ROS
alias rosd="rtw_ros_cd"
alias rosdd="cd \$ROS_WS/devel"

# Catkin
Expand All @@ -160,7 +159,7 @@ function RosTeamWS_setup_ros2_exports {
function RosTeamWS_setup_ros2_aliases {

# ROS
alias rosdi="cd \$ROS_WS/install"
alias rosd="rtw_ros2_cd"

# COLCON
alias cb="colcon_build"
Expand All @@ -181,6 +180,22 @@ function RosTeamWS_setup_ros2_aliases {
alias crm="colcon_remove"
}

function rtw_ros_cd {
if [ -z "$1" ]; then
cd $ROS_WS
else
roscd $1
fi
}

function rtw_ros2_cd {
if [ -z "$1" ]; then
cd $ROS_WS
else
colcon_cd $1
fi
}


## some colcon helpers
function colcon_helper_ros2 {
Expand Down

0 comments on commit c139288

Please sign in to comment.