Ask Your Question
0

How to generate call graph for ROS code?

asked 2012-04-05 00:07:52 -0500

sam gravatar image

For example, I want to analysis roscpp call graph.

Which tools I can use? How?

It will very great if it has graphical interface.

Thank you~

edit retag flag offensive close merge delete

Comments

Can you use doxygen or codeviz?

PKG gravatar image PKG  ( 2012-04-05 20:36:54 -0500 )edit

Thank you. I found that I can use doxywizard to generate each function's call graph,but where is the whole picture call graph? Another question is codeviz should patch compiler,so it seems very hard to work on ROS. How to do it?

sam gravatar image sam  ( 2012-04-05 22:50:59 -0500 )edit

I also found that doxywizard just generate partial call graph. Because I found that the function it generate call graph failed (roscpp init.cpp init() ). Is there any tool can generate complete call graph? Thank you~

sam gravatar image sam  ( 2012-04-05 23:00:27 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-11-04 10:45:08 -0500

AHornung gravatar image

As with any binary in Linux, you can use valgrind / callgrind to collect the information during run time. A visualizer for the results is e.g. http://kcachegrind.sourceforge.net/html/Documentation.html.

You can install the package in Ubuntu with

sudo apt-get install valgrind kcachegrind
edit flag offensive delete link more
1

answered 2012-11-02 22:00:06 -0500

Bill Smart gravatar image

This isn't really a ROS-specific question, but Stack Overflow has this solution which might be helpful.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-04-05 00:07:52 -0500

Seen: 654 times

Last updated: Nov 04 '12