ros-perception / slam_gmapping

http://www.ros.org/wiki/slam_gmapping
668 stars 528 forks source link

Log messages should be sent to rosinfo roserr etc. if possible. #42

Open tsbertalan opened 7 years ago

tsbertalan commented 7 years ago

gmapping spams the console with lots of unnecessary "Registering Scans:Done" and "Laser Pose= 1.9015 1.58619 1.4151" messages. These should be removed, or sent to the standard ros logging streams. As is, as far as I can tell, they're printed directly to std::cerr in gridfastslam/gridslamprocessor.hxx (not in this repository). Redirecting stderr is not a good workaround; I do want to see real errors.

acenturyandabit commented 2 years ago

Gridslamprocessor is outside of ROS's jurisdiction - it is here in openSLAM: https://github.com/OpenSLAM-org/openslam_gmapping/blob/master/gridfastslam/gridslamprocessor.hxx

If you really have a personal vendetta against this error message, you can find the file in ros: /opt/ros/melodic/include/gmapping/gridfastslam/gridslamprocessor.hxx /opt/ros/melodic/include/gmapping/gridfastslam/gridslamprocessor.h

and edit out the cerr's there.

To reduce code duplication, this package shouldn't do that. ;( If you want to fix this for everyone, you can submit a PR to the openSLAM with a #ifdef maybe which will stop the logging.