Brand-compliant 'ROS 2' and 'ROS 1' command aliases for 'ros2' and 'ros...' with autocompletion support

As you might know, it’s “ROS 2” and not “ROS2”; see the ROS brand guidelines, or shouldiputaspacebetweenrosand2.com for a quick and simple reference. Some people point to the ros2 command, saying that ROS 2’s main CLI entrypoint is infringing on its own brand guidelines!

To address this quite outrageous issue, I’ve created the ros_2cli package, which provides brand-compliant ROS 1 and ROS 2 command aliases.

Command… …calls Example… …calls
ROS 2 ... ros2 ... ROS 2 topic list ros2 topic list
ROS 1 ... ros... ROS 1 topic list rostopic list

The ROS 2 command alias even supports autocompletion:

$ ROS <tab>
1 2 -h --help
$ ROS 2 <tab>
action                          interface                       run
bag                             launch                          security
component                       lifecycle                       service
daemon                          multicast                       topic
doctor                          node                            --use-python-default-buffering
extension_points                param                           wtf
extensions                      pkg
$ ROS 2 topic <tab>
bw                       hz                       pub
delay                    --include-hidden-topics  type
echo                     info                     
find                     list
$ ROS 2 topic list
/email
/parameter_events
/rosout
$ ROS 2 run demo_nodes_<tab>
demo_nodes_cpp         demo_nodes_cpp_native  demo_nodes_py

Note that ros 1 and ros 2 aren’t supported because it’s “ROS” uppercase and not “ros” lowercase

Now, you might think writing ROS 2 ... is pretty ridiculous and writing ros2 ... is much simpler & faster, and you would be absolutely – and without a doubt – right. But it’s still “ROS 2” and not “ROS2” :stuck_out_tongue_winking_eye:

24 Likes

it’s “Python 3” not “python3”

but somehow, people don’t get all confused when they use the command line of “python3” ?

7 Likes

I love it. Thank you. This belongs in my favorite book.

The Art of Trolling: A Complete Guide to Freshwater Methods and Tackle: Schultz, Ken: 9780070572355: Books - Amazon.ca

11 Likes

My auto-autocompletion senses are tingling:

# ~/bashrc
alias ros="ros2"

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