Skip to content

Commit

Permalink
Logger updates Noetic (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafadam authored Oct 16, 2023
1 parent 0b7e450 commit 9442872
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions depthai_ros_driver/src/dai_nodes/stereo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,15 @@ void Stereo::closeQueues() {
if(ph->getParam<bool>("i_publish_topic")) {
stereoQ->close();
}
if(ph->getParam<bool>("i_publish_left_rect") || ph->getParam<bool>("i_publish_synced_rect_pair")) {
syncTimer.reset();
if(ph->getParam<bool>("i_publish_left_rect")) {
leftRectQ->close();
}
if(ph->getParam<bool>("i_publish_right_rect") || ph->getParam<bool>("i_publish_synced_rect_pair")) {
if(ph->getParam<bool>("i_publish_right_rect")) {
rightRectQ->close();
}
if(ph->getParam<bool>("i_publish_synced_rect_pair")) {
syncTimer.reset();
leftRectQ->close();
rightRectQ->close();
}
if(ph->getParam<bool>("i_left_rect_enable_feature_tracker")) {
Expand Down
5 changes: 3 additions & 2 deletions depthai_ros_driver/src/dai_nodes/sys_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ std::string SysLogger::sysInfoToString(const dai::SystemInformation& sysInfo) {

void SysLogger::produceDiagnostics(diagnostic_updater::DiagnosticStatusWrapper& stat) {
try {
auto logData = loggerQ->tryGet<dai::SystemInformation>();
if(logData) {
bool timeout;
auto logData = loggerQ->get<dai::SystemInformation>(std::chrono::seconds(5), timeout);
if(!timeout) {
stat.summary(diagnostic_msgs::DiagnosticStatus::OK, "System Information");
stat.add("System Information", sysInfoToString(*logData));
} else {
Expand Down

0 comments on commit 9442872

Please sign in to comment.