mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-15 04:20:20 +08:00
Fix negative translation value in OBCameraNode
This commit is contained in:
@@ -2176,6 +2176,7 @@ void OBCameraNode::calcAndPublishStaticTransform() {
|
|||||||
"Failed to get " << frame_id << " extrinsic: " << e.getMessage());
|
"Failed to get " << frame_id << " extrinsic: " << e.getMessage());
|
||||||
ex = OBExtrinsic({{1, 0, 0, 0, 1, 0, 0, 0, 1}, {0, 0, 0}});
|
ex = OBExtrinsic({{1, 0, 0, 0, 1, 0, 0, 0, 1}, {0, 0, 0}});
|
||||||
}
|
}
|
||||||
|
ex.trans[0] = -std::abs( ex.trans[0]);
|
||||||
depth_to_other_extrinsics_[INFRA2] = ex;
|
depth_to_other_extrinsics_[INFRA2] = ex;
|
||||||
auto ex_msg = obExtrinsicsToMsg(ex, frame_id);
|
auto ex_msg = obExtrinsicsToMsg(ex, frame_id);
|
||||||
depth_to_other_extrinsics_publishers_[INFRA2]->publish(ex_msg);
|
depth_to_other_extrinsics_publishers_[INFRA2]->publish(ex_msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user