Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This might not be the best way to do this, but this is what comes to my mind:

$ rosrun sample_pkg sample_node 2>&1 | grep -e "\[ERROR\]" -e "\[FATAL\"] > /path/to/file

Alternatively, you can pipe all messages written to stderr to a file. This includes all ROS WARN, ERROR and FATAL messages: (ref)

$ rosrun sample_pkg sample_node 2>/path/to/file