Update Default ROS 2 Distro on ROS Documentation Site

From my limited SEO knowledge, I do not think there is any way to magically know if it should point to rolling, or the latest non-rolling release, the latest LTS release, or the currently “most popular” (definitions will vary) release. I think we just need to agree on something and I also think the latest LTS release makes the most sense.

Beyond that there doesn’t seem to be a strong convention on how this gets handled, but ROS users are used to C++, Python, and Ubuntu so let’s look at them

  • cplusplus.com - Single page per API with tabs/notes noting differences across versions
  • docs.python.org - Similar to cplusplus, though they have “3” in the url for the major version
  • Ubuntu - Different page per release, but you can edit the url to swap 22.04 for 24.04. They do map a lts page (e.x. Sound problems ) to the 24.04 content, which probably also has good SEO nuances.

So if we want to pick something most similar to other things Ubuntu’s approach makes sense. Beyond that, we could add a note to the docs encouraging people to install a Redirector extension (here is one for firefox and one for chrome) and set up a regex rule they can modify as they switch between projects on diff repos. I just tested out this regex binding and it is working for me.

From

^https://docs.ros.org/en/[^/]+/(.*)$

To

https://docs.ros.org/en/jazzy/$1

Of course, this might backfire if pages get renamed without redirects between versions, or your search engine points you to a rolling page that doesn’t exist for your distro, etc though.

Also this pattern currently triggers but does not work for APIs, such as ros 2 solidprimitive which google points me to http://docs.ros.org/en/noetic/api/shape_msgs/html/msg/SolidPrimitive.html as the ROS 1 API links are dominating SEO. But I think the rule could be updated to convert the link instead to https://docs.ros.org/en/jazzy/p/shape_msgs/ instead with some more GPT regexing.