Skip to content

Commit c5ce565

Browse files
authored
Always copy fill all fields for organized point clouds. (#419)
1 parent 90b459d commit c5ce565

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Changelog
1111
of sensor TF transforms.
1212
* Introduced a new topic ``/ouster/telemetry`` that publishes ``ouster_ros::Telemetry`` messages,
1313
the topic can be turned on/off by including the token ``TLM`` in the flag ``proc_mask`` launch arg.
14+
* [BUGFIX]: NEAR_IR data is not populated with data for organized point clouds that have no range.
1415

1516

1617
ouster_ros v0.13.0

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="3">
33
<name>ouster_ros</name>
4-
<version>0.13.3</version>
4+
<version>0.13.4</version>
55
<description>Ouster ROS driver</description>
66
<maintainer email="oss@ouster.io">ouster developers</maintainer>
77
<license file="LICENSE">BSD</license>

src/point_cloud_compose.h

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,13 @@ void scan_to_cloud_f(ouster_ros::Cloud<PointT>& cloud, PointS& staging_point,
144144
auto ts =
145145
timestamp[ts_idx] > scan_ts ? timestamp[ts_idx] - scan_ts : 0UL;
146146

147-
if (xyz.isNaN().any()) {
148-
if (organized) {
149-
cloud.is_dense = false;
150-
auto& pt = cloud.points[tgt_idx];
151-
pt.x = static_cast<decltype(pt.x)>(xyz(0));
152-
pt.y = static_cast<decltype(pt.y)>(xyz(1));
153-
pt.z = static_cast<decltype(pt.z)>(xyz(2));
154-
CondBinaryOp<point::has_t_v<PointT>>::run(
155-
pt, ts, [](auto& pt, const auto& ts) {
156-
pt.t = static_cast<uint32_t>(ts); }
157-
);
158-
}
159-
continue;
147+
if (organized) {
148+
cloud.is_dense &= xyz.isNaN().any();
160149
} else {
161-
if (!organized) cloud.points.emplace_back();
150+
if (xyz.isNaN().any())
151+
continue;
152+
else
153+
cloud.points.emplace_back();
162154
}
163155

164156

0 commit comments

Comments
 (0)