MCPcopy Create free account
hub / github.com/EdwardLiuyc/StaticMapping / pointcloud_callback

Function pointcloud_callback

ros_node/static_mapping_node.cpp:60–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58constexpr char kMapFrameId[] = "/map";
59
60void pointcloud_callback(const sensor_msgs::PointCloud2::ConstPtr& msg) {
61 pcl::PCLPointCloud2 pcl_pc2;
62 pcl_conversions::toPCL(*msg, pcl_pc2);
63 MapBuilder::PointCloudPtr incoming_cloud(new MapBuilder::PointCloudType);
64 pcl::fromPCLPointCloud2(pcl_pc2, *incoming_cloud);
65
66 std::vector<int> inliers; // no use, just for the function
67 pcl::removeNaNFromPointCloud(*incoming_cloud, *incoming_cloud, inliers);
68 map_builder->InsertPointcloudMsg(incoming_cloud);
69}
70
71void imu_callback(const sensor_msgs::Imu& imu_msg) {
72 ImuMsg::Ptr incomming_imu(new ImuMsg);

Callers 1

mainFunction · 0.85

Calls 1

InsertPointcloudMsgMethod · 0.80

Tested by

no test coverage detected