ar_pose + ardrone_autonomy [closed]

asked 2016-03-15 12:09:46 -0600

updated 2016-03-18 05:51:43 -0600

Hi all,

I'm trying to perform marker detection using thear_pose package. Everything works fine using the package alone, either wih the webcam or an usb camera, getting the video stream with gscam.

I tried to write a launch file that launch ar_pose and ardrone_autonomy simultaneously, in order to use the frontcam of the quadcopter as camera for the acquisition. Here is the launch file:

<launch> <arg name="ip" default="192.168.1.1"/>

<!-- Ultrasound frequency (7 or 8). -->
<arg name="freq" default="8"/>
<node name="ardrone_driver" pkg="ardrone_autonomy" type="ardrone_driver" output="screen" clear_params="true" args="-ip $(arg ip)">
    <param name="outdoor" value="0"/>
    <param name="max_bitrate" value="4000"/>
    <param name="bitrate" value="4000"/>
    <param name="navdata_demo" value="0"/>
    <param name="flight_without_shell" value="0"/>
    <param name="altitude_max" value="4000"/>
    <param name="altitude_min" value="50"/>
    <param name="euler_angle_max" value="0.21"/>
    <param name="control_vz_max" value="700"/>
    <param name="control_yaw" value="1.75"/>
    <param name="detect_type" value="10"/>
    <param name="enemy_colors" value="3"/>
    <param name="detections_select_h" value="32"/>
    <param name="detections_select_v_hsync" value="128"/>
    <param name="enemy_without_shell" value="0"/>
    <param name="ultrasound_freq" value="$(arg freq)"/>
    <param name="realtime_navdata" value="true"/>
    <param name="realtime_video" value="true"/>
    <!-- Covariance Values (3x3 matrices reshaped to 1x9)-->
    <rosparam param="cov/imu_la">[0.1, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1]</rosparam>
    <rosparam param="cov/imu_av">[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]</rosparam>
    <rosparam param="cov/imu_or">[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 100000.0]</rosparam>
</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"/>
<node pkg="tf" type="static_transform_publisher" name="base_to_frontcam" args="0.21 0 0 -1.57 0 -1.57 ardrone_base_link ardrone_base_frontcam 10"/>
<node pkg="tf" type="static_transform_publisher" name="base_to_bottomcam" args="0 -0.02 0.0 3.14 0 1.57 ardrone_base_link ardrone_base_bottomcam 10"/>-->
<!--<node pkg="tf" type="static_transform_publisher" name="cam_to_frontcam" args="0.5 0 0 0 0 0 camera ardrone_base_frontcam 10"/>-->
<!--<node pkg="tf" type="static_transform_publisher" name="cam_to_dronecam" args="0.2 0 0 0 0 0 camera ardrone_base_frontcam 10"/>-->

<node pkg="tf" type="static_transform_publisher" name="cam_to_drone" args="1 0 0 0 0 0 world ardrone_base_frontcam 10"/>

<!-- Launch the image rectification node -->
<node ns="camera" pkg="image_proc" type="image_proc" name="image_proc"/>

<!-- Start the GSCAM node -->
<!--<env name="GSCAM_CONFIG" value="v4l2src device=/dev/video0 ! video/x-raw-yuv,framerate=30/1,width=640,height=480 ! ffmpegcolorspace "/>
<node pkg="gscam" type="gscam" name="gscam" output="screen">
    <param name="width" type="int" value="640"/>
    <param name="height" type="int" value="480"/>
    <param name="fps" type="int" value="30"/>
    <param name="frame_id" type="string" value="ardrone_base_frontcam"/>
    <param name="camera_info_url" type="string" value="file://$(find gscam)/camera_calibration.yaml"/>
</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/4x4/4x4_1 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by pulver
close date 2016-03-18 05:52:06.388751