[ros-users] Videre STOC Problem

Antons Rebguns anton at email.arizona.edu
Sun Feb 13 01:23:21 UTC 2011


Patrick,

> I'm using the latest revision 1188 and you are right again (of course!):
> the default image topic for disparity_view is just "image" (under
> /stereo/left) but I need image_mono or image_color.  So the following
> works for the color image (for example):
>
> $ rosrun videre_stereo_cam disparity_view stereo:=stereo image:=image_color

Good to hear!

> And yes again, CPU load is actually 75% for stereo_image_proc +
> videre_stereo_node when I run disparity_view at the same time (thereby
> subscribing to /stereo/disparity.)  (RViz pegs everything at 100%
> because I don't have a custom driver for the video card in this machine.)

So, STOC mode does use less CPU overall, right?

Anton

> On 02/12/2011 04:02 PM, Antons Rebguns wrote:
>> Patrick,
>>
>>> Success!  Thank you Anton--everything you said was bang on.  So now I
>>> can see the disparity map with stereo_view and the point cloud in RViz.
>>
>> Great! Glad to hear the camera works for you.
>>
>>>   Finally I can add a data point to Chris' original problem which is
>>> that I don't have the same problem--my raw images are fine with nothing
>>> weird in the lower third of the image.  However, I can also confirm
>>> Chris' observation that the videre_stereo_cam disparity_view node shows
>>> only blank windows for both the left and disparity images.  It makes no
>>> difference if I run the STOC or non-STOC launch files (with
>>> stereo_image_proc running alongside the non-STOC case).
>>
>> What revision are you using, I thought I fixed that in r1187? Did you
>> remap the image to the actual image coming from the camera? It prints
>> topics it is subscribing to, make sure these are correct.
>>
>>> BTW, I was surprised to see that running the STOC launch file
>>> (videre.launch) brought the CPU up to 31% whereas running the non-STOC
>>> launch file along with stereo_image_proc gave a total of only 10% CPU
>>> load for the pair of processes combined.  Shouldn't I expect less load
>>> for the STOC situation since the stereo processing is being done on the
>>> camera?  I'm running all of this on a 7-year-old HP Pavilion with a
>>> single-core AMD processor.
>>
>> Hmm, I highly doubt that the camera driver + stereo_image_proc takes
>> only 10% on a single core machine. stereo_image_proc doesn't do any
>> processing unless there are subscribes to the data it produces, e.g.
>> if you subscribe to point cloud topic, I would expect the load to be
>> much higher than 10%. I remember from my testing when I was writing
>> the driver, the STOC mode did use less CPU overall. Could you verify
>> that you are subscribing to the point cloud?
>>
>> Thanks,
>> Anton
>>
>>>
>>> On 02/12/2011 11:18 AM, Antons Rebguns wrote:
>>>> And reading the second part of your email more carefully, I see that
>>>> you already tried running in non-STOC mode :) Left and right shouldn't
>>>> be the same image, there's a slight offset that you should be able to
>>>> see if you put both images side by side. Try running stereo_image_proc
>>>> on those and see if you get proper point cloud.
>>>>
>>>> Anton
>>>>
>>>> On Sat, Feb 12, 2011 at 11:59 AM, Patrick Goebel<patrick at pirobot.org>    wrote:
>>>>> Great suggestion!  I can fire up videre_stereo_cam/launch/videre.launch
>>>>> without error (full startup messages listed below).  However (and
>>>>> perhaps this is related to the problems with smallv and coriander), I
>>>>> can only see the left image.  So running
>>>>>
>>>>> $ rosrun image_view ime_view image:=stereo/left/image_raw
>>>>>
>>>>> gives me an image but
>>>>>
>>>>> $ rosrun image_view ime_view image:=stereo/right/image_raw
>>>>>
>>>>> gives me a blank window.  I get both left and right images in Windows
>>>>> when running smallv.
>>>>>
>>>>> Running rostopic list gives:
>>>>>
>>>>> /diagnostics
>>>>> /rosout
>>>>> /rosout_agg
>>>>> /stereo/disparity
>>>>> /stereo/left/camera_info
>>>>> /stereo/left/image_color
>>>>> /stereo/left/image_color/compressed
>>>>> /stereo/left/image_color/theora
>>>>> /stereo/left/image_mono
>>>>> /stereo/left/image_mono/compressed
>>>>> /stereo/left/image_mono/theora
>>>>> /stereo/left/image_raw
>>>>> /stereo/left/image_raw/compressed
>>>>> /stereo/left/image_raw/theora
>>>>> /stereo/left/image_rect
>>>>> /stereo/left/image_rect/compressed
>>>>> /stereo/left/image_rect/theora
>>>>> /stereo/left/image_rect_color
>>>>> /stereo/left/image_rect_color/compressed
>>>>> /stereo/left/image_rect_color/theora
>>>>> /stereo/points
>>>>> /stereo/points2
>>>>> /stereo/videre_stereo_cam/parameter_descriptions
>>>>> /stereo/videre_stereo_cam/parameter_updates
>>>>>
>>>>> confirming only the left image is being published.
>>>>>
>>>>> So then I tried videre_non_stoc.launch and this time rostopic list shows:
>>>>>
>>>>> /diagnostics
>>>>> /rosout
>>>>> /rosout_agg
>>>>> /stereo/left/camera_info
>>>>> /stereo/left/image_raw
>>>>> /stereo/left/image_raw/compressed
>>>>> /stereo/left/image_raw/theora
>>>>> /stereo/right/camera_info
>>>>> /stereo/right/image_raw
>>>>> /stereo/right/image_raw/compressed
>>>>> /stereo/right/image_raw/theora
>>>>> /stereo/videre_stereo_cam/parameter_descriptions
>>>>> /stereo/videre_stereo_cam/parameter_updates
>>>>>
>>>>> And I get images for both left and right in image_view thought I'm not
>>>>> sure they aren't just the same image(?).
>>>>>
>>>>> --patrick
>>>>>
>>>>> P.S. Here are the startup messages when running videre.launch:
>>>>>
>>>>> started roslaunch server http://pi-ubuntu:33721/
>>>>>
>>>>> SUMMARY
>>>>> ========
>>>>>
>>>>> PARAMETERS
>>>>>    * /stereo/videre_stereo_cam/frame_id
>>>>>    * /stereo/videre_stereo_cam/fps
>>>>>    * /stereo/videre_stereo_cam/exposure_auto
>>>>>    * /stereo/videre_stereo_cam/videre_mode
>>>>>    * /stereo/videre_stereo_cam/gain_auto
>>>>>    * /stereo/videre_stereo_cam/brightness_auto
>>>>>    * /stereo/videre_stereo_cam/convert_to_color
>>>>>
>>>>> NODES
>>>>>     /stereo/
>>>>>       videre_stereo_cam (videre_stereo_cam/videre_stereo_node)
>>>>>
>>>>> ROS_MASTER_URI=http://pi-ubuntu:11311/
>>>>>
>>>>> core service [/rosout] found
>>>>> process[videre_stereo_cam-1]: started with pid [2693]
>>>>> [ INFO] [1297535349.547920863]: Resetting bus
>>>>> [ INFO] [1297535349.550777061]: Initializing camera, turning off ISO
>>>>> [ INFO] [1297535349.620761024]: [dcam] Videre camera, getting local params
>>>>> [ INFO] [1297535349.621693078]: [dcam] Camera firmware: 07.01
>>>>> [ INFO] [1297535349.622254601]: [dcam] Imager firmware: 0008
>>>>> [ INFO] [1297535349.622468767]: [Dcam] Found stereo device
>>>>> [ INFO] [1297535349.623208715]: [dcam] STOC version: 04.02
>>>>> [ INFO] [1297535349.624290434]: [dcam] STOC thresholds: 00010c0a
>>>>> [ INFO] [1297535349.925963168]: [dcam] Calibration, 1975 bytes
>>>>> [ INFO] [1297535349.928050938]: [dcam] Color device
>>>>> [ INFO] [1297535349.928625025]: [dcam] Feature register hi: d2800000
>>>>> [ INFO] [1297535349.929191015]: [dcam] Feature register lo: 00000000
>>>>> [ INFO] [1297535349.933219402]: [Dcam] Exposure min/max: [0,529]
>>>>> [ INFO] [1297535349.939681518]: [Dcam] Gain min/max: [0,48]
>>>>> [ INFO] [1297535349.944065080]: [Dcam] Brightness min/max: [0,255]
>>>>> [ INFO] [1297535349.946369249]: [Dcam] Whitebalance min/max: [0,30]
>>>>>
>>>>>
>>>>> [extractParams] Parameters:
>>>>>
>>>>> [dcam] SVS-type parameters
>>>>> [dcam] Disparity resolution: 1/16 pixel
>>>>> [dcam] Correlation window: 15
>>>>> [dcam] Prefilter window: 9
>>>>> [dcam] Number of disparities: 64
>>>>> [dcam] left camera matrix (K)
>>>>>    508.5466 0.0000 316.0090
>>>>>    0.0000 510.9624 240.5289
>>>>>    0.0000 0.0000 1.0000
>>>>>
>>>>> [dcam] left distortion vector (D)
>>>>>    -0.4300 0.2907 0.0000 0.0000 -0.1297
>>>>>
>>>>> [dcam] left rectification matrix (R)
>>>>>    0.9999 0.0019 -0.0109
>>>>>    -0.0020 1.0000 -0.0031
>>>>>    0.0109 0.0031 0.9999
>>>>>
>>>>> [dcam] left projection matrix (P)
>>>>>    515.0000 0.0000 321.6060 0.0000
>>>>>    0.0000 515.0000 227.1362 0.0000
>>>>>    0.0000 0.0000 1.0000 0.0000
>>>>>
>>>>> [dcam] right camera matrix (K)
>>>>>    511.9488 0.0000 298.7494
>>>>>    0.0000 514.7863 216.4977
>>>>>    0.0000 0.0000 1.0000
>>>>>
>>>>> [dcam] right distortion vector (D)
>>>>>    -0.4172 0.2647 0.0000 0.0000 -0.1200
>>>>>
>>>>> [dcam] right rectification matrix (R)
>>>>>    1.0000 0.0005 -0.0081
>>>>>    -0.0005 1.0000 0.0031
>>>>>    0.0081 -0.0031 1.0000
>>>>>
>>>>> [dcam] right projection matrix (P)
>>>>>    515.0000 0.0000 321.6060 -31.2624
>>>>>    0.0000 515.0000 227.1362 0.0000
>>>>>    0.0000 0.0000 1.0000 0.0000
>>>>>
>>>>> [dcam] Has rectification
>>>>>
>>>>>
>>>>> [dcam] External translation vector
>>>>>    -0.0607 -0.0000 0.0005
>>>>>
>>>>> [dcam] External rotation vector
>>>>>    0.0062 -0.0028 -0.0015
>>>>>
>>>>> [ INFO] [1297535350.228984827]: Connecting to camera with GUID
>>>>> 23930887758951554 [VIDERE_DESIGN MDS-STH]
>>>>> [ INFO] [1297535350.229400314]: Connected camera is a STOC device
>>>>> [ INFO] [1297535350.547844460]: Camera reconfigure request received,
>>>>> level 0xffffffff
>>>>> [ INFO] [1297535350.549813279]: Setting mode to disparity_raw
>>>>> [ INFO] [1297535350.549879176]: Color conversion from Bayer pattern is
>>>>> Enabled
>>>>> [ INFO] [1297535354.483589444]: Stereo camera's frame ID is
>>>>> /stereo_optical_frame
>>>>> [ INFO] [1297535354.483729336]: Setting Exposure to Auto setting
>>>>> [ INFO] [1297535354.483775129]: Setting Gain to Auto setting
>>>>> [ INFO] [1297535354.483817571]: Setting Brightness to Auto setting
>>>>> [ INFO] [1297535354.483859176]: Setting Whitebalance to Auto setting
>>>>> [ INFO] [1297535354.483900501]: Companding mode is Enabled
>>>>> [ INFO] [1297535354.483941547]: High Dynamic Range mode is Disabled
>>>>> [ INFO] [1297535354.634338543]: STOC: uniqueness threshold is set to 36
>>>>> [ INFO] [1297535354.634449116]: STOC: texture threshold is set to 30
>>>>> [ INFO] [1297535354.634493234]: STOC: speckle size is set to 100
>>>>> [ INFO] [1297535354.634535118]: STOC: speckle range is set to 10
>>>>> [ INFO] [1297535354.634576722]: STOC: horopter is set to 0
>>>>> [ INFO] [1297535354.634618327]: -------------------------------------------
>>>>> [ INFO] [1297535354.986294204]: Streaming...
>>>>>
>>>>>
>>>>>
>>>>> On 02/12/2011 10:20 AM, Antons Rebguns wrote:
>>>>>> Patrick,
>>>>>>
>>>>>> You could also try running the ROS driver videre_stereo_cam in
>>>>>> ua-ros-pkg. Just run roslaunch videre_stereo_cam videre.launch to run
>>>>>> the camera in stoc mode. I am not sure it's going to work since
>>>>>> neither coriander nor svs works, but you can give it a shot.
>>>>>>
>>>>>> Anton
>>>>>>
>>>>>> On Sat, Feb 12, 2011 at 11:03 AM, Patrick Goebel<patrick at pirobot.org>      wrote:
>>>>>>> It occurred to me that I have an old digital video camera that uses
>>>>>>> Firewire.  So I installed kino, plugged in the camera to the same
>>>>>>> Firewire port I've been using with the STOC camera and presto, I am able
>>>>>>> to control the camera and capture some video.
>>>>>>>
>>>>>>> So I'm wondering if my problem is not having the Videre driver installed
>>>>>>> correctly.  In fact, I'm not even sure what installing the driver might
>>>>>>> mean beyond what I did in the beginning which was:  I unpacked the
>>>>>>> original SVS tgz file into /home/patrick/bin/svs.  Then:
>>>>>>>
>>>>>>> $ export LD_LIBRARY_PATH=/home/patrick/bin/svs/bin:$LD_LIBRARY_PATH
>>>>>>> $ cd /usr/lib
>>>>>>> $ sudo ln -s libraw1394.so.11.0.1 libraw1394.so.8
>>>>>>> $ sudo ldconfig
>>>>>>>
>>>>>>> Is there something else I need to do to make sure the STOC driver is
>>>>>>> being accessed?
>>>>>>>
>>>>>>> --patrick
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 02/12/2011 09:10 AM, Patrick Goebel wrote:
>>>>>>>> Many thanks Anton and Jack!  Changing the permissions and group (video)
>>>>>>>> on /dev/raw1394 got me a little further but there is still a problem.
>>>>>>>> Coriander now comes up and shows "VIDERE_DESIGN MDS-STH" under the
>>>>>>>> Camera Select menu but the window is completely unresponsive--clicking
>>>>>>>> on tabs and buttons has no effect.  Typing Ctrl-C in the launching
>>>>>>>> terminal kills the coriander window but does not return the command
>>>>>>>> prompt and coriander is listed as a defunct process.  Also, trying to
>>>>>>>> run smallv simply hangs after issuing the command--no window ever
>>>>>>>> appears and neither Ctrl-C nor 'pkill -9 smallv' in another terminal can
>>>>>>>> kill it...
>>>>>>>>
>>>>>>>> Just to summarize:
>>>>>>>>
>>>>>>>> ls -l /dev/raw1394
>>>>>>>> crwxrwxrwx 1 root video 171, 0 2011-02-12 08:57 /dev/raw1394
>>>>>>>>
>>>>>>>> uid=1000(patrick) gid=1000(patrick)
>>>>>>>> groups=4(adm),6(disk),20(dialout),24(cdrom),44(video),46(plugdev),104(lpadmin),115(admin),120(sambashare),1000(patrick)
>>>>>>>>
>>>>>>>> ls -l /dev/video1394/
>>>>>>>> total 0
>>>>>>>> crwxrwxrwx+ 1 root video 171, 16 2011-02-12 08:57 0
>>>>>>>> crwxrwxrwx+ 1 root video 171, 17 2011-02-12 08:57 1
>>>>>>>>
>>>>>>>> Any other thoughts?
>>>>>>>>
>>>>>>>> --patrick
>>>>>>>>
>>>>>>>>
>>>>>>>> On 02/12/2011 08:46 AM, Antons Rebguns wrote:
>>>>>>>>> What I always have to do is set RW permissions on /dev/raw1394, I
>>>>>>>>> never had to touch /dev/video1394. After that everything usually works
>>>>>>>>> just fine.
>>>>>>>>>
>>>>>>>>> Anton
>>>>>>>>>
>>>>>>>>> On Sat, Feb 12, 2011 at 9:39 AM, Jack O'Quin<jack.oquin at gmail.com>         wrote:
>>>>>>>>>> On Sat, Feb 12, 2011 at 10:18 AM, Patrick Goebel<patrick at pirobot.org>         wrote:
>>>>>>>>>>
>>>>>>>>>>> I made sure I am a member of both the disk and video groups and I did a
>>>>>>>>>>> chmod 777 on dev/video1394/* so that ls -l dev/video1394/* gives:
>>>>>>>>>>>
>>>>>>>>>>> crwxrwxrwx+ 1 root video 171, 16 2011-02-12 07:59 0
>>>>>>>>>>> crwxrwxrwx+ 1 root video 171, 17 2011-02-12 07:59
>>>>>>>>>>
>>>>>>>>>> You probably need to do something similar for /dev/raw1394:
>>>>>>>>>>
>>>>>>>>>>       http://www.ros.org/wiki/camera1394/Troubleshooting#No_Bus_Access_Permissions
>>>>>>>>>> --
>>>>>>>>>>       joq
>>>>>>>>>> _______________________________________________
>>>>>>>>>> ros-users mailing list
>>>>>>>>>> ros-users at code.ros.org
>>>>>>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> ros-users mailing list
>>>>>>>>> ros-users at code.ros.org
>>>>>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>>>>> _______________________________________________
>>>>>>>> ros-users mailing list
>>>>>>>> ros-users at code.ros.org
>>>>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>>>> _______________________________________________
>>>>>>> ros-users mailing list
>>>>>>> ros-users at code.ros.org
>>>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>>>>
>>>>>> _______________________________________________
>>>>>> ros-users mailing list
>>>>>> ros-users at code.ros.org
>>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>> _______________________________________________
>>>>> ros-users mailing list
>>>>> ros-users at code.ros.org
>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>>
>>>> _______________________________________________
>>>> ros-users mailing list
>>>> ros-users at code.ros.org
>>>> https://code.ros.org/mailman/listinfo/ros-users
>>> _______________________________________________
>>> ros-users mailing list
>>> ros-users at code.ros.org
>>> https://code.ros.org/mailman/listinfo/ros-users
>>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list