Contribute to an existing ROS package

asked 2018-06-26 07:28:48 -0500

siri3us gravatar image

Hello everyone.

Recently I have started to work with ROS. I found my self making small changes in the comm_cpp package (.h and .cpp files). Examples of such changes include

  1. providing doxygen style comments where absent;
  2. making some small fixes like replacing "0"s with "nullptr"s during pointer initializations;
  3. replacing private undefined object constructors with deleted ones (according to C++ 11 usage advices).

There are also many other small fixes which do not affect the package behavior but rather clarify the code. But I have no idea how can I submit these changes (or any other changes) to the core package or any other package provided as part of the ROS distribution.

I have already searched for the questions related to contribution to ROS, but the most of them are devoted to either creation of new packages or submitting changes to separate packages not present in the base distribution: i) cloning the repo to ros_catkin_src, ii) building it, iii) making commits and iv) creating a push request. But what should I do in order to contribute to packages which are generally the part of a ROS distribution and downloaded during installation without cloning the corresponding repos? Simply cloning them leads to build conflicts during linking (which is not surprising, since the same packages are build during installation).

Currently I see the workflow as the following:

  1. Forking a repo with the package of interest
  2. (?) Built the ROS distribution with some of the packages being cloned (from my own remote repo), not simply downloaded
  3. Making changes, running tests.
  4. Making commits, pushing to remote repo
  5. Creating pull request.

Could you please confirm if this workflow is correct and (if yes) provide an explanation about the point 2. If no, I could you provide the correct approach, since after long searching I did not managed to find the answer.

edit retag flag offensive close merge delete


Just a note (not a full answer): cloning pkgs into your workspace and building them is exactly the workflow. I suspect the reason you got linking errors is:

according to C++ 11 usage advices

most pkgs in ROS 1 are not currently built with C++11 enabled. Introducing that without doing it ..

gvdhoorn gravatar image gvdhoorn  ( 2018-06-26 08:43:57 -0500 )edit

.. across all pkgs that contribute objects to your binaries/libraries may result in linker errors.

Improving pkgs like you suggest is nice, but please take a look at the policy regarding C++11 and newer in REP-3.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-26 08:45:29 -0500 )edit

In the minimum requirements section of kinetic it is said that C++11 is required. That confused me. Actually I though that it is built with C++11 but according to PEP-3 it is really not true (even for subsequent ROS releases). I will try to rid of all C++11 features and build ros_comm package again.

siri3us gravatar image siri3us  ( 2018-06-26 09:59:04 -0500 )edit

For Kinetic, that is true, but the old packages (like roscpp and others) are not actively migrated to C++11.

And I think it's important to remember: the Minimum Requirements are for the platform, not necessarily for all packages.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-26 10:26:26 -0500 )edit

I will try to rid of all C++11 features and build ros_comm package again.

Note that in the absence of ABI compatibility guarantees, changing such a low-level package (low as in: a dependency of many pkgs) could mean that you'd have to build other pkgs from source as well.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-26 10:27:37 -0500 )edit