While I am reading different tutorials to create multiple workspaces, I notice that there are 2 ways to do it, either by catkin build or catkin_make.
By using catkin build, the procedures to create a workspace is:
$source /opt/ros/indigo/setup.bash
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
$ cd ~/catkin_ws/
$ catkin build
$ source devel/setup.bash
$ echo $ROS_PACKAGE_PATH
> /opt/ros/indigo/share:/opt/ros/indigo/stacks
By using catkin_make, the procedure looks similar:
$ source /opt/ros/indigo/setup.bash
$ mkdir -p ~/catkin_ws2/src
$ cd ~/catkin_ws2/
$ catkin_make
$ source devel/setup.bash
$ echo $ROS_PACKAGE_PATH
> /home/username/catkin_ws2/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
I used above 2 methods to create 2 workspace: catkin_ws and catkin_ws2 independently. Then I check if the environment has been sourced correctly. The 1st workspace has not been sourced correctly while 2nd workspace has been sourced correctly. I would like to know where am I wrong and how to fix it.
Originally posted by garygao92 on ROS Answers with karma: 17 on 2017-07-03
Post score: 1