Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosrun image_view #42

Open
5aou opened this issue Jul 2, 2015 · 32 comments
Open

rosrun image_view #42

5aou opened this issue Jul 2, 2015 · 32 comments

Comments

@5aou
Copy link

5aou commented Jul 2, 2015

Hi all,
I had a black window when I did:
rosrun image_view image_view image:=/ORB_SLAM/Frame _autosize:=true, any suggestion please.
PS: I'm using a Logitech camera. My frames.pdf contains "no tf data recieved".
Thank you a lot.

@Po-Jen
Copy link

Po-Jen commented Jul 3, 2015

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.

@5aou
Copy link
Author

5aou commented Jul 6, 2015

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 :
capture du 2015-07-06 16 08 34
Thank you again.

@Po-Jen
Copy link

Po-Jen commented Jul 6, 2015

Can you check if /camera/image_raw correctly shows the image in Rviz?

@5aou
Copy link
Author

5aou commented Jul 6, 2015

How to do this please ?

@Po-Jen
Copy link

Po-Jen commented Jul 6, 2015

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

@5aou
Copy link
Author

5aou commented Jul 6, 2015

I don't find the topic /camera/image_raw !!

2
How can I solve this ? can this be caused by the camera ? (I'm using a logitech)

@Po-Jen
Copy link

Po-Jen commented Jul 6, 2015

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.

@5aou
Copy link
Author

5aou commented Jul 7, 2015

I didn't find it , I have just /ORB_SLAM/Frame as a choice !

@Po-Jen
Copy link

Po-Jen commented Jul 7, 2015

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/

@5aou
Copy link
Author

5aou commented Jul 7, 2015

OK,thank you a lot for you help, I'll post my issue there then.

@5aou
Copy link
Author

5aou commented Jul 7, 2015

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
??

@Po-Jen
Copy link

Po-Jen commented Jul 7, 2015

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.

@5aou
Copy link
Author

5aou commented Jul 8, 2015

this is what I get :
capture du 2015-07-08 11 42 35
(!!)

@Po-Jen
Copy link

Po-Jen commented Jul 8, 2015

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?

@5aou
Copy link
Author

5aou commented Jul 8, 2015

I don't know how to do that, I'm really lost between the lines of ros tutorials....

@5aou
Copy link
Author

5aou commented Jul 8, 2015

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...

@jwcrawley
Copy link

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.

@5aou
Copy link
Author

5aou commented Jul 8, 2015

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 !
4

@jwcrawley
Copy link

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.

@5aou
Copy link
Author

5aou commented Jul 9, 2015

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

@5aou
Copy link
Author

5aou commented Jul 10, 2015

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.

@5aou 5aou mentioned this issue Jul 23, 2015
@bjornph
Copy link

bjornph commented Jul 24, 2015

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

@5aou
Copy link
Author

5aou commented Jul 29, 2015

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".

@ldhl103
Copy link

ldhl103 commented Sep 8, 2015

I think I met the same problem as 5aou met....

cam

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!

@mairasaboia
Copy link

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.

orb_fail

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

@mhzaki
Copy link

mhzaki commented Dec 29, 2015

Hello!
did you resolve this problem ? because i have the same one and i don't know how fix it ..!!
please help me.

@5aou
Copy link
Author

5aou commented Dec 29, 2015

Hi, unfortunately I didn't resolve it. Sorry.

@mhzaki
Copy link

mhzaki commented Dec 31, 2015

Hi
Ok sorry and thank you ! if i find a solution I will tel you ...
bye.

@5aou
Copy link
Author

5aou commented Jan 1, 2016

Ok that'll be noce.

@ghost
Copy link

ghost commented Apr 11, 2016

@jwcrawley This work for me thanks to your suggestion!

@tahmine-iaun
Copy link

@jwcrawley
hi what kind of usb cam module you used?

@tahmine-iaun
Copy link

image
@jwcrawley i use a webcam to get images but i got this msg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants