Error launching Find Object

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error launching Find Object

gian
This post was updated on .
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


Reply | Threaded
Open this post in threaded view
|

Re: Error launching Find Object

gian
Solved sourcing both the different workspace in which apriltags and rtabmap build  lay with the oprion ---extend , in order to connect them.
Only I have some problems with the topics
 Regards
gian
Reply | Threaded
Open this post in threaded view
|

Re: Error launching Find Object

gian
This post was updated on .
Hello Mathieu,

Following the indications in this   thread  I have launched rtabmap with find objects.
Only in rviz I cannot see the objects  markers in the map also if I have activated the markers on rviz.

Regards
gian
Reply | Threaded
Open this post in threaded view
|

Re: Error launching Find Object

matlabbe
Administrator
This post was updated on .
Hi,

I tried this example: http://official-rtab-map-forum.206.s1.nabble.com/Detected-Object-Location-Mark-on-RTABMAP-tp4571p4598.html

on the latest rtabmap code and it has a bug (introduced recently). I fixed what caused the error in this commit.

I've found another bug with the find-object's ini file not compatible with default OpenCV version on Ubuntu >=18.04. I fixed the crash in this commit.

This should work as expected:
$ roslaunch rtabmap_ros demo_find_object.launch save_objects:=true
$ rosbag play --clock demo_find_object.bag
Note that because SURF cannot be used by default, we are falling back on KAZE, which parameters have not been tuned for this example, so only 3 books can be detected.

If you cannot see any markers detected, check in the console if a node crashed. The commits above should fix the problems though.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Error launching Find Object

gian
Thank you Mathieu for your effort and help !
I will try
Cheers