How to execute with RTABMAP+Realsense+ORB_SLAM 2

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

How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
Build of RTAB-Map incorporating ORBSLAM2 succeeded referring to past threads.
The procedure is as follows
1.Export ORB_SLAM2_ROOT_DIR = / home / user / ORB_SLAM2 to .bashrc
2.cmake -DWITH_G2O = OFF in the build directory ..
3.make

It is the execution method,
Execute the following on Terminal 1
roslaunch realsense2_camera rs_aligned_depth.launch
Execute the following on Terminal 2
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start --Odom/Strategy 5 --OdomORBSLAM2/VocPath \"/home/user/catkin_ws/ORB_SLAM2/Vocabulary/ORBvoc.txt\"" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info

The following error was displayed.
[ERROR] (2019-04-22 17:02:44.037) OdometryORBSLAM2.cpp:1026::computeTransform() RTAB-Map is not built with ORB_SLAM2 support! Select another visual odometry approach.

Please tell me what kind of cause is considered?
Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

matlabbe
Administrator
Looks like rtabmap library is not built with ORB_SLAM2. Make sure at the end of cmake status that "With ORB_SLAM2=ON".
$ cd rtabmap/build
$ cmake ..

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

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
Thank you for your reply.

The cmake sutatus is "With ORB_SLAM2 = ON" as shown in the attached image.

Please let me know if there are other confirmation items.

I look forward to your response.

Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

matlabbe
Administrator
Is rtabmap_ros built against this RTAB-Map version? Or the wrong rtabmap_ros version is started. Make sure you uninstalled the binaries. When you launch rtabmap_ros, can you post the log output?
Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
You’ve really helped me out here. Thanks so much!

I reinstalled RealSense_ros again.
Although RealSense has been rented and final confirmation has not been made,
the error when there is no RealSense connection has been eliminated.
Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
In reply to this post by matlabbe
Hi,matlabbe

I connected RealSense and executed it.
The same error as the previous one was output as shown below.

[ERROR] (2019-05-14 16:10:14.218) OdometryORBSLAM2.cpp:1026::computeTransform() RTAB-Map is not built with ORB_SLAM2 support! Select another visual odometry approach.
[ INFO] [1557817814.218247383]: Odom: quality=0, std dev=0.000000m|0.000000rad, update time=0.000092s
[ WARN] [1557817814.252151418]: Could not get transform from odom to camera_link after 0.200000 seconds (for stamp=1557817814.012682)! Error="canTransform: target_frame odom does not exist.. canTransform returned after 0.202204 timeout was 0.2.".
[ERROR] (2019-05-14 16:10:14.257) OdometryORBSLAM2.cpp:1026::computeTransform() RTAB-Map is not built with ORB_SLAM2 support! Select another visual odometry approach.
[ INFO] [1557817814.257554035]: Odom: quality=0, std dev=0.000000m|0.000000rad, update time=0.000093s
[ERROR] (2019-05-14 16:10:14.286) OdometryORBSLAM2.cpp:1026::computeTransform() RTAB-Map is not built with ORB_SLAM2 support! Select another visual odometry approach.

rtabmap_ros is installed as follows.
cd ~ / catkin_ws
git clone https://github.com/introlab/rtabmap_ros.git src / rtabmap_ros
catkin_make -j1
How do I check the version of rtabmap_ros?
Send log of rtabmap_ros. (rosout.log).

Many thanks,
koba
Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

matlabbe
Administrator
rtabmap_ros doesn't seem to link on the correct rtabmap version. Do you have multiple rtabmap versions installed?

What is the output of:
$ ldd ~/catkin_ws/devel/lib/librtabmap_ros.so | grep rtabmap
Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
Thank you for your reply.

As you wrote I seemed to have installed multiple rtabmap_ros versions.
I removed the binary rtabmap_ros, built the source version again and installed it.
At that time, another error below was output.

[rtabmap / rgbd_odometry-1] process has died [pid 16775, exit code-11, cmd / home / koba / catkin_ws / devel / lib / rtabmap_ros / rgbd_odometry --delete_db_on_start --Odom / Strategy 5 --OdomORBSLAM2 / VocPath / home /koba/ros_dev/ORB_SLAM2/Vocabulary/ORBvoc.txt rgb / image: = / camera / color / image_raw depth / image: = / camera / aligned_depth_to_color / image_raw rgb / camera_info: = / camera / color / camera_info rgbd_image: = rgbd_image_relay odom : = odom __name: = rg bd odometry __ log: = /home/koba/.ros/ log / 9c8 f 988 a-7 785-11 e 9-b 806-a 45 e 60 ba 8 e af / r tab map-rg bd _ o odometry-1. log].
log file: /home/koba/.ros/log/9c8f988a-7785-11e9-b806-a45e60ba8eaf/rtabmap-rgbd_odometry-1*.log

