Ask Your Question
0

ar_pose+ceiling camera+calibration file

asked 2015-01-27 10:58:25 -0500

borghetti gravatar image

updated 2015-02-04 12:18:32 -0500

Hello,

I have a ceiling camera that publishes images in the topic "/camera/image_raw" (working and publishing perfectly through the network). I have also calibrated this camera using openCV calibration procedures and saved this calibration in a .yaml file. I am trying to use ar_pose_multi to get the data published in /ar_pose_marker. When I run:

roslaunch ar_pose ar_pose_multi.launch

it opens rviz simulator and there is the following error:

ERROR: cannot launch node of type [usb_cam/usb_cam_node]: usb_cam

I ignored this error because I dont have usb_cam...I get my images from the ceiling camera (but I dont know if I can ignore this). Finally, I printed a pattern present in /ccny_vision/ar_pose/data/4x4/ and put bellow the camera and I have tried different heights and distances from the camera.

My questions are:

1) I dont want to use the calibration procedure from ROS... Is it possible to use the .yaml calibration file that I already have to feed the topic /camera/camera_info, required by ar_pose_multi?

2) I used rostopic echo with /camera/image_raw and /camera/camera_info and there are data (although calibration has the majority of data without any values), but when I used rostopic echo with /ar_pose_marker there is no output. Do you have any idea about how ar_pose publishes in /ar_pose_marker?

3) Rviz opens normally, but it seems to be completely detached from the camera, so nothing appears on the screen.

I dont know if I have no output because my marker is too small, or my calibration file is wrong, or the usb_cam error is relevant.. I am a little lost :(

================ BEGIN EDIT: Adding more information that can be helpful:

1) I calibrated again the camera using the calibration procedure from ROS and now the calibration is successfully published in "camera/camera_info" topic.

2) the topic "/camera/image_raw" is also OK and I can see the image if I add the component "Image" to Rviz. However with the component "Camera" I have a warning "No Image received"

3) No error is triggered when I run the ar_pose_multi.launch node. But even so, when I put a marker below the camera, nothing happens, no marker seems to be tracked. Also, the topic "/ar_pose_makers" does not presents any value to me.

================ END EDIT

================ BEGIN EDIT: (2)

maybe it is helpful: I am using ROS indigo and Ubuntu 14.04

my ar_pose_multi-launch is:

<launch>
    <node pkg="rviz" type="rviz" name="rviz"/>
        args="-d $(find ar_pose)/launch/live_single.vcg"/>
    <node pkg="tf" type="static_transform_publisher" name="world_to_cam" 
        args="0 0 0.5 -1.57 0 -1.57 world usb_cam 1" />
    <node name="ar_pose" pkg="ar_pose" type="ar_multi" respawn="false" output="screen">
        <param name="marker_pattern_list" type="string" value="$(find ar_pose)/data/object_4x4"/>
        <param name="threshold" type="int" value="100"/>
    </node>
</launch>

The output of rostopic for /camera/camera_info is:

---
header: 
  seq: 131827
  stamp: 
    secs: 1422538316
    nsecs: 930701784
  frame_id: /camera
