mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-12 07:19:50 +08:00
fixed tf calc error
This commit is contained in:
@@ -1013,9 +1013,11 @@ void OBCameraNode::calcAndPublishStaticTransform() {
|
|||||||
Q = transform.getRotation();
|
Q = transform.getRotation();
|
||||||
trans = transform.getOrigin();
|
trans = transform.getOrigin();
|
||||||
rclcpp::Time tf_timestamp = node_->now();
|
rclcpp::Time tf_timestamp = node_->now();
|
||||||
|
if(enable_stream_[COLOR]) {
|
||||||
publishStaticTF(tf_timestamp, trans, Q, frame_id_[DEPTH], frame_id_[COLOR]);
|
publishStaticTF(tf_timestamp, trans, Q, camera_link_frame_id_, frame_id_[COLOR]);
|
||||||
publishStaticTF(tf_timestamp, trans, Q, camera_link_frame_id_, frame_id_[COLOR]);
|
publishStaticTF(tf_timestamp, zero_trans, quaternion_optical, frame_id_[COLOR],
|
||||||
|
optical_frame_id_[COLOR]);
|
||||||
|
}
|
||||||
for (const auto &stream_index : IMAGE_STREAMS) {
|
for (const auto &stream_index : IMAGE_STREAMS) {
|
||||||
if (stream_index == COLOR || !enable_stream_[stream_index]) {
|
if (stream_index == COLOR || !enable_stream_[stream_index]) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user