Copying ROS from a different user

Although not recommended, if you want to be paranoid about having the same ROS version, you might try to copy someone else's ROS repository. Some things that might help (Advait hasn't verified all these):

Alternately, if you get errors about CMakeCache.txt pointing to someone else's directory, run rosmake with the --pre-clean option.

rosmake Compilation errors

If you try to rosmake [package name] and you get compilation errors, you probably have to run rosdep install [package name] first in order to install the package's dependencies. Then go ahead and try rosmake [package name] again.

In the src/ directory of the folder you just created, create a new folder with the SAME name as your package:

cd my_package/src
mkdir my_package

Note: The directory listing should look like: ~/svn/gt-ros-pkg/hrl/my_package/src/my_package. The reason for this format is so that if your package happens to contain files of the same name as someone else's, python won't get confused as to which one you want to use. Thus, we want to stick all the source files into the last folder we just created.

Now, copy all the source files that you want in the package into ~/svn/gt-ros-pkg/hrl/my_package/src/my_package. (use the "cp" command)

If you do not have a file called "__init__.py", perform this:

touch __init__.py

Note: This creates an empty, dummy file with that name. Python will not run unless it sees this file.

In EACH of your python files, you MUST copy and paste our software license at the top. It is just a bunch of text with "#" characters to comment it out. Copy this text from any of the files other lab members have committed. Or, you can also find this in: ~/svn/gt-ros-pkg/hrl/LICENSE.txt

First, figure out what the inputs and outputs of your package will be. Then, select (or create new) a file.msg that contains declarations of the data types that best characterize your data to be passed. These files containing the declarations are part of the ICP or messages in ROS.

[insert more instructions here]

cd ~/svn/gt-ros-pkg/hrl/my_package/src/my_package
vim xxx_node.py
add !/usr/bin/python to the top line of your file and also make sure to add the license header! (see above)

Special Cases

If your package depends on something located in ~/svn/robot1/src/libraries, then you will need to move that function to ~/svn/gt-ros-pkg/hrl/hrl_lib. But DON'T do it yet! Ask Hai or Advait first!

cmake

rospack_add_executable does not like .c files. If things don't link, try renaming .c files to .cpp

remember to add genmsg and/or gensrv to compile the messages.

if you copy CMakelists.txt from another package - it has a line rospack(<package name>). Be sure to change this to the current package's name or else the dependencies will not get loaded and things won't compile.