height: 1920
width: 2560
distortion_model: plumb_bob
D: [-0.477363, 0.142675, 0.003122, -0.00082, 0.0]
K: [1294.855301, 0.0 ...
(more)
edit retag flag offensive close merge delete

Comments

yes, you are right, ar_pose is not subscribing to the image topic. but notice that it is subscribing to a topic that starts with "/usb_cam/" which is weird since it should start with "/camera/". did you manage to get the whole system working with ar_single or not? that was not clear.

Procópio gravatar image Procópio  ( 2015-01-30 04:07:47 -0500 )edit

checking ar_pose, did you tried to run the demos (as explained in the bottom of the page)? if so, did it work? can you run all the tools (rqt_graph, rosnode info, etc.) to see what are the topics names and the workflow?

Procópio gravatar image Procópio  ( 2015-01-30 04:09:26 -0500 )edit

Sorry for my delay, I was testing many things with my colleague to put the system to work. But it is still not working. I edited the post (5) with the questions you did...thanks

borghetti gravatar image borghetti  ( 2015-01-30 08:10:47 -0500 )edit

The problem is now solved. I am using now a usb camera that works OK with the usb_cam driver. Unfortunately I couldn't find the reason for the older camera don't work. I also changed ar_multi.h to publish in /usb_cam/camera_info and /usb_cam/image_raw and rebuilt the project. Thanks.

borghetti gravatar image borghetti  ( 2015-02-13 09:05:32 -0500 )edit

i'm glad you manage to solve your problem. maybe you can create an answer with the steps to solve the problem, so others can benefit from it.

Procópio gravatar image Procópio  ( 2015-02-16 03:53:27 -0500 )edit

Sure, I can do that. I will provide a detailed answer soon. Thanks again!

borghetti gravatar image borghetti  ( 2015-02-19 07:17:31 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2015-02-03 13:23:00 -0500

borghetti gravatar image

BTW, only the new directory is sourced, so when I type "roscd ar_pose", for example, it goes to the correct package. But something is trying to access the wrong one. Maybe this conflict is causing the wrong ar_pose being called?

edit flag offensive delete link more

Comments

You need to make sure all your terminal which are launching things are sourcing the new directory.

tfoote gravatar image tfoote  ( 2015-03-16 13:00:05 -0500 )edit
0

answered 2015-01-29 07:18:20 -0500

Procópio gravatar image

updated 2015-01-29 08:29:13 -0500

My guess is that you are not publishing the image topic with the name expected by ar_pose.

EDIT:

So, based on your question update, I can see some errors there. First, where did you get your code from? Your launch file is different from the one found at LucidOne repo.

In your launch you there is reference for a .vcg file to be loaded with Rviz, which is no longer used in Indigo (now they are .rviz files)

Also, you can see that you are creating a static transform between world and usb_cam, you have to verify if your frames are named like that.

Finally, you can see in rqt_graph that there is no topic going to ar_pose node. (deselect the checkboxes that say "hide" to show more information about the topics your nodes are expecting to receive, and republish the image)

I also suggest you experiment also with ar_pose_single.launch

edit flag offensive delete link more

Comments

Hi, thanks for your reply. According to to documentation here: http://wiki.ros.org/ar_pose , in ar_pose_multi section, the image should be published in /camera/image raw. And I can get this image correctly. I will edit my post to include the files you asked me.

borghetti gravatar image borghetti  ( 2015-01-29 07:40:49 -0500 )edit

I downloaded the code from this repository: https://github.com/srv/ccny_vision (I deleted the usb entry from launch file) I will download the code from the repository you sent and test. The image is republished now in the post.

borghetti gravatar image borghetti  ( 2015-01-29 08:51:12 -0500 )edit

ok, just verify if you printed the same marker that you are loading in the launch file. besides that, you can use remap to change the name of the image topic, so ar_pose can receive it even if it is expecting a different name (in the case of /usb_cam/...)

Procópio gravatar image Procópio  ( 2015-01-29 10:07:55 -0500 )edit

Update: everything in Rviz looks OK. The image is rectified against distortion, and there is no error. But no markers are tracked and ar_pose_multi seems to be not subscribed to the correct topics. The only difference between my launch file and the Lucid Repo: I deleted the entry for uvc_camera.

borghetti gravatar image borghetti  ( 2015-01-30 03:33:10 -0500 )edit

I realize that in the error caused after remapping the launch file is trying to access the ar_pose from a catkin directory that I am not using anymore: "catkin_ar_pose_ccny". My catkin workspace is now "catkin_ar_pose_lucid". Is there a way to exclude this dir from env paths?

borghetti gravatar image borghetti  ( 2015-02-03 13:20:30 -0500 )edit

try removing your build and dev folders and running catkin_make again.

Procópio gravatar image Procópio  ( 2015-02-05 02:24:12 -0500 )edit

Hi, thanks for your reply. I edited the post with new information (EDIT (6)). It seems to me that the problems is related to the format of image I am sending to arDetectMarker in ar_multi.cpp.

borghetti gravatar image borghetti  ( 2015-02-05 02:59:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-27 10:52:52 -0500

Seen: 715 times

Last updated: Feb 04 '15