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

Copy a package to catkin workspace [closed]

asked 2014-08-05 16:06:09 -0600

anamcarvalho gravatar image

updated 2014-08-05 17:39:39 -0600

Hi,

I want to change a package I found: http://wiki.ros.org/depthimage_to_las... and https://github.com/ros-perception/dep...

I need to make changes in every file, .h, .cpp, .... To do this I want to do a copy of this package to catkin workspace in order to make the changes without messing with the original package!

How can I do this? Is it ok for this package to have the same name as the previous one which I have installed with ROS?

*UPDATE*

I already have the package in my catkin workspace directory, thanks to @ahendrix!

Now I have one question:

  • All the files, including the files from include folder, test folder and cfg folder are in the package directory: /catkin_ws/src/depthimage_to_laserscan . Is this ok? Should these files in these folders be inside the package folder directory along with the src folder?

Thank you!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by anamcarvalho
close date 2014-08-05 19:15:50.357589

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-08-05 16:11:05 -0600

ahendrix gravatar image

Since the source code for the package is on github, you can check out the source into your workspace with git clone:

git clone https://github.com/ros-perception/depthimage_to_laserscan.git

If you want to use a branch other than the github default, you can use git checkout <branch> to check out a specific branch. The branch used for the version of ROS that you're using should be documented on the package's wiki page.

edit flag offensive delete link more

Comments

Hi! Sorry for my ignorance, but what do you mean by branch? I already have the package in my catkin workspace directory! Is it ok for this package to have the same name as the previous one which I have installed with ROS?

anamcarvalho gravatar image anamcarvalho  ( 2014-08-05 16:22:04 -0600 )edit
1

You've asked how to copy the package to your workspace, but it's already in your workspace? I'm confused. Can you describe how you have ROS installed?

ahendrix gravatar image ahendrix  ( 2014-08-05 16:32:00 -0600 )edit
1

I can't cite this, but I believe it is okay for the package to have the same name as the previous one; I believe ROS defaults to using the one in your workspace...

ahubers gravatar image ahubers  ( 2014-08-05 16:36:25 -0600 )edit

I used your command inside the directory I wanted and it copied the package to the directory I was in... My ROS distribution is hydro, does it copy the package for hydro automatically? What do you want to know about how I installed ROS? I didn't understand...

anamcarvalho gravatar image anamcarvalho  ( 2014-08-05 16:37:55 -0600 )edit
2

ROS supports having the same package in different workspaces; this is called overlaying. Normally, this happens when one version of a package is installed in the system workspace (/opt/ros) and the user wants to have a copy in their local workspace (~/catkin_ws/).

ahendrix gravatar image ahendrix  ( 2014-08-05 16:42:30 -0600 )edit
1

The version of the package in the local workspace will be used instead of the version in the system workspace, if you have it in both places.

ahendrix gravatar image ahendrix  ( 2014-08-05 16:42:58 -0600 )edit
1

The hydro version (branch) of the package is probably not checked out by default. The package's wiki page lists the hydro-devel branch for Hydro, so you should check out the hydro-devel branch.

ahendrix gravatar image ahendrix  ( 2014-08-05 16:44:29 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-05 16:06:09 -0600

Seen: 4,899 times

Last updated: Aug 05 '14