Segregating roscolsole output (C++)
I'm running a node that has two main threads going on it it. I would like to segregate the output from these two threads by sending the text in ROS_INFO/ROS_ERROR/etc. to one of two different terminals. For example:
ROS_INFO("term1", "This should appear on Terminal 1");
ROS_INFO("term2", "This should appear on Terminal 2");
I want to do this because the two threads have quite different purposes, and I want to be able to easily see which output is from which thread and have it all together in one place. Is there any convenient way of doing this? I'm not overly familiar with Linux, but maybe piping the output to something other than stdout and then having a shell script that reads from the output and writes to stdout on a different terminal?
EDIT: is there a way to bump this question, or put a bounty on it or something? The two answers given do not, unfortunately, solve the problem.
There's no way to put a bounty on questions on ROS Answers. I haven't heard of anyone trying to do anything like what you're proposing, so you're not likely to find a pre-made solution.