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

individualMarkersNoKinect does not publish in ar_pose_marker

asked 2018-01-13 13:02:29 -0500

mag.rod gravatar image

updated 2018-01-20 12:11:26 -0500

jayess gravatar image

hello, I use ros kinetic and I downloaded the ar-track-alvar module, to read AR codes, and I want to determine how far they are. I use a usb camera of logitech and I have written the following launch file.

<launch>
    <node name="usb_cam" pkg="usb_cam" type="usb_cam_node">
        <param name="video_device" value="/dev/video0"/>
    </node>
    <node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkersNoKinect" respawn="false" output="screen">
        <param name="marker_size" value="18"/>
        <param name="max_new_marker_error" value="0.08"/>
        <param name="max_track_error" value="0.2"/>
        <param name="camera_image" value="usb_cam/image_raw"/>
        <param name="camera_info"  value="usb_cam/camera_info"/>
        <param name="output_frame" value="head_camera"/>
    </node>
</launch>

The fact is that I show an image to the camera with an AR code and in the topic ar_pose_marker nothing is published.

Thanks for any help you can give me.

edit retag flag offensive close merge delete

Comments

My launch file:

mag.rod gravatar image mag.rod  ( 2018-01-19 04:23:48 -0500 )edit

<launch> <node name="usb_cam" pkg="usb_cam" type="usb_cam_node"> </node> <node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkersNoKinect" respawn="false" output="screen">

mag.rod gravatar image mag.rod  ( 2018-01-19 04:33:22 -0500 )edit

mag.rod gravatar image mag.rod  ( 2018-01-19 04:44:32 -0500 )edit
1

I recommend designing your launch file on the example here. You have to specify the cam_image_topic and cam_info_topic names. Or the node doesn't receive any images.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-01-19 06:23:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-14 06:47:54 -0500

updated 2018-01-19 04:08:21 -0500

Hi There,

I have set this node up a few times. I think the problem you're having is that your camera doesn't have any calibration information associated with it. This will mean that the ar_track_alvar node has no lens model for your camera and therefore cannot determine the pose estimates of the AR tags.

If you have a look at the camera calibration node it will guide you through the process of calibrating your camera and getting the camera info messages published alongside the camera images.

When this is setup and working the ar_track_alvar node should start working as you expect.

update now that your camera calibration information is in the system there are two more things I think you need to check. The frame_id for your camera is still the default head_camera there needs to be a TF connection between this frame and the detection frame set in the launch file for ar_track_alvar or you can set them to the same frame_id to keep it simple. The other thing to double check is that the camera image and info topic names are set correctly in the launch file too.

You're very close now.

edit flag offensive delete link more

Comments

I will investigate in this regard, thank you very much.

mag.rod gravatar image mag.rod  ( 2018-01-15 12:29:49 -0500 )edit

No problem, let us know how you get on.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-01-15 12:36:41 -0500 )edit

I have calibrated the camera and it still does not publish ar_pose_marker. Results after calibration:

mag.rod gravatar image mag.rod  ( 2018-01-19 02:00:11 -0500 )edit

miguel@miguel-desktop:~$ rosrun camera_calibration cameracalibrator.py --size 11x7 --square 0.03 image:=usb_cam/image_raw camera:=usb_cam ('Waiting for service', '/usb_cam/set_camera_info', '...') OK QXcbConnection: Failed to initialize XRandr Qt: XKEYBOARD extension not present on the X server.

mag.rod gravatar image mag.rod  ( 2018-01-19 02:14:14 -0500 )edit

libEGL warning: DRI2: failed to create any config

mag.rod gravatar image mag.rod  ( 2018-01-19 02:15:27 -0500 )edit

raceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/camera_calibration/camera_calibrator.py", line 247, in on_mouse. if self.do_upload(): File "/opt/ros/kinetic/lib/python2.7/dist-packages/camera_calibration/camera_calibrator.py", line 204, in do_upload

mag.rod gravatar image mag.rod  ( 2018-01-19 02:17:44 -0500 )edit

response = self.set_camera_info_service(info) File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 435, in __call__

mag.rod gravatar image mag.rod  ( 2018-01-19 02:20:30 -0500 )edit

return self.call(args, *kwds) File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 495, in call

mag.rod gravatar image mag.rod  ( 2018-01-19 02:21:18 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-01-13 13:02:29 -0500

Seen: 1,058 times

Last updated: Jan 20 '18