Error launching Find Object

Posted by gian on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Error-launching-Find-Object-tp7098.html

Hi Mathieu,

I am trying to install your find object

The process I have followed is
- rebuilt opencv and  opencv_contrib
- built apriltags_ros
- rebuilt rtabmap and rtabmap_ros
copied from

demo_find_object.launch

the following lines to put in my rtabmap.launch

 <!-- Find-Object -->
  <node name="find_object_3d" pkg="find_object_2d" type="find_object_2d" output="screen">
    <param name="gui"             value="true" type="bool"/>
    <param name="settings_path"   value="$(find rtabmap_ros)/launch/config/find_object.ini" type="str"/>
    <param name="subscribe_depth" value="true" type="bool"/>
    <param name="objects_path"    value="$(find rtabmap_ros)/launch/data/books" type="str"/>
		
    <remap from="rgb/image_rect_color"         to="/camera/data_throttled_image"/>
    <remap from="depth_registered/image_raw"   to="/camera/data_throttled_image_depth"/>
    <remap from="depth_registered/camera_info" to="/camera/data_throttled_camera_info"/>

    <param name="rgb/image_transport"              type="string" value="compressed"/>
    <param name="depth_registered/image_transport" type="string" value="compressedDepth"/>
  </node>
  
  <!-- Save objects to database example -->
  <node if="$(arg save_objects)" name="save_objects_example" pkg="rtabmap_ros" type="save_objects_example" output="screen">
    <remap from="mapData" to="/rtabmap/mapData"/>
    <param name="frame_id" value="base_footprint"/>
  </node>
  
  <!-- Convert objects to tags -->
  <node if="$(arg save_objects_as_landmarks)" name="objects_to_tags" pkg="rtabmap_ros" type="objects_to_tags.py" output="screen">
    <remap from="tag_detections" to="/rtabmap/tag_detections"/>
    <param name="distance_max" value="2.0"/>
  </node>


but at startup I find the following errors :

Traceback (most recent call last):
  File "/home/mluser/catkin_ws/src/rtabmap_ros/scripts/objects_to_tags.py", line 3, in <module>
    from apriltag_ros.msg import AprilTagDetectionArray
ImportError: No module named apriltag_ros.msg

[ INFO] (2020-10-22 22:51:57.069) 336 descriptors extracted from object 4 (in 109 ms)
[ INFO] (2020-10-22 22:51:57.244) 397 descriptors extracted from object 5 (in 166 ms)
[objects_to_tags-5] process has died [pid 27292, exit code 1, cmd /home/mluser/catkin_ws/src/rtabmap_ros/scripts/objects_to_tags.py tag_detections:=/rtabmap/tag_detections __name:=objects_to_tags __log:=/home/mluser/.ros/log/7c39050c-14a6-11eb-9dbf-0013eff157b8/objects_to_tags-5.log].
log file: /home/mluser/.ros/log/7c39050c-14a6-11eb-9dbf-0013eff157b8/objects_to_tags-5*.log
[ INFO] (2020-10-22 22:51:57.376) 189 descriptors extracted from object 6 (in 129 ms)
[ INFO] (2020-10-22 22:51:57.454) 147 descriptors extracted from object 7 (in 77 ms)
[ INFO] [1603399917.526940524]: Starting node...
[ INFO] (2020-10-22 22:51:57.573) 298 descriptors extracted from object 8 (in 116 ms)
[ INFO] (2020-10-22 22:51:57.573) Features extraction from 5 objects... done! (635 ms)
[ INFO] (2020-10-22 22:51:57.574) Updating vocabulary with 5 objects and 1367 descriptors...
[ INFO] (2020-10-22 22:51:57.574) Updating global descriptors matrix: Objects=5, total descri

installing apriltag from binaries , the problem solves

 apt-get install ros-melodic-apriltag-ros

could you advice on what is missing ?

Thanks,
gian