44 pcl_msgs::PointIndices
msg;
46 msg.indices = indices.indices;
55 if (a.length() > 0 && a[0] ==
'/') {
56 aa = a.substr(1, a.length() - 1);
62 if (b.length() > 0 && b[0] ==
'/') {
63 bb = b.substr(1, b.length() - 1);
71 bool isSameFrameId(
const std_msgs::Header& a,
const std_msgs::Header& b)
76 bool hasField(
const std::string& field_name,
const sensor_msgs::PointCloud2& msg)
78 for (
size_t i = 0; i < msg.fields.size(); i++) {
79 sensor_msgs::PointField field = msg.fields[i];
80 if (field.name == field_name) {
void publish(const boost::shared_ptr< M > &message) const
void publishPointIndices(ros::Publisher &pub, const pcl::PointIndices &indices, const std_msgs::Header &header)
Convert pcl::PointIndices to pcl_msgs::PointIndices and publish it with overriding header...
bool hasField(const std::string &field_name, const sensor_msgs::PointCloud2 &msg)
check if sensor_msgs/PointCloud2 message has the specified field.
bool isSameFrameId(const std::string &a, const std::string &b)
Return true if a and b are the same frame_id.