Those from programming background understand the importance of unit testing and integration testing, even for ROS programs. But quite many ROS users are beginners in programming/CS. Some have their first interaction with programming while exploring ROS and writing their first few node scripts.
A good set of tutorials with examples on how to use unittest and rostest would improve code quality of ROS packages.
I recommend creating an issue on the ROS 2 Documentation repository about the absence of a tutorial. Make sure to include all of the relevant resources you have found on the subject (i.e. do your research, check the wiki, Google a bunch, don’t just ask for a tutorial).
As to IDEs, well, I’ve never used one with ROS, unless you consider Emacs an IDE. I know Visual Code has a lot of docs but I find IDEs to be more trouble than their worth. What debugging tools do you need above and beyond PDB, GDB, Valgrind, etc? A few of these topics fall under the rubric of general programming knowledge more so than ROS specifically.
I think this is a great idea. Tutorials would be really helpful. Or at least a list or summary of what is available? A day ago a co-worker asked about tutorials for implementations of navigation IDEs for mobile robots using ROS.
Sure I can do that. What is the way to do this for ROS1? I see the equivalent repo for ROS1 isn’t active.
Since I am playing with the testing packages at the moment, I might write tutorials on my own to help out people, if that is allowed. (I have edited a few tutorial/wiki pages, but I’m not sure if I can create new ones.)
I have the same view. I use VS Code as my text editor and never required an IDE for all the work I do.
However, I’d love to hear from people who do, who can tell me what I’m missing out
I think they meant navigation packages rather than IDE? In which case ROS has great wiki, a lot of Q&A, and there is also a lot of external documentation/tutorials for it
One trick for unit testing python nodes without bringing up a whole node is to mock out all the rclpy calls so that you only ever have to test your logic. We often break our nodes up into the “ROS interface” and “Main logic”, especially after migrating from ROS1 to ROS2 so these tests only ever hit our interface code.
The unit tests get a bit verbose this way, but places a lot less load on our CI system. We then have separate integration tests for actually bringing up the node against a real ROS instance