Skip to content

E Debug ROS node

horverno edited this page Mar 19, 2021 · 1 revision

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:

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:

wiki.ros.org/roswtf

Profiling ROS Nodes

wiki.ros.org tutorials

ROS VS Code extension

ROS - Visual Studio Marketplace

github.com/ms-iot/vscode-ros

Debug ROS nodes with VS Code extension (started as rosrun or roslaunch):

github.com/ms-iot/vscode-ros

Clone this wiki locally