Please tell me what kind of cause is considered?

What is the output of:
$ ldd ~/catkin_ws/devel/lib/librtabmap_ros.so | grep rtabmap

I will also send you this result.
$ ldd ~ / catkin_ws / devel / lib / librtabmap_ros.so | grep rtabmap
librtabmap_core.so.0.19 => /usr/local/lib/librtabmap_core.so.0.19 (0x00007f6b11a83000)
librtabmap_utilite.so.0.19 => /usr/local/lib/librtabmap_utilite.so.0.19 (0x00007f6b11862000)

Many thanks,
koba
Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

matlabbe
Administrator
Hi,

You could launch rgbd_odometry node in gdb to see more info on "backtrace" of what caused the crash. This kind of crash is often related to a mix of libraries (depending on Eigen) built or not with -march=native (e.g., PCL is built without -march=native and ORB_SLAM2 is built with -march=native). Looking at this docker file showing how libraries have been built for the JFR paper, there is a patch to apply to ORB_SLAM2 to disable -march=native. Try rebuilding ORB_SLAM2 with this patch.

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

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
Hi matlabbe,

Thank you for your answer.

By applying the patch you gave me, the error did not appear.
I'm really grateful for your help.

However, I am concerned about follows behavior.

The following is the execution procedure.

Terminal 1
roslaunch realsense2_camera rs_aligned_depth.launch

Terminal 2
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="-delete_db_on_start" depth_topic:=/ camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info

The console on terminal 2 will display a message as updated on ORB-SLAM2 as shown below.

[INFO] [1558421434.471534613]: Update odorometry parameter "Odom / Strategy" = "5" from arguments
[INFO] [1558421434.471685077]: Update odorometry parameter "OdomORBSLAM2 / VocPath" = "/ home / koba / ros_dev / ORB_SLAM2 / Vocabulary / ORBvoc.txt" from arguments
[WARN] (2019-05-21 15: 50: 34.900) OdometryORBSLAM2.cpp: 557 :: ORBSLAM2System () Loading ORB Vocabulary: "/home/koba/ros_dev/ORB_SLAM2/Vocabulary/ORBvoc.txt". This could take a while ...
[INFO] [1558421435.353893611]: Reading parameters from the ROS server ...
[INFO] [1558421435.472238449]: Update RTAB-Map parameter "Odom / Strategy" = "5" from arguments
[INFO] [1558421435.472295781]: Update RTAB-Map parameter "OdomORBSLAM2 / VocPath" = "/ home / koba / ros_dev / ORB_SLAM2 / Vocabulary / ORBvoc.txt" from arguments

When I display the Preferences screen of RTAB-Map, Odometry strategy is set to "Frame to Map".

Please tell me what kind of cause is considered?

Many Thanks,
koba
Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

matlabbe
Administrator
Hi,

The odometry panel is not used in ROS (panel is disabled and odometry parameters are not read), so the values you see are the default ones. The parameters used by rgbd_odometry node are the ones set in the launch file, rtabmapviz cannot change them or read them. In your case, ORB_SLAM2 seems correctly used for odometry:
OdometryORBSLAM2.cpp: 557 :: ORBSLAM2System () Loading ORB Vocabulary...

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

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
Hi matlabbe,

Thank you for your quick response.

I understand that ORB_SLAM2 seems to be used. thank you very much.

It is a screen of the odometry of ORB_SLAM2, but the size of the point is large. Is this a feature of ORB_SLAM2?

RTAB-Map incorporating ORB_SLAM2


Default RTAB-Map


Many Thanks,
koba

Reply | Threaded
Open this post in threaded view
|

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

matlabbe
Administrator
Yes, it is normal. ORB_SLAM2 is using ORB features, which have different sizes. You can change their transparency or fix their size for convenience using the corresponding options in the right-click menu.

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

Re: How to execute with RTABMAP+Realsense+ORB_SLAM 2

koba
Hi Mathieu,

Thank you for your quick reply.
I am glad to confirm that it has changed to Odometry of ORB-SLAM2.

I'm really grateful for your help.
Many Thanks,
koba