Developer Environment Tips&Tricks

Custom Aliases

Alias enables a replacement of a string by another. It is mainly used for abbreviating a system command, or for adding default arguments to a regularly used command. To create aliases you need to include them in your .bashrc located in your home directory.

.bashrc is the file executed when you open a terminal for text-based interaction with the system from the command line.

geany ~/.bashrc

Navigate down to the end and add these lines:

# Custom Aliases
alias up='cd ..'
alias up2='up && up'
alias up3='up2 && up'
alias up4='up3 && up'
alias cd_catkin='cd ~/catkin_ws'
alias killgazebo="killall -9 gazebo & killall -9 gzserver  & killall -9 gzclient"

Getting a bitbucket synced ros package as an eclipse project

  1. Create Bitbucket repository
  2. Clone the repository in eclipse
  3. initiate a catkin workspace at the same folder

PC Customization


source gotowork
source gotoworksrc
source gotoworkscripts
  • they had to be called via source or ‘.’. Otherwise, scripts created for goto will not work as it does change the directory in a sub-shell, not affecting the parent shell where the user is active.
  • To successfully execute those scripts, their virtual links should have been generated, and the original scripts should have been given +x access.

ROS Across Multiple Machines

on Windows (Guest machine, Installed on VMPlayer as kfuVLaptop):

call C:\opt\ros\hydro\x86\setup.bat

On Linux (Host machine as kfuLaptop):

export ROS_MASTER_URI=http://kfuVLaptop:11311

Example in win machine (In three shells):

call C:\opt\ros\hydro\x86\setup.bat

call C:\opt\ros\hydro\x86\setup.bat
roslaunch msvc_runtime talker.launch

call C:\opt\ros\hydro\x86\setup.bat
roslaunch msvc_runtime listener.launch

Create Catkin Workspace

Navigate to a folder where you want to create the catkin workspace, e.g. home

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
cd ~/catkin_ws/
source devel/setup.bash

Create Eclipse Project ( Resource )

run the following command under <catkin_ws/build/hello_world>

cmake ../../src// -DCMAKE_INSTALL_PREFIX=../../install -DCATKIN_DEVEL_PREFIX=../../devel -G"Eclipse CDT4 - Unix Makefiles"

Create Catkin ROS Package

this assumes that catkin workspace is ~/catkin_ws

cd ~/catkin_ws/src
catkin_create_pkg  [depend1] [depend2] [depend3]
cd ~/catkin_ws
. ~/catkin_ws/devel/setup.bash

New Topic


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s