Getting error while using cmake command?
I created rosbuild workspace (mywork) and a package (test) within it.
I was trying to build the package using cmake command
[rosbuild] Building package test
[rosbuild] Error from directory check: /opt/ros/groovy/share/ros/core/rosbuild/bin/check_same_directories.py /home/admin-pc/mywork/test
1
Traceback (most recent call last):
File "/opt/ros/groovy/share/ros/core/rosbuild/bin/check_same_directories.py", line 46, in <module>
raise Exception
Exception
CMake Error at /opt/ros/groovy/share/ros/core/rosbuild/private.cmake:102 (message):
[rosbuild] rospack found package "test" at "", but the current directory is
"/home/admin-pc/mywork/test". You should double-check your
ROS_PACKAGE_PATH to ensure that packages are found in the correct
precedence order.
Call Stack (most recent call first):
/opt/ros/groovy/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location)
CMakeLists.txt:12 (rosbuild_init)
-- Configuring incomplete, errors occurred!
With multiple hit and trial I found the solution that is to use command
source ~/mywork/setup.bash
but I need to use this in every new terminal. Please tell the solution.