Gazebo | Ignition | Community
Ask Your Question

What's the proper way to use gzerr?

asked 2016-04-13 21:39:00 -0500

pcdangio gravatar image

I'm trying to use gzerr to output error messages to the console in which gazebo is running from. If I put the following code in my model plugin's load method, the gzerr text never shows in the console.

gzerr << "this message never gets displayed\n";
std::cout << "this message gets displayed just fine" << std::endl;

I'm starting gazebo using the "gazebo" command, and I have verified with an std::cout that the plugin's load method is getting called. I've also made sure that gazebo/common/Console.h is included. I've also tried using sdferr the same way as gzerr, and sdferr works exactly as expected.

What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-13 22:33:29 -0500

chapulina gravatar image

Run Gazebo in verbose mode:

gazebo --verbose
edit flag offensive delete link more


Thanks! Interesting that by default error messages won't show up. What's the proper way then, to notify the user of an error if not running in verbose mode?

pcdangio gravatar imagepcdangio ( 2016-04-14 09:48:05 -0500 )edit

It depends on the "user". If it's someone who will be using the command line, you'd use the verbose mode. If it's a graphical interface user, you could make a GUI plugin which prints messages to the screen.

chapulina gravatar imagechapulina ( 2016-04-14 11:52:04 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-04-13 21:39:00 -0500

Seen: 1,068 times

Last updated: Apr 13 '16