Skip to content

Commit

Permalink
fix: recreate urcl log handler pointer if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
domire8 committed Oct 14, 2024
1 parent 39ff78f commit 21b132c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ur_robot_driver/src/urcl_log_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ void UrclLogHandler::log(const char* file, int line, urcl::LogLevel loglevel, co
void registerUrclLogHandler(const std::string& tf_prefix)
{
if (g_registered == false) {
if (g_log_handler == nullptr) {
g_log_handler = std::make_unique<UrclLogHandler>();
}
g_log_handler->setTFPrefix(tf_prefix);
// Log level is decided by ROS2 log level
urcl::setLogLevel(urcl::LogLevel::DEBUG);
Expand Down

0 comments on commit 21b132c

Please sign in to comment.