raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.37k stars 4.69k forks source link

Starting ROS node for Monocular camera #611

Open ujur007 opened 6 years ago

ujur007 commented 6 years ago

I have multiple problems while processing live input of Monocular camera using ROS and SLAM2 library 1st issue I always have to export ORB_SLAM2 path when I start a new session of bash using export command then only I can find ORB-SLAM2 package.(see the code below)

ujjval@ujjval-VPCEH18FG:~$ rospack find ORB_SLAM2 [rospack] Error: package 'ORB_SLAM2' not found ujjval@ujjval-VPCEH18FG:~$ export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/ujjval/ORB_SLAM2 ujjval@ujjval-VPCEH18FG:~$ rospack find ORB_SLAM2/home/ujjval/ORB_SLAM2/Examples/ROS/ORB_SLAM2 2nd Issue

when I do rosrun with Vocabulary and settings file provided I don't get any output until I press (Ctrl+X),(Ctrl+X) and (Cntr+C) then the slam starts with Waiting for images message but no camera video.

`ujjval@ujjval-VPCEH18FG:~$ rosrun ORB_SLAM2 Mono /home/ujjval/ORB_SLAM2/Vocabulary/ORBvoc.txt /home/ujjval/ORB_SLAM2/Examples/Monocular/TUM1.yaml [ERROR] [1531064871.417644383]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying... ^X^X^C ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza. This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Camera Parameters:

ORB Extractor Parameters:

ArifSohaib commented 6 years ago

Yes. I just installed it tonight and I am facing the second issue. I was thinking it might need one of the mentioned datasets to load the images but I haven't tried it yet. For the first one you just need to add the export command to the end of your .bashrc file.

ujur007 commented 6 years ago

I have already done adding that in My .bashrc file... Also I have sourced it!!

ujur007 commented 6 years ago

For Stereo I saw the example that it needs one of the ROS bag files. but for Mono I don t think it is so. Though I tried providing the cammand with image sequence but it did't seem to work.

pankhurivanjani commented 5 years ago

I am also facing this similar issue.. did anyone solved it?

ss26 commented 4 years ago

I have found that adding the ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH} line as the last line in ~./bashrc works, as it sources properly in a new terminal.