Skip to content

Commit 225a347

Browse files
authored
Merge pull request #59 from AutoModality/SENSOR_PROXIMITY_TOPIC_FIX
fix: am_topics.cpp fix for SENSOR_PROXIMITY
2 parents 37f9617 + ad3505c commit 225a347

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

include/am_utils/point_types.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ struct PointXYZIR
1818
EIGEN_MAKE_ALIGNED_OPERATOR_NEW // make sure our new allocators are aligned
1919
} EIGEN_ALIGN16; // enforce SSE padding for correct memory alignment
2020

21+
22+
struct PointXYZIRNormal
23+
{
24+
PCL_ADD_POINT4D; // preferred way of adding a XYZ+padding
25+
PCL_ADD_UNION_NORMAL4D;
26+
float intensity;
27+
float range;
28+
EIGEN_MAKE_ALIGNED_OPERATOR_NEW // make sure our new allocators are aligned
29+
} EIGEN_ALIGN16; // enforce SSE padding for correct memory alignment
30+
2131
}
2232

2333
POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZIR,
@@ -28,4 +38,15 @@ POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZIR,
2838
(float, range, range)
2939
)
3040

41+
POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZIRNormal,
42+
(float, x, x)
43+
(float, y, y)
44+
(float, z, z)
45+
(float, normal_x, normal_x)
46+
(float, normal_y, normal_y)
47+
(float, normal_z, normal_z)
48+
(float, intensity, intensity)
49+
(float, range, range)
50+
)
51+
3152
#endif /*AM_UTILS_INCLUDE_AM_UTILS_POINT_TYPE_H_*/

include/vb_util_lib/topics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class am_topics
9090
static constexpr char SENSOR_DISTANCE_AGL_LW[] = "/sensor/distance/agl_lw";
9191
static constexpr char SENSOR_DISTANCE_DISTANCES_LW20[] = "/sensor/distance/distances_lw20";
9292

93-
static constexpr char SENSOR_PROXIMITY[] = "/sensor/proximity";
93+
static constexpr char SENSOR_PROXIMITY[] = "/sensor/proximity";
9494

9595
//dji vision topics generated by dji_vision nodes(raw and rectified for both ImageTransport and SharedMemory)
9696
//image_transport

src/vb_util_lib/topics.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ constexpr char am_topics::SENSOR_DISTANCE_AGL[];
8484
constexpr char am_topics::SENSOR_DISTANCE_AGL_LW[];
8585
constexpr char am_topics::SENSOR_DISTANCE_DISTANCES_LW20[];
8686

87+
constexpr char am_topics::SENSOR_PROXIMITY[];
88+
8789
constexpr char am_topics::STATUS_CEIL[];
8890
constexpr char am_topics::STATUS_CORR[];
8991
constexpr char am_topics::STATUS_LIDAR[];

0 commit comments

Comments
 (0)