Along the same lines:

alias rpf='rospack find'
alias rpd='rospack depends'
alias rpd1='rospack depends1'
alias rpdo='rospack depends-on'
alias rpdo1='rospack depends-on1'

function rbp
{
    rosparam set /use_sim_time true
    rosbag play --clock $*
}

function rdw
{
    rospack depends-why --target=$2 $1
}


# Grep ros parameters
function rpgr
{
    rosparam dump -v /dev/null | grep $1
}

# Make everything needed for a launch file
alias rld=roslaunch-deps
function rmd
{
    rosmake `rld $1`
}
alias rtgr='rostopic list | grep'
alias rngr='rosnode list | grep'

# Print next message on topic
alias rten='rostopic echo -n 1'

# Bring up node with the arguments it would have been given in this launch file
function rln
{
    roslaunch --args $2 $1 | bash
}

function rpclear
{
    for x in `rosparam list`
    do
        rosparam delete $x
    done
}

function rpg
{
    for p in `rosparam list`
    do
    echo -n "$p "
    echo `rosparam get $p`
    done
}

# Go to a directory, do something, and come back when done
function withd
{
    remaining=`echo $* | sed -e 's/^[^[:blank:]]*[[:blank:]]*\(.*\)$/\1/'`;
    pushd $1 && $remaining;
    popd;
}

# like withd for roscd, e.g., '$ roswd other_package make'
function roswd
{
    remaining=`echo $* | sed -e 's/^[^[:blank:]]*[[:blank:]]*\(.*\)$/\1/'`;
    rospd $1 && $remaining;
    popd;
}

- Bhaskara


On Fri, Mar 11, 2011 at 1:39 PM, Stuart Glaser <sglaser@willowgarage.com> wrote:
Here's a couple of shortcuts that I use:

For quickly finding topics:

alias gtopic='rostopic list | sort -u | grep'


A couple of image_view shortcuts:

imview () { rosrun image_view image_view image:=$1 }
dispview () { rosrun image_view disparity_view image:=$1 }




So I can easily source the same setup.bash when I open new terminals:


abspath()  # Doesn't follow symlinks
{
   echo $(cd $(dirname $1); pwd)/$(basename $1)
}
# Sets a persistant source target
#function
rs() {
 STORAGE=$HOME/.ros_default_source

 if [ -z "$1" ]; then
   if [ ! -e $STORAGE ]; then
     echo "No .rd"
   else
     PREVIOUS=$(cat $STORAGE)

     echo "Sourcing $PREVIOUS"
     source $PREVIOUS
   fi

 else
   RESOLVED=`abspath $1`
   echo "Sourcing $RESOLVED"
   source $RESOLVED

   echo "Saving new source default: $RESOLVED"
   echo "$RESOLVED" > $STORAGE
 fi
}


And finally, my personal favorites (non-ROS):

alias up='cd ..'
alias upp='cd ../..'
alias uppp='cd ../../..'
alias upppp='cd ../../../..'


--
Stuart Glaser
sglaser -at- willowgarage -dot- com
www.willowgarage.com
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users



--
Bhaskara Marthi
Research Scientist
Willow Garage Inc.
650-475-2856