ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi, I'm using gscam with ar_pose and am able to get an image in rviz. However, ar_pose_marker is only giving me "Failed to locate marker". Here is the launch file that I use:
<launch>
<!-- Launch the camera acquisition node -->
<node pkg="gscam" type="gscam" name="gscam" output="screen">
<param name="image_width" type="int" value="640" />
<param name="image_height" type="int" value="480" />
<param name="video_device" type="string" value="/dev/video0" />
<param name="pixel_format" type="string" value="yuyv" />
<param name="frame_id" type="string" value="camera" />
</node>
<!-- Launch the static transform publisher for world to camera -->
<node pkg="tf" type="static_transform_publisher" name="world_to_cam"
args="0 0 0.5 -1.57 0 -1.57 world camera 10" />
<!-- Launch the ar_pose_single node -->
<node name="ar_pose" pkg="ar_pose" type="ar_single" respawn="false"
output="screen">
<param name="marker_pattern" type="string"
value="$(find ar_pose)/data/patt.hiro"/>
<param name="marker_width" type="double" value="80.0"/>
<param name="marker_center_x" type="double" value="0.0"/>
<param name="marker_center_y" type="double" value="0.0"/>
<param name="threshold" type="int" value="101"/>
<param name="use_history" type="bool" value="true"/>
<param name="publish_visual_markers" type="bool" value="true"/>
<param name="publish_tf" type="bool" value="true"/>
<param name="marker_frame" type="string" value="ar_marker"/>
<param name="reverse_transform" type="bool" value="true"/>
</node>
<node pkg="rviz" type="rviz" name="rviz"
args="-d $(find ar_pose)/launch/live_single.rviz"/>
<!-- Launch the image rectification node -->
<node ns="camera" pkg="image_proc" type="image_proc" name="image_proc" output="screen"/>
</launch>
I also have set the GSCAM_CONFIG:
export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb,framerate=30/1 ! ffmpegcolorspace"
With this I am able to the image on rviz:
However, as I said earlier ar_pose_marker doesn't really output anything with the ar_pose node printing "Failed to locate marker" debug message.
2 | No.2 Revision |
Hi, I'm using gscam with ar_pose and am able to get an image in rviz. However, ar_pose_marker is only giving me "Failed to locate marker". Here is the launch file that I use:
<launch>
<!-- Launch the camera acquisition node -->
<node pkg="gscam" type="gscam" name="gscam" output="screen">
<param name="image_width" type="int" value="640" />
<param name="image_height" type="int" value="480" />
<param name="video_device" type="string" value="/dev/video0" />
<param name="pixel_format" type="string" value="yuyv" />
<param name="frame_id" type="string" value="camera" />
</node>
<!-- Launch the static transform publisher for world to camera -->
<node pkg="tf" type="static_transform_publisher" name="world_to_cam"
args="0 0 0.5 -1.57 0 -1.57 world camera 10" />
<!-- Launch the ar_pose_single node -->
<node name="ar_pose" pkg="ar_pose" type="ar_single" respawn="false"
output="screen">
<param name="marker_pattern" type="string"
value="$(find ar_pose)/data/patt.hiro"/>
<param name="marker_width" type="double" value="80.0"/>
<param name="marker_center_x" type="double" value="0.0"/>
<param name="marker_center_y" type="double" value="0.0"/>
<param name="threshold" type="int" value="101"/>
<param name="use_history" type="bool" value="true"/>
<param name="publish_visual_markers" type="bool" value="true"/>
<param name="publish_tf" type="bool" value="true"/>
<param name="marker_frame" type="string" value="ar_marker"/>
<param name="reverse_transform" type="bool" value="true"/>
</node>
<node pkg="rviz" type="rviz" name="rviz"
args="-d $(find ar_pose)/launch/live_single.rviz"/>
<!-- Launch the image rectification node -->
<node ns="camera" pkg="image_proc" type="image_proc" name="image_proc" output="screen"/>
</launch>
I also have set the GSCAM_CONFIG:
export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb,framerate=30/1 ! ffmpegcolorspace"
With this I am able to the image on rviz:
However, as I said earlier ar_pose_marker doesn't really output anything with the ar_pose node printing "Failed to locate marker" debug message.message. All I get from the ar_pose_marker node is "??? 3" if I put the marker in front of the camera.