Robotics StackExchange | Archived questions

Find origin of warn and error messages

Hi,

I'm working on a project with several ros nodes, most either 3rd party or done by my predecessor. I'm now trying to put all pieces together, and I'm getting several WARN and ERROR messages, like :

[ERROR] [1602233077.384387072]: Lookup would require extrapolation into the past. Requested time 1602233066.485275640 but the earliest data is at time 1602233067.347147640, when looking up transform from frame [WA_2] to frame [odom]

[ WARN] [1602233235.711645984]: Failed to meet update rate! Took 0.071975827000000006106

The problem is that all the nodes (some in python, some in C++) are launched from a single node writen in python (using the roslaun API), so there is no easy way (as far as I know) to launch them each in a different terminal. Therefore, it is quite hard to knwo were the errors comme from.

Is there a way to indicate were the error/warning messages come from (at least which node, if I can get the file or even the line, it's even better).

If you have a simple solution to get this at least for the nodes I can easely modify, it would already be a nice start.

Thanks a lot in advance

Best

Felix

Asked by felixN on 2020-10-20 03:57:53 UTC

Comments

Answers

The problem is that all the nodes (some in python, some in C++) are launched from a single node writen in python (using the roslaun API)

while it can be convenient to do that, it also means you've disconnected yourself from whatever convenience roslaunch already provides.

so there is no easy way (as far as I know) to launch them each in a different terminal.

well, roslaunch is certainly capable of doing that. So if you want to go down this road, I'd recommend to see how it implements this.

If you have a simple solution to get this at least for the nodes I can easely modify, [..]

There is nothing to modify in nodes, your requirement is already covered by standard functionality.

I'm going to refer you to #q258929, of which your question is a duplicate.

If you did search before posting your question, could you please comment on which search terms you used, just so this Q&A will show up in the searches of future users?

Asked by gvdhoorn on 2020-10-20 05:28:46 UTC

Comments

Note: I'm assuming you're interested in printing this info on the console. Loggers are always sorted by name and categorised by node in something like rqt_console.

Asked by gvdhoorn on 2020-10-20 05:45:08 UTC