Ask Your Question
0

"programming robotics with ros" Cmakelist.txt not found

asked 2017-02-07 04:30:53 -0500

Ayush Sharma gravatar image

Respected, I am following the book "programming robotics with ros". To begin with this, i simple git cloned the github source of the book but on performing the command "catkin-make" , i am getting the following error:

image description

This is the github link i am following "https://github.com/osrf/rosbook" Here, the folders within the "code" lack a cmakelist.txt file. I tried to remove the "code" folder from the package and simply added the code files in other folders of the package, and that is performing the "catkin_make" command but then the the individual files of the code folder are not working.

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-07 07:23:02 -0500

updated 2017-02-07 07:23:42 -0500

Did you check errata to the book?

It says:

... Assuming (as in Chapter 2) your workspace is ~/catkin_ws, the following commands would create a basics package in that workspace that depends on rospy:

user@hostname$ cd ~/catkin_ws/src 
user@hostname$ catkin_create_pkg basics rospy

The examples and discussion in Chapter 3 should then work as expected, in the ~/catkin_ws/src/basics directory. The other way to make the examples work in this chapter, besides typing them in manually, is to clone this entire repository; then you will have the basics directory (with all the examples) that you can symlink into your workspace. For example, assuming there is an existing workspace in ~/catkin_ws

user@hostname$ git clone https://github.com/osrf/rosbook ~/rosbook 
user@hostname$ ln -s ~/rosbook/code/basics ~/catkin_ws/src 
user@hostname$ cd ~/catkin_ws 
user@hostname$ catkin_make

(that last step will ensure there is a valid setup file for this workspace created in ~/catkin_ws/devel/setup.bash) Then you can source the setup file of that workspace: user@hostname$ . ~/catkin_ws/devel/setup.bash and the examples should work.

Personally I would advise following the first snippet with creating a catkin package as it is way cleaner than the other approach.

edit flag offensive delete link more

Comments

Thank you for the help. it solved my issue.

Regards

Ayush Sharma gravatar image Ayush Sharma  ( 2017-02-12 06:03:19 -0500 )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-02-07 04:30:53 -0500

Seen: 86 times

Last updated: Feb 07 '17