Robotics StackExchange | Archived questions

ptam and cameracalibrator won't start

Hi,

i'm trying to get ptam working but it doesn't start up. I use usbcam 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/camerainfo/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

Asked by andreas.gerken on 2014-07-16 11:05:52 UTC

Comments

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

Asked by joq on 2014-07-16 11:43:24 UTC

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

Asked by andreas.gerken on 2014-07-22 07:51:41 UTC

Answers

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>

Asked by andreas.gerken on 2014-07-22 11:17:46 UTC

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

Asked by fromandto on 2014-09-28 02:21:46 UTC