0
$\begingroup$

Rosanswers logo

Hi, Im working on Indigo. I'm trying to use the ethzasl_ptam package. When I ran roslaunch ptam cameracalibrator.launch nothing happened. I edited the launch file to say

<remap from="image" to="dev/video0/>

which I think should tell it to go to my webcam. Still nothing. Next I ran rosrun image_view image_view image:=/dev/video0 which also had no output. Then I ran rqt , and opened the image view topic, which has a fuzy looking screen which has nothing to do with my webcam.

How do I set any of these things to my webcam? Thanks


Originally posted by dshimano on ROS Answers with karma: 129 on 2015-06-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I got it to work. I was giving it a camera location, but it needs a video to be passed as a topic. I added <remap from="image" to="/image_raw_0" /> were image_raw_0 was being passed by a uvc camera node. I set it all up in a launch file:


<launch>
  <node pkg="uvc_camera" type="uvc_camera_node" name="uvc_camera" output="screen">
    <param name="width" type="int" value="640" />
    <param name="height" type="int" value="480" />
    <param name="fps" type="int" value="30" />
    <param name="frame" type="string" value="wide_stereo" />

    <param name="auto_focus" type="bool" value="False" />
    <param name="focus_absolute" type="int" value="0" />
    <!-- other supported params: auto_exposure, exposure_absolute, brightness, power_line_frequency -->

    <param name="device" type="string" value="/dev/video0" />
    <remap from="/image_raw" to="/image_raw_0"/>
    <param name="camera_info_url" type="string" value="file://$(find uvc_camera)/example.yaml" />
  </node>
  <node name="cameracalibrator" pkg="ptam" type="cameracalibrator" clear_params="true" output="screen" respawn="true">
    <remap from="image" to="/image_raw_0" />
    <remap from="pose" to="pose"/>
    <rosparam file="$(find ptam)/PtamFixParams.yaml"/>
  </node>
</launch>

Originally posted by dshimano with karma: 129 on 2015-06-09

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by mstock on 2015-06-14:
Having similar problems. Where do I put this .launch file and how do I run it? And do I need to run "roslaunch ptam cameracalibrator.launch" as well?

Comment by dshimano on 2015-07-01:
I just added this stuff to the existing cameracalibrater.launch.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.