Gazebo | Ignition | Community
Ask Your Question
2

How print the output of a plugin ?

asked 2017-10-05 12:30:55 -0500

ronan gravatar image

Hello,

I'm writing a plugin and it does work yet. So I'd like to debug it. I put some messages in the script of the plugin to see if the Callback is launch but they don't appear in my terminal. Like this : std::cout << "message"<< std::endl;

I launch Gazebo with a roslaunch command.

Do you know where I could see this messages ?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-05 12:49:54 -0500

chapulina gravatar image

I believe you should be seeing these messages, but in any case, another option would be to use Gazebo's logging tool. Add extra_gazebo_args=:"--verbose" to your roslaunch command so that Gazebo is running in verbose mode. Then from your plugin, you can use gzdbg << "message" << std::endl; and that should be printed in blue when you run the program. If you don't see it, that line is probably not being executed.

edit flag offensive delete link more

Comments

There is typo. It should be

extra_gazebo_args:="--verbose"

jungx148 gravatar imagejungx148 ( 2020-11-02 21:24:14 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-10-05 12:30:55 -0500

Seen: 3,623 times

Last updated: Oct 05 '17