Ask Your Question
0

catkin_make fail : must be invoked in the root of workspace

asked 2017-01-25 08:28:10 -0600

sophie.shin gravatar image

updated 2017-01-25 08:47:09 -0600

Please... Please help.

I am trying to use rplidar, but I have this error below......... I checked the tutorial again and again but I really don't know how to fix this.. Please help me.

ubuntu@ubuntu:~/catkin_ws$ cd ~/catkin_ws/src

ubuntu@ubuntu:~/catkin_ws/src$ git clone https://github.com/robopeak/rplidar_ros
fatal: destination path 'rplidar_ros' already exists and is not an empty directory.

ubuntu@ubuntu:~/catkin_ws/src$ ls ~/catkin_ws/src
CMakeLists.txt  beginner_tutorials  elp_stereo_camera  rplidar_ros

ubuntu@ubuntu:~/catkin_ws/src$ ls ~/catkin_ws/src/rplidar_ros
CHANGELOG.rst  CMakeLists.txt  LICENSE  README.md  launch  package.xml  rplidar_A1.png  rplidar_A2.png  rviz  scripts  sdk  src

ubuntu@ubuntu:~/catkin_ws/src$ cd ~/catkin_ws

ubuntu@ubuntu:~/catkin_ws$ catkin_make rplidarNode
Base path: /home/ubuntu/catkin_ws
Source space: /home/ubuntu/catkin_ws/src
The specified base path "/home/ubuntu/catkin_ws" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace

After I input

 ls -al /home/ubuntu/catkin_ws

I got below!

ubuntu@ubuntu:~/catkin_ws$ ls -al /home/ubuntu/catkin_ws
total 24
drwxrwxr-x  5 ubuntu ubuntu 4096 Jan 25 15:04 .
drwxr-xr-x 22 ubuntu ubuntu 4096 Jan 25 23:16 ..
-rw-rw-r--  1 ubuntu ubuntu   98 Jan 24 13:34 .catkin_workspace
lrwxrwxrwx  1 ubuntu ubuntu   49 Jan 25 15:04 CMakeLists.txt -> /opt/ros/indigo/share/catkin/cmake/toplevel.cmake
drwxrwxr-x  9 ubuntu ubuntu 4096 Jan 24 17:54 build
drwxrwxr-x  4 ubuntu ubuntu 4096 Jan 24 17:54 devel
drwxrwxr-x  5 ubuntu ubuntu 4096 Jan 25 15:39 src
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
8

answered 2017-01-25 08:33:03 -0600

gvdhoorn gravatar image

updated 2017-01-25 09:02:51 -0600

ubuntu@ubuntu:~/catkin_ws$ catkin_make rplidarNode
Base path: /home/ubuntu/catkin_ws
Source space: /home/ubuntu/catkin_ws/src
The specified base path "/home/ubuntu/catkin_ws" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace

There is probably a CMakeLists.txt in /home/ubuntu/catkin_ws. There shouldn't be.

Can you add the output of:

ls -al /home/ubuntu/catkin_ws

to your original question? Use the edit button/link for that.


Edit:

You are right! I hace a CMakeLists.txt in /home/ubuntu/catkin_ws .

I'd use unlink:

unlink /home/ubuntu/catkin_ws/CMakeLists.txt

Then try catkin_make again.

edit flag offensive delete link more

Comments

I added output!!

sophie.shin gravatar imagesophie.shin ( 2017-01-25 08:46:46 -0600 )edit

You are right! I hace a CMakeLists.txt in /home/ubuntu/catkin_ws . Do you think I need to delete this file? can I use mouse right button to remove this file?

sophie.shin gravatar imagesophie.shin ( 2017-01-25 08:50:35 -0600 )edit

Thank you so much!! you are my hero!

sophie.shin gravatar imagesophie.shin ( 2017-01-25 09:18:39 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-01-25 08:28:10 -0600

Seen: 11,834 times

Last updated: Jan 25 '17