I have brought up the ros.el emacs package a number of times now, as it has become a package that I use multiple times a day. A little while ago, I had the idea to see if I could add a debugger function, to take advantage of the emacs-gdb functionality. The implementation took me down a rabbit hole of learning about how tramp handles remote connections, as well as how gdb links shared librarys.
I have (finally) gotten around to getting KIWI to balance in simulation. All in took me about an hour to write up the pid_controller and get it to stay upright. A little longer to nail down twist tracking via a /cmd_vel command. The core logic is remarkably simple, and I think serves as a great showcase of the “power of PID”. In the same way I think that people tend to overlook linear regression for their solutions as it’s not shiny enough, I really think people under-estimate how far a well-tuned PID can get you.
It has been around a year since I moved to working in ROS2 full-time. Much like the Post about using GDB in ROS1, I wanted to make a reference for myself, and potentially anyone else, for creating a decent debugging workflow for ROS2. Unlike my ROS1 guide, I will be covering launch files here, as information regarding debugging with ROS2 is a bit sparse. Step 1: Compile with debug flags $ colcon build [flags] --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo You don’t need to build your whole workspace with debug flags, just the package you want to debug.
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.