{"action":"created","issue":{"url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy/issues/181","repository_url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy","labels_url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy/issues/181/comments","events_url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy/issues/181/events","html_url":"https://github.com/AutonomyLab/ardrone_autonomy/issues/181","id":141038562,"number":181,"title":"ar_pose + ardrone_autonomy","user":{"login":"pulver22","id":6864853,"avatar_url":"https://avatars.githubusercontent.com/u/6864853?v=3","gravatar_id":"","url":"https://api.github.com/users/pulver22","html_url":"https://github.com/pulver22","followers_url":"https://api.github.com/users/pulver22/followers","following_url":"https://api.github.com/users/pulver22/following{/other_user}","gists_url":"https://api.github.com/users/pulver22/gists{/gist_id}","starred_url":"https://api.github.com/users/pulver22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulver22/subscriptions","organizations_url":"https://api.github.com/users/pulver22/orgs","repos_url":"https://api.github.com/users/pulver22/repos","events_url":"https://api.github.com/users/pulver22/events{/privacy}","received_events_url":"https://api.github.com/users/pulver22/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-15T17:06:43Z","updated_at":"2016-03-18T18:54:09Z","closed_at":"2016-03-18T18:54:08Z","body":"Hi all,\r\n\r\nI'm trying to perform marker detection using the` ar_pose` package. \r\nEverything works fine using the package alone, either wih the webcam or an usb camera, getting the video stream with gscam.\r\n\r\nI 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:\r\n\r\n```xml\r\n<launch>\r\n    <!-- IPv4 address of your drone -->\r\n    <arg name=\"ip\" default=\"192.168.1.1\"/>\r\n\r\n    <!-- Ultrasound frequency (7 or 8). -->\r\n    <arg name=\"freq\" default=\"8\"/>\r\n    <node name=\"ardrone_driver\" pkg=\"ardrone_autonomy\" type=\"ardrone_driver\" output=\"screen\" clear_params=\"true\" args=\"-ip $(arg ip)\">\r\n        <param name=\"outdoor\" value=\"0\"/>\r\n        <param name=\"max_bitrate\" value=\"4000\"/>\r\n        <param name=\"bitrate\" value=\"4000\"/>\r\n        <param name=\"navdata_demo\" value=\"0\"/>\r\n        <param name=\"flight_without_shell\" value=\"0\"/>\r\n        <param name=\"altitude_max\" value=\"4000\"/>\r\n        <param name=\"altitude_min\" value=\"50\"/>\r\n        <param name=\"euler_angle_max\" value=\"0.21\"/>\r\n        <param name=\"control_vz_max\" value=\"700\"/>\r\n        <param name=\"control_yaw\" value=\"1.75\"/>\r\n        <param name=\"detect_type\" value=\"10\"/>\r\n        <param name=\"enemy_colors\" value=\"3\"/>\r\n        <param name=\"detections_select_h\" value=\"32\"/>\r\n        <param name=\"detections_select_v_hsync\" value=\"128\"/>\r\n        <param name=\"enemy_without_shell\" value=\"0\"/>\r\n        <param name=\"ultrasound_freq\" value=\"$(arg freq)\"/>\r\n        <param name=\"realtime_navdata\" value=\"true\"/>\r\n        <param name=\"realtime_video\" value=\"true\"/>\r\n        <!-- Covariance Values (3x3 matrices reshaped to 1x9)-->\r\n        <rosparam param=\"cov/imu_la\">[0.1, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1]</rosparam>\r\n        <rosparam param=\"cov/imu_av\">[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]</rosparam>\r\n        <rosparam param=\"cov/imu_or\">[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 100000.0]</rosparam>\r\n    </node>\r\n\r\n    <!-- Launch the static transform publisher for world to camera -->\r\n    <!--<node pkg=\"tf\" type=\"static_transform_publisher\" name=\"world_to_cam\" args=\"0 0 0.5 -1.57 0 -1.57 world camera 10\"/>\r\n    <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\"/>\r\n    <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\"/>-->\r\n    <!--<node pkg=\"tf\" type=\"static_transform_publisher\" name=\"cam_to_frontcam\" args=\"0.5 0 0 0 0 0 camera ardrone_base_frontcam 10\"/>-->\r\n    <!--<node pkg=\"tf\" type=\"static_transform_publisher\" name=\"cam_to_dronecam\" args=\"0.2 0 0 0 0 0 camera ardrone_base_frontcam 10\"/>-->\r\n\r\n    <node pkg=\"tf\" type=\"static_transform_publisher\" name=\"cam_to_drone\" args=\"1 0 0 0 0 0 world ardrone_base_frontcam 10\"/>\r\n\r\n    <!-- Launch the image rectification node -->\r\n    <node ns=\"camera\" pkg=\"image_proc\" type=\"image_proc\" name=\"image_proc\"/>\r\n\r\n    <!-- Start the GSCAM node -->\r\n    <!--<env name=\"GSCAM_CONFIG\" value=\"v4l2src device=/dev/video0 ! video/x-raw-yuv,framerate=30/1,width=640,height=480 ! ffmpegcolorspace \"/>\r\n    <node pkg=\"gscam\" type=\"gscam\" name=\"gscam\" output=\"screen\">\r\n        <param name=\"width\" type=\"int\" value=\"640\"/>\r\n        <param name=\"height\" type=\"int\" value=\"480\"/>\r\n        <param name=\"fps\" type=\"int\" value=\"30\"/>\r\n        <param name=\"frame_id\" type=\"string\" value=\"ardrone_base_frontcam\"/>\r\n        <param name=\"camera_info_url\" type=\"string\" value=\"file://$(find gscam)/camera_calibration.yaml\"/>\r\n    </node>-->\r\n\r\n    <node name=\"ar_pose\" pkg=\"ar_pose\" type=\"ar_single\" respawn=\"false\" output=\"screen\">\r\n        <param name=\"marker_pattern\" type=\"string\" value=\"$(find ar_pose)/data/4x4/4x4_1.patt\"/>\r\n        <param name=\"marker_width\" type=\"double\" value=\"152.4\"/>\r\n        <param name=\"marker_center_x\" type=\"double\" value=\"0.0\"/>\r\n        <param name=\"marker_center_y\" type=\"double\" value=\"0.0\"/>\r\n        <param name=\"threshold\" type=\"int\" value=\"100\"/>\r\n        <param name=\"use_history\" type=\"bool\" value=\"true\"/>\r\n    </node>\r\n\r\n    <!-- Launch RVIZ as visualizer -->\r\n    <!--<node pkg=\"rviz\" type=\"rviz\" name=\"rviz\" args=\"-d $(find ar_pose)/launch/live_single.rviz\"/>-->\r\n\r\n</launch>\r\n```\r\n\r\nThe problem is that in this way no marker are detected. \r\nIf I uncomment the gscam part of the launch file, I am able to perceive marker only from `device=/dev/video0` that is the webcam.\r\n\r\nHave you ever tried to perform this operation?\r\n\r\nI think one solution could be modified the frame of ardrone in the source, changing `ardrone_base_frontcam` in `camera` but I'm not sure. I think so because it seems that, as `ar_pose` is written, marker can be attached only to `camera` frame (of course another attempt woulbe changing the `ar_pose` code).\r\n\r\nin the hypothesis I don't want to change the code (to not recompile it) is there a way to do it inside the launch file? "},"comment":{"url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy/issues/comments/198493139","html_url":"https://github.com/AutonomyLab/ardrone_autonomy/issues/181#issuecomment-198493139","issue_url":"https://api.github.com/repos/AutonomyLab/ardrone_autonomy/issues/181","id":198493139,"user":{"login":"mani-monaj","id":758431,"avatar_url":"https://avatars.githubusercontent.com/u/758431?v=3","gravatar_id":"","url":"https://api.github.com/users/mani-monaj","html_url":"https://github.com/mani-monaj","followers_url":"https://api.github.com/users/mani-monaj/followers","following_url":"https://api.github.com/users/mani-monaj/following{/other_user}","gists_url":"https://api.github.com/users/mani-monaj/gists{/gist_id}","starred_url":"https://api.github.com/users/mani-monaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mani-monaj/subscriptions","organizations_url":"https://api.github.com/users/mani-monaj/orgs","repos_url":"https://api.github.com/users/mani-monaj/repos","events_url":"https://api.github.com/users/mani-monaj/events{/privacy}","received_events_url":"https://api.github.com/users/mani-monaj/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T18:54:08Z","updated_at":"2016-03-18T18:54:08Z","body":"@pulver22 You are welcome. Good luck!"}}