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”