0
$\begingroup$

Rosanswers logo

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

Originally posted by sophie.shin on ROS Answers with karma: 15 on 2017-01-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2017-01-25

This answer was ACCEPTED on the original site

Post score: 12


Original comments

Comment by sophie.shin on 2017-01-25:
I added output!!

Comment by sophie.shin on 2017-01-25:
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?

Comment by sophie.shin on 2017-01-25:
Thank you so much!! you are my hero!

Comment by Ferreira_Robson on 2020-12-19:
Thank you Guys !! I had the same problem ! May I ask : I neet to remove the CMakeLists.txt ?

Comment by wbadry on 2021-06-16:
Amazing. Thank you so much.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.