feat: add support for Gemini 305 series in camera node and related components

This commit is contained in:
ob-yalian
2026-04-03 17:34:55 +08:00
parent 9aa802083d
commit 17c7ceb2b1
5 changed files with 18 additions and 11 deletions
+5 -5
View File
@@ -1465,19 +1465,19 @@ void OBCameraNode::setupProfiles() {
format_[elem] == OB_FORMAT_UNKNOWN) {
selected_profile = profiles->getProfile(0)->as<ob::VideoStreamProfile>();
} else {
if (pid_ == GEMINI_305_PID && elem == DEPTH) {
if (isGemini305SeriesPID(pid_) && elem == DEPTH) {
OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem];
conf.originHeight = height_[elem];
conf.factor = depth_decimation_factor_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid_ == GEMINI_305_PID && elem == INFRA1) {
} else if (isGemini305SeriesPID(pid_) && elem == INFRA1) {
OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem];
conf.originHeight = height_[elem];
conf.factor = left_ir_decimation_factor_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid_ == GEMINI_305_PID && elem == INFRA2) {
} else if (isGemini305SeriesPID(pid_) && elem == INFRA2) {
OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem];
conf.originHeight = height_[elem];
@@ -4428,12 +4428,12 @@ bool OBCameraNode::isGemini335PID(uint32_t pid) {
bool OBCameraNode::isGemini435LePID(uint32_t pid) { return pid == GEMINI_435Le_PID; }
bool OBCameraNode::isPublishMetaData(uint32_t pid) {
return isGemini335PID(pid) || isGemini435LePID(pid) || pid == GEMINI_305_PID;
return isGemini335PID(pid) || isGemini435LePID(pid) || isGemini305SeriesPID(pid);
}
bool OBCameraNode::isDepthWorkModeDevices(uint32_t pid) { return pid == GEMINI_435Le_PID; }
bool OBCameraNode::isnotLaserDevices(uint32_t pid) { return pid == GEMINI_305_PID; }
bool OBCameraNode::isnotLaserDevices(uint32_t pid) { return isGemini305SeriesPID(pid); }
orbbec_camera_msgs::msg::IMUInfo OBCameraNode::createIMUInfo(
const stream_index_pair &stream_index) {
+2 -2
View File
@@ -1331,8 +1331,8 @@ void OBCameraNodeDriver::startDevice(const std::shared_ptr<ob::DeviceList> &list
if (GEMINI_335LG_PID == pid) {
ob_camera_node_->startGmslTrigger();
}
if (pid == GEMINI_305_PID) {
// Fixing 305 hot-swap not outputting power
if (isGemini305SeriesPID(pid)) {
// Fixing 305 series hot-swap not outputting power
ob_camera_node_->startStreams();
}
} catch (ob::Error &e) {
+2 -2
View File
@@ -665,13 +665,13 @@ void OBCameraNode::setAeRoiCallback(const std::shared_ptr<SetArrays ::Request>&
std::shared_ptr<SetArrays::Response>& response,
const stream_index_pair& stream_index) {
auto stream = stream_index.first;
if (device_->getDeviceInfo()->getPid() == GEMINI_305_PID &&
if (isGemini305SeriesPID(device_->getDeviceInfo()->getPid()) &&
(stream != OB_STREAM_COLOR && ae_mode_ == "colorbased")) {
response->success = false;
response->message = "AE MODE is colorbased, other sensors setting is not supported";
return;
}
if (device_->getDeviceInfo()->getPid() == GEMINI_305_PID &&
if (isGemini305SeriesPID(device_->getDeviceInfo()->getPid()) &&
(stream != OB_STREAM_DEPTH && ae_mode_ == "depthbased")) {
response->success = false;
response->message = "AE MODE is depthbased, other sensors sensor setting is not supported";