E Debug ROS node - szenergy/szenergy-public-resources GitHub Wiki
Debug nodes with valgrind
Build your nodes with :
catkin build [package(optional)] -DCMAKE_BUILD_TYPE=Debug
Run it from the catkin workspace base:
valgrind --leak-check=yes devel/lib/[ros_package_name]/[node_name]
Use roslaunch prefix, add this to your launchfile:
launch-prefix="valgrind"
More tricks with roslaunch prefix:
- https://github.com/facontidavide/cpp_swiss_army_knife/blob/master/profiling_roslaunch_prefix.md
- http://wiki.ros.org/roslaunch/Tutorials/Roslaunch%20Nodes%20in%20Valgrind%20or%20GDB
Look for errors and issues in ROS System
A tool for diagnosing issues with a running ROS system or launchfiles
Run general checks:
roswtf
Examine a launch file
roswtf mylaunchfile.launch
More about roswtf:
Profiling ROS Nodes
ROS VS Code extension
ROS - Visual Studio Marketplace
Debug ROS nodes with VS Code extension (started as rosrun or roslaunch):