ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ptam and cameracalibrator won't start [closed]

asked 2014-07-16 11:05:52 -0600

andreas.gerken gravatar image

Hi,

i'm trying to get ptam working but it doesn't start up. I use usb_cam and since it shouted that it had no calibrationfile i created one with the camera_calibrator node (not ptam). The resulted yaml file is in ~/.ros/camera_info/head_camera.yaml .

I tried to startup ptam with the launcher and just by running the node. Since running the Node resulted in

[ERROR] [1405509643.099105236]: Camera calibration is missing!

I thought perhaps i have to recalibrate it with the ptam cameracalibrator but that doesn't work either. For both launch files the console says that Gui is on but none of them starts.

For the ptam launch file i get

[FATAL] [1405526258.946873148]: ASSERTION FAILED
    file = /home/gerken/ROS/cat_workspace/src/ethzasl_ptam/ptam/src/System.cc
    line = 95
    cond = img->encoding == sensor_msgs::image_encodings::MONO8 && img->step == img->width

Could it be that i have to put the encoding to mono8 anyhow?

Camera Info is

---
header: 
  seq: 8394
  stamp: 
    secs: 1405526539
    nsecs: 828073023
  frame_id: head_camera
height: 480
width: 640
distortion_model: plumb_bob
D: [0.105716, -1.882404, -0.020112, 0.008704, 0.0]
K: [1043.949364, 0.0, 312.91979, 0.0, 1042.363345, 178.105619, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [1036.78418, 0.0, 314.804614, 0.0, 0.0, 1031.130981, 173.315955, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
---

ptam.launch is

<launch>
    <node name="ptam" pkg="ptam" type="ptam" clear_params="true" output="screen">
        <remap from="image" to="$(optenv IMAGE /usb_cam/image_raw)" />
        <remap from="pose" to="pose"/>
        <rosparam file="$(find ptam)/PtamFixParams.yaml"/>
    </node>
</launch>

I didn't change PtamFixValues.yaml as the with and the height of the picture is the default value.

Thanks for your Help!

Andreas

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by andreas.gerken
close date 2014-07-23 03:39:54.744880

Comments

What version of ROS are you running? That calibration missing error message has been a warning in camera_info_manager for years now.

joq gravatar image joq  ( 2014-07-16 11:43:24 -0600 )edit

Hi joq, sorry for the late answer i was on vacation. I'm running hydro and the errors come from that version too. Since ptam is only supported on groovy i tried to install it on another machine with the older version. It didn't work there either. Thanks Andreas

andreas.gerken gravatar image andreas.gerken  ( 2014-07-22 07:51:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-07-22 11:17:46 -0600

andreas.gerken gravatar image

I found the problem: Ptam only accepts monochrome images so i used "image_proc" to convert it. My launch file looks like this now:

<launch>
    <group name="cam_ptam">
        <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" />

        <node name="image_proc" pkg="image_proc" type="image_proc">
            <remap from="image_raw" to="usb_cam/image_raw" />
            <remap from="camera_info" to="usb_cam/camera_info" />
        </node>

        <node name="ptam" pkg="ptam" type="ptam" clear_params="true" output="screen">
            <remap from="image" to="image_mono" />
            <remap from="pose" to="pose"/>
            <rosparam file="$(find ptam)/PtamFixParams.yaml"/>
        </node>
    </group>
</launch>
edit flag offensive delete link more

Comments

Hi andreas

I am trying to convert it to mono8

but the compiler just says "image_pub_.publish(cv_ptr->toImageMsg() , *ci)" is wrong

seems that it cannot recognize "->"

could you please help me out of this ? thx

fromandto gravatar image fromandto  ( 2014-09-28 02:21:46 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2014-07-16 11:05:52 -0600

Seen: 1,457 times

Last updated: Jul 22 '14