ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Beginner Q re: catkin_make of turtlesim (hydro)

asked 2013-12-08 20:13:30 -0600

Nap gravatar image

updated 2014-01-28 17:18:46 -0600

ngrennan gravatar image

Hi,

I'm new to ROS, and have been going through the tutorials. I decided I wanted to modify the behaviour of the Turtlesim demo application (having gotten the source from GitHub). I wanted to try 'catkin_make' using a target that has a bit more meat than the original example in ROS / Tutorials / BuildingPackages. I increased the precision of 'Pi' and made some changes to the 'draw_square' publisher.

The files I got from GIT are located in a folder inside my home directory. But 'catkin_make' gives an error when I try to make the project. I've tried copying the files over to the /opt/ros/hydro/share/turtlesim folder and using catkin_make there, but I get the same error as before.

The error I'm getting is:

The specified base path "/opt/ros/hydro/share/turtlesim" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace

From what I gather about ROS from the tutorials I've been through, I believe I am in the root of the workspace, and the parent folder is 'share'. I have tried 'catkin_init_workspace' and I get a message the CMakeLists.txt already exists. 'rospack find turtlesim' locates the project in /opt/ros/... so ros knows about my project.

Could someone please explain the above error and what I need to do in response.

Cheers, Nap

I'm not privileged enough to post a link that points to the same domain where I'm posting. :(

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-12-09 06:00:18 -0600

Dirk Thomas gravatar image

From your description I guess you are trying to invoke catkin_make in the folder where you checked out turtlesim. Instead you should create a workspace (as described here: http://wiki.ros.org/catkin/Tutorials/create_a_workspace) and checkout the packages under the src subfolder (as described here http://wiki.ros.org/catkin/Tutorials/using_a_workspace).

You should never try to build under /opt/ros/*. Always create and build your workspace somewhere in your home folder.

edit flag offensive delete link more

Comments

@Dirk, thanks. Copying to /opt/ros/... was an attempt to overcome the error. Now that I've compiled it, how do I install it to /opt/ros/... so I can replace the original turtlesim? I used the "-DCMAKE_INSTALL_PREFIX=/opt/ros/hydro" option but it still went into the workspace's install folder.

Nap gravatar image Nap  ( 2013-12-09 12:25:18 -0600 )edit

Got it.... 'source setup.sh' in the workspace's install folder did the trick.

Nap gravatar image Nap  ( 2013-12-09 13:05:42 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-08 20:13:30 -0600

Seen: 524 times

Last updated: Dec 09 '13