hrnr / map-merge

ROS package for merging 3D maps
Other
36 stars 16 forks source link

Issue in merging octomaps (Input is Empty) #3

Open mzahana opened 4 years ago

mzahana commented 4 years ago

Hi. I am trying to merge two maps generated online using octomaps. I use the octomap_point_cloud_centers as the robot_map_topic. The map_merge node will eventually crash. Initially, I get

[DEBUG] [1587718924.857625329, 4961.870000000]: received map update
[DEBUG] [1587718924.861070997, 4961.874000000]: received map update
[DEBUG] [1587718925.630798058, 4962.626000000]: Map compositing started.

However, eventually I get the following errors after which the node crashes

[pcl::ShapeContext3DEstimation::compute] input_ is empty!
[pcl::ShapeContext3DEstimation::initCompute] Init failed.
[pcl::ShapeContext3DEstimation::initCompute] Init failed.
[pcl::ShapeContext3DEstimation::compute] input_ is empty!
[pcl::ShapeContext3DEstimation::initCompute] Init failed.
[pcl::ShapeContext3DEstimation::initCompute] Init failed.

It does this with all types of descriptors.

I have tried before to merge maps generated by rtabmap and was done successfully. However, it doesn't seem to work with octomap.

@hrnr Any help is appreciated.

Here is the launch file I am using in case it helps in debugging.

<launch>
    <!--
        Reference : http://wiki.ros.org/map_merge_3d
    -->
    <arg name="rtabmap" default="true"/>
    <arg name="octomap" default="false"/>

    <arg if="$(arg rtabmap)" name="robot_map_topic" value="cloud_map"/>
    <arg if="$(arg octomap)" name="robot_map_topic" value="octomap_point_cloud_centers"/>

    <group ns="map_merge">
        <node pkg="map_merge_3d" type="map_merge_node" respawn="false" name="map_merge_3d" output="screen">
            <param name="robot_map_topic" value="$(arg robot_map_topic)"/>
            <param name="robot_namespace" value=""/>
            <param name="merged_map_topic" value="map"/>
            <param name="world_frame" value="world"/>
            <param name="compositing_rate" value="1.0"/>
            <param name="discovery_rate" value="0.05"/>
            <param name="estimation_rate" value="0.01"/>
            <param name="publish_tf" value="true"/>
            <!-- and all the other map merging parameters -->
            <param name="resolution" value="0.05"/>
            <param name="descriptor_type" value="SHOT" /> <!--PFH, PFHRGB, FPFH, RSD, SHOT, SC3D -->
            <param name="matching_k" value="5" />
            <param name="confidence_threshold" value="0.0"/>
            <param name="output_resolution" value="0.05"/>
            <param name="estimation_method" value="MATCHING"/> <!-- MATCHING, SAC_IA-->
            <param name="keypoint_type" value="SIFT" /> <!-- HARRIS, SIFT-->
        </node>
    </group>
</launch>
15993217652 commented 3 years ago

hi ,mzahana ,can you solve it already? now I have the same problem with you.

Mighteeguy commented 2 years ago

@mzahana @15993217652 , do y'all know how to resolve this issue?