# Rolling as default branch

**URL:** <https://discourse.openrobotics.org/t/rolling-as-default-branch/35029>\
**Category:** ROS General\
**Tags:** ros2\
**Created:** [December 9, 2023, 6:44pm UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029 "2023-12-09T18:44:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmrico](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/fmrico/32/707_2.png) [@fmrico](https://discourse.openrobotics.org/u/fmrico)\
**Post date:** [December 9, 2023, 6:44pm UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029/1 "2023-12-09T18:44:29Z")

</div>

Dear ROS Community,

I’m interested in initiating a discussion on the benefits and potential drawbacks of setting the package’s default development branch to `rolling` instead of the traditional `main` (or `master` or `ros2` ). This topic aligns with the conversation started in the following thread: [Change Default Branch Name to Rolling in ROS 2 Core](http://discourse.ros.org/t/change-default-branch-name-to-rolling-in-ros-2-core/26009). I’d appreciate insights and perspectives from the community on this matter.

From my point of view:

- Cons:
  - It is not usual in non-ROS projects.

- Pros:
  - It is clear which distro is used to build the default branch.
  - If you have a periodic CI, you are ready to create the branch for each distro as soon as it is released.

Do you see any more pros or cons? Do you think this can become a general recommendation?

Best  
Francisco

---

<div class="post-metadata">

**Author:** ![doganulus](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/doganulus/32/14384_2.png) [@doganulus](https://discourse.openrobotics.org/u/doganulus)\
**Post date:** [December 10, 2023, 9:01am UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029/2 "2023-12-10T09:01:46Z")

</div>

Release branches may be used, but

- They are harder to maintain. Bug fixes, new features, and functionality must be duplicated for each release branch.
- They are harder to learn and master as they require a higher software engineering discipline to apply correctly and sustain.

My general recommendation, unless the package is tightly integrated with a core ROS functionality, is to go with trunk-based development (single main branch, frequent/small updates). You better architect the core of your robotic package as a native library in your programming language inside their ecosystem. Then, bind it with ROS releases (or other pub-sub libraries) as late as possible. This would improve robustness, testability, and maintainability.

---

<div class="post-metadata">

**Author:** ![fmrico](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/fmrico/32/707_2.png) [@fmrico](https://discourse.openrobotics.org/u/fmrico)\
**Post date:** [December 10, 2023, 9:36am UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029/3 "2023-12-10T09:36:22Z")

</div>

I refer to the typical ROS project like [this](https://github.com/PlanSys2/ros2_planning_system), from which deb packages are released for each distro.

Thanks anyway @doganulus 😉

---

<div class="post-metadata">

**Author:** ![mikeferguson](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mikeferguson/32/211_2.png) [@mikeferguson](https://discourse.openrobotics.org/u/mikeferguson)\
**Post date:** [December 10, 2023, 7:16pm UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029/4 "2023-12-10T19:16:52Z")

</div>

I think `rolling` makes sense if you really are branching for every rosdistro - but I’ve found that often isn’t entirely required.

For a number of my own projects, I’ve stuck with having a default `ros2` branch which covers pretty much all the recent/supported distros (in most cases, I need a separate branch for old distros like Foxy, but can cover everything newer with the same branch). In many cases, my  
same repo also has an older, and pretty much unmaintained at this point, `ros1` branch.

Plus, whenever you look at that `ros2` branch name, you get to giggle a little that there is no space between `ros` and `2`.

---

<div class="post-metadata">

**Author:** ![smac](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/smac/32/6763_2.png) [@smac](https://discourse.openrobotics.org/u/smac)\
**Post date:** [December 11, 2023, 2:59am UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029/5 "2023-12-11T02:59:54Z")

</div>

I think about each of these as being largely interchangable. I wouldn’t be opposed to a more official policy (Fergs’ makes much sense). Its not something that keeps me up at night, but if there was a concern we could address with more consistency, I’m all for it!

---

<div class="post-metadata">

**Author:** ![mikeferguson](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mikeferguson/32/211_2.png) [@mikeferguson](https://discourse.openrobotics.org/u/mikeferguson)\
**Post date:** [December 11, 2023, 4:14am UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029/6 "2023-12-11T04:14:39Z")

</div>

Honestly - the best “policy” here for things outside the very core ROS is probably just to document what you’re doing. For released packages, [index.ros.org](http://index.ros.org) will tell you which branch should work for which distro (although, I’m not sure the beginner docs really highlight how to use [index.ros.org](http://index.ros.org)).

Putting a note about branching conventions near the top of the README of the git repo can also be beneficial. I used to do this all the time back in the ROS 1 days when we did things like `indigo-devel` works for indigo & kinetic, then we branched to `melodic-devel` for melodic and noetic, and hey there is an experimental `ros2` branch too.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/b/6/b607ee3cc8e908b1b613bd74a683d749fea635a1.svg) [@system](https://discourse.openrobotics.org/u/system)\
**Post date:** [January 10, 2024, 4:15am UTC](https://discourse.openrobotics.org/t/rolling-as-default-branch/35029/7 "2024-01-10T04:15:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
