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:

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 close merge delete

Sort by » oldest newest most voted

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.

more

Thank you for the help. it solved my issue.

Regards

( 2017-02-12 06:03:19 -0500 )edit