Comments (32)
You need a camera to output frames into the input for ORB-SLAM.
I used usb_cam module to get the camera data. However, usb_cam sends camera data to /usb_cam/image_raw and we need it to put data into /camera/image_raw
to see if your camera works, only need to run in one terminal:
rosrun usb_cam usb_cam_node
And the viewer in another terminal:
rosrun image_viewer image_viewer image:=/usb_cam/image_raw
If the above doesn't work, you have a camera that doesn't work properly. Check it in Cheese before continuing. Check the video device and the available resolutions.
Now, for changing resolutions for getting a better image, it's simpler to make a roslaunch file (go read $ROS_PACKAGE_DIR/ORB_SLAM/ExampleGroovyHydro.launch ) and add in the following for the first node:
<node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video0" />
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="yuyv" />
<param name="camera_frame_id" value="camera" />
<param name="io_method" value="mmap"/>
<remap from="/usb_cam/image_raw" to="/camera/image_raw" />
</node>
You will have to modify the appropriate settings to set it up for your system. If you have multiple cameras, change /dev/ appropriately.
Now run the launch file by 'roslaunch ExampleGroovyHydro.launch' . It should spin up the camera, xViz as well as a video window that first reports something like 'loading definitions'. It should load, and then show you video soon after. You're up.
Now, after playing with it, and investigating the settings, I also made a change in Data/Settings.yaml . I changed "UseMotionModel" to 0 . I'm still investigating the other settings, and how they affect the result.
from orb_slam.
There's no need to view image in image_view, I also have black window but I can see the map in Rviz.
Make sure your image is published to /camera/image_raw, then move your camera so that map can be initialized and viewed in Rviz.
from orb_slam.
Hi again,thank you a lot for your response,apparently my image exists :
rostopic list
/ORB_SLAM/Frame
/ORB_SLAM/Map
/camera/image_raw
/clicked_point
/initialpose
/move_base_simple/goal
/rosout
/rosout_agg
/tf
/tf_static
but when I moved the camera I have no results,I have this :
Thank you again.
from orb_slam.
Can you check if /camera/image_raw correctly shows the image in Rviz?
from orb_slam.
How to do this please ?
from orb_slam.
Add a new display, and choose Image. After that, choose /camera/image_raw to be the topic showed.
http://wiki.ros.org/rviz/UserGuide#Adding_a_new_display
from orb_slam.
I don't find the topic /camera/image_raw !!
How can I solve this ? can this be caused by the camera ? (I'm using a logitech)
from orb_slam.
In the image you just posted, you can see that under Image, there's a row called "Image Topic" (right above the "Transport Hint"). Click on the blank space above "raw" and choose /camera/image_raw.
from orb_slam.
I didn't find it , I have just /ORB_SLAM/Frame as a choice !
from orb_slam.
OK, that's the problem. You should check why your camera driver does not publish image to /camera/image_raw. If there's no image published to this topic, ORB_SLAM as a subscriber, cannot build map since there's no input.
This should not be hard, leverage ROS answer.
http://answers.ros.org/questions/
from orb_slam.
OK,thank you a lot for you help, I'll post my issue there then.
from orb_slam.
re, why it's shown here : rostopic list
/ORB_SLAM/Frame
/ORB_SLAM/Map
/camera/image_raw
/clicked_point
/initialpose
/move_base_simple/goal
/rosout
/rosout_agg
/tf
/tf_static
??
from orb_slam.
It's strange to me too. I saw you have /camera/image_raw in rostopic list, so I let you to check the content in Rviz.
Maybe you can use rqt to see which node publish this topic, and use rostopic echo /camera/image_raw
to check the content.
from orb_slam.
from orb_slam.
I suggest yo to learn some basic ROS usage, you didn't change the setting in rqt to show all topics. I said "use rqt to see which node publish this topic", but since you didn't show topics, we'll not get which node publish /camera/image_raw.
BTW, you didn't even start a driver node, how can ORB_SLAM get image?
from orb_slam.
I don't know how to do that, I'm really lost between the lines of ros tutorials....
from orb_slam.
I forget to tell you that I changed the settings in rqt but the results don't change.... Can you tell me please how can I start a driver node, I searched / net but I didn't find how to do it...
from orb_slam.
you saved my life, thank you a lot , it works. But I have always this error : Fixed Frame [map] does not exist, do you encounter the same error ? I don't know what is the cause !
from orb_slam.
Yes. You'll get that until you start generating the map.
You'll see a b/w image of your webcam with green lines. Start moving around, usually by walking forward and back. Don't start by turning in place. Once you do enough frames, it'll then switch from lines to little squares showing keypoint mappings. That's when you're starting to build the 3d map for the SLAM.
And that error you noted will go away.
from orb_slam.
thank you a lot for your explanation, how much time it takes to get the frames ?,because it doesn't work for me...!!!
PS : I don't see a b/w image of the webcam with green lines.
4
from orb_slam.
re, can you tell me please how do you chose "Fixed Frame" in Global Options/ RViz, because I noticed that sometimes I have "map" and others I have "ORB_SLAM/Camera" !! thing that I find weird
PS: Can you please give me some easy tutorials on ROS,that are related to all that,because I'm new in SLAM and ROS.
Thank you a lot.
from orb_slam.
See the author's youtube channel for some successful datasets: https://www.youtube.com/channel/UC_jh6pkpTd3movgveqdILuQ
I would suggest you try to get the example sequence to run first:
https://github.com/raulmur/ORB_SLAM#5-example-sequence
Once you get this working, make a copy of the file Data/Settings.yaml and use your own camera calibration settings here. fx,fy,cx,cy and lens distortion parameters. To launch this settings file, make a copy of the orb slam launch file under launch/ folder. Here you have to so you point to your own settings file and also remap fix remap: if you use the usb_cam as jwcrawley suggested, then it will be <remap from="/camera/image_raw" to="/usb_cam/image_raw />
If you are serious about using ORB_SLAM and/or other algorithms for SLAM purpose then I recommend you to learn the basics of both SLAM and ROS. Depending on your background this might take some time, but well worth investing time as otherwise you'll have a bad time.
SLAM:
http://wiki.ros.org/ROS/Tutorials
Computer Vision/SLAM
This is a nice introduction to history of monocular SLAM, at least the first 25 mins are well worth watching: http://videolectures.net/bmvc2012_davison_scene_perception/
Visual SLAM introduction slides:
http://frc.ri.cmu.edu/~kaess/vslam_cvpr14/
If you are completely new to Computer Vision, please see:
http://szeliski.org/Book/
And an introduction to CV for this purpose, such as Multiple view geometry lessons:
https://www.youtube.com/watch?v=RDkwklFGMfo&list=PLTBdjV_4f-EJn6udZ34tht9EVIW7lbeo4&index=1
from orb_slam.
Hi, thank you a lot for your precious help, the example works well,I did all the changes but it didn't work.
PS: I don't understand this part of your answer "To launch this settings file, make a copy of the orb slam launch file under launch/ folder. Here you have to so you point to your own settings file and also remap fix remap: if you use the usb_cam as jwcrawley suggested, then it will be http://wiki.ros.org/ROS/Tutorials
Computer Vision/SLAM".
from orb_slam.
I think I met the same problem as 5aou met....
I can use usb cam open my cam , and roslaunch ExampleGroovyHydro.launch
But I don't see any map when I move my camera.
I think it seems that I don't publish to camera/image_raw successfully......
how do I solve this problem?
I will appreciate the help
Thanks!
from orb_slam.
I have a similar issue. I can see the b/w image of my webcam with green lines but they never change to little squares as aforementioned by @jwcrawley . I have walked back and forth with the camera in a highly illuminated environment but the method refused to initialize as one can see in the image below.
My camera is a PlayStation eye camera. The data that I get from opencv calibration is:
image_width: 640
image_height: 480
camera_name: narrow_stereo
camera_matrix:
rows: 3
cols: 3
data: [688.701702, 0, 364.134285, 0, 692.843542, 158.226495, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.027262, -0.168572, -0.013315, -0.001805, 0]
rectification_matrix:
rows: 3
cols: 3
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
rows: 3
cols: 4
data: [677.89978, 0, 364.943701, 0, 0, 676.806702, 153.303095, 0, 0, 0, 1, 0]
Do I need to use some rectification mechanism?
Can someone help me going through this problem?
Thanks, mss
from orb_slam.
Hello!
did you resolve this problem ? because i have the same one and i don't know how fix it ..!!
please help me.
from orb_slam.
Hi, unfortunately I didn't resolve it. Sorry.
from orb_slam.
Hi
Ok sorry and thank you ! if i find a solution I will tel you ...
bye.
from orb_slam.
Ok that'll be noce.
from orb_slam.
@jwcrawley This work for me thanks to your suggestion!
from orb_slam.
@jwcrawley
hi what kind of usb cam module you used?
from orb_slam.
@jwcrawley i use a webcam to get images but i got this msg
from orb_slam.
Related Issues (20)
- Extracting depth images using rosrun command through realsense R200 camera.
- problem with roslaunch ExampleGroovyOrNewer.launch
- ORB_SLAM failure on indigo ubuntu14.04
- Can I run this on mobile device
- How to extract x-y position of ORB Keypoints?
- final problem in build when running make command. HOT 6
- Configuration for using ORB_SLAM with high resolution 12MP images.
- Orientation of Axis in ORB
- CMake Error HOT 2
- Superpoint front-end HOT 1
- Validate ORB SLAM with TUM Dataset
- ../Thirdparty/DBoW2/lib/libDBoW2.dylib: file not recognized: File format not recognized HOT 1
- Only SfM HOT 1
- True scale tacking and mapping using downward looking camera and rangefinder
- Using /usb_cam/image_raw topic instead of camera/image_raw
- Function to Reset
- Error on final build of ORB_SLAM HOT 2
- Keyframe Tracking but map not moving
- Executable file not found: cannot launch node of type [ORB_SLAM/ORB_SLAM]
- left feature exctract
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orb_slam.