@@ -116,11 +116,7 @@ void log_image(
116
116
cv::Mat img = cv_bridge::toCvCopy (msg)->image ;
117
117
rec.log (
118
118
entity_path,
119
- rerun::DepthImage (
120
- img_data_as_collection<uint16_t >(img),
121
- {static_cast <size_t >(img.rows ), static_cast <size_t >(img.cols )}
122
- )
123
- .with_meter (1000 )
119
+ rerun::DepthImage (rerun::TensorBuffer::u16 (img), width_height (img)).with_meter (1000 )
124
120
);
125
121
} else if (msg->encoding == " 32FC1" ) {
126
122
cv::Mat img = cv_bridge::toCvCopy (msg)->image ;
@@ -132,15 +128,14 @@ void log_image(
132
128
}
133
129
rec.log (
134
130
entity_path,
135
- rerun::DepthImage (
136
- img_data_as_collection<float >(img),
137
- {static_cast <size_t >(img.rows ), static_cast <size_t >(img.cols )}
138
- )
139
- .with_meter (1.0 )
131
+ rerun::DepthImage (img_data_as_collection<float >(img), width_height (img)).with_meter (1.0 )
140
132
);
141
133
} else {
142
134
cv::Mat img = cv_bridge::toCvCopy (msg, " rgb8" )->image ;
143
- rec.log (entity_path, rerun::Image::from_rgb24 (img_data_as_collection<uint8_t >(img), width_height (img)));
135
+ rec.log (
136
+ entity_path,
137
+ rerun::Image::from_rgb24 (img_data_as_collection<uint8_t >(img), width_height (img))
138
+ );
144
139
}
145
140
}
146
141
@@ -156,7 +151,11 @@ void log_pose_stamped(
156
151
rec.log (
157
152
entity_path,
158
153
rerun::Transform3D (
159
- rerun::components::Translation3D (msg->pose .position .x , msg->pose .position .y , msg->pose .position .z ),
154
+ rerun::components::Translation3D (
155
+ msg->pose .position .x ,
156
+ msg->pose .position .y ,
157
+ msg->pose .position .z
158
+ ),
160
159
rerun::Quaternion::from_wxyz (
161
160
msg->pose .orientation .w ,
162
161
msg->pose .orientation .x ,
0 commit comments