ROS.el is really nice

Keywords: #ros #ros2 #emacs

In the last post, I mentioned that the ros.el emacs package had been on my radar. I finally got around to giving it a try a few days ago, and it has quickly become a staple of my workflow (Highest praise possible!).

I had to add some dependencies in my packages.el:

;; `ros.el' depends on `with-shell-interpreter' among other packages
;; See: https://github.com/DerBeutlin/ros.el/blob/master/Cask
(package! with-shell-interpreter)
(package! string-inflection)
(package! ros
  :recipe (:host github
           :repo "DerBeutlin/ros.el"))

Aside from that, it worked flawlessly out of the box. My config for KIWI looks like so:

(use-package! ros
  :init
  (map! :leader
        :prefix ("l" . "custom")
        :desc "Hydra ROS" "r" #'hydra-ros-main/body)
  :commands (hydra-ros-main/body ros-set-workspace)
  :config

  (setq ros-workspaces (list (ros-dump-workspace
                              :tramp-prefix "/ssh:kiwi.local|docker:kiwi_docker:"
                              :workspace "/home/kiwi/kiwi_ws"
                              :extends '("/opt/ros/humble/")))))

The primary draw of ros.el for me is that I can very quickly hit SPC-l-r and jump right into the package I want to work on. My only complaint thus far is that I cannot define a compilation script to use for the SPC-l-r-c head, but perhaps the terminal is the proper place for that kind of thing. I haven’t found myself wanting any other extra features just yet, but the core of ros.el is simple, so extending the feature-set should be trivial.

It doesn’t support any introspection functions for ROS2 (Listing topics, service calls, etc), but I prefer to use ORNIS for that kind of stuff anyway.