Open wataru-okumura opened 4 days ago
After a little investigation, it seems that color_framequeue.push is not being executed due to color_frame=0 on one of the cameras. Could you please investigate why this is happening?
void OBCameraNode::onNewFrameSetCallback(std::shared_ptr<ob::FrameSet> frame_set) {
if (!is_running_.load()) {
return;
}
if (!is_camera_node_initialized_.load()) {
return;
}
if (frame_set == nullptr) {
return;
}
try {
if (!tf_published_) {
publishStaticTransforms();
tf_published_ = true;
}
depth_frame_ = frame_set->getFrame(OB_FRAME_DEPTH);
auto device_info = device_->getDeviceInfo();
CHECK_NOTNULL(device_info.get());
auto pid = device_info->pid();
auto color_frame = frame_set->getFrame(OB_FRAME_COLOR); // Sometimes color_frame =0
if (isGemini335PID(pid)) {
depth_frame_ = processDepthFrameFilter(depth_frame_);
if (depth_registration_ && align_filter_ && depth_frame_ && color_frame) {
auto new_frame = align_filter_->process(frame_set);
if (new_frame) {
auto new_frame_set = new_frame->as<ob::FrameSet>();
CHECK_NOTNULL(new_frame_set.get());
depth_frame_ = new_frame_set->getFrame(OB_FRAME_DEPTH);
} else {
RCLCPP_ERROR(logger_, "Failed to align depth frame to color frame");
}
} else {
RCLCPP_DEBUG(logger_,
"Depth registration is disabled or align filter is null or depth frame is "
"null or color frame is null");
}
}
if (enable_stream_[COLOR] && color_frame) { // sometimes it does not fall into this condition.
std::unique_lock<std::mutex> lock(color_frame_queue_lock_);
color_frame_queue_.push(frame_set);
color_frame_queue_cv_.notify_all();
} else {
publishPointCloud(frame_set);
}
Thanks again. I have a question about using multiple cameras at the same time.
As per readme.md When I run multi_camera.launch.py, I get the following log To confirm that each node is working properly ros topic echo, it is not possible to receive the topic of one of the cameras. This happens about 50% of the time.
Two cameras: femto bolt. sdk version: v1.5.8
teriminal1
terminal2 unable to receive topic
Note that color/camera_info and color/image_raw fail to echo, and topics such as depth and ir can be obtained.
multi_camera.launch.py
The following is the log of terminal1 during the run.