<commit_before><?xml version="1.0"?>
<launch xmlns:xacro="http://www.ros.org/wiki/xacro">
    <xacro:property name="params" value="${load_yaml('../../config/.launch_params.yaml')}"/>

    <xacro:macro name="ardrone_driver" >
        <node name="ardrone"
              pkg="ardrone_autonomy"
              type="ardrone_driver"
              output="screen"
              clear_params="true"
              args="-ip ${params['camera']['real']['drone_ip']}" >
            <param name="navdata_demo" value="False" />
            <param name="realtime_navdata" value="True" />
            <param name="realtime_video" value="True" />
            <param name="looprate" value="30" />

            <param name="outdoor" value="0" />
            <param name="flight_without_shell" value="0" />

            <param name="altitude_max" value="2000" />  <!-- in millimeters -->
            <param name="altitude_min" value="50" />  <!-- in millimeters -->
            <param name="euler_angle_max" value="0.1" />  <!-- maximum allowable body angle in radians = 5 degrees -->
            <param name="control_vz_max" value="200" />  <!-- maximum z velocity in mm/sec = 0.2 m/sec -->
            <param name="control_yaw" value="0.7" />  <!-- maximum rotation rate in radians/sec = 40 deg per second -->
        </node>
    </xacro:macro>

    <xacro:macro name="mock_camera" >
        <node name="ardrone" pkg="usb_cam" type="usb_cam_node" output="screen" >
            <param name="video_device" value="/dev/video0" />
            <param name="camera_name" value="ardrone" />
            <param name="image_width" value="640" />
            <param name="image_height" value="480" />
            <param name="pixel_format" value="yuyv" />
            <param name="camera_frame_id" value="ardrone" />
            <param name="io_method" value="mmap"/>
            <param name="camera_info_url"
                   type="string"
                   value="file://$(find spirit)/config/ardrone_front.yaml" />
        </node>
    </xacro:macro>

    <xacro:if value="${params['camera']['mock_camera']}">
        <xacro:mock_camera />
    </xacro:if>

    <xacro:unless value="${params['camera']['mock_camera']}">
        <xacro:ardrone_driver />
    </xacro:unless>

    <node name="reduce_framerate" pkg="spirit" type="reduce_framerate.py" output="screen">
        <param name="slowdown" value="${params['camera']['slowdown']}" />
    </node>
    <node ns="ardrone" name="image_proc" pkg="image_proc" type="image_proc" output="screen" />
</launch><commit_msg>Specify device name which appears.<commit_after><?xml version="1.0"?>
<launch xmlns:xacro="http://www.ros.org/wiki/xacro">
    <xacro:property name="params" value="${load_yaml('../../config/.launch_params.yaml')}"/>

    <xacro:macro name="ardrone_driver" >
        <node name="ardrone"
              pkg="ardrone_autonomy"
              type="ardrone_driver"
              output="screen"
              clear_params="true"
              args="-ip ${params['camera']['real']['drone_ip']}" >
            <param name="navdata_demo" value="False" />
            <param name="realtime_navdata" value="True" />
            <param name="realtime_video" value="True" />
            <param name="looprate" value="30" />

            <param name="outdoor" value="0" />
            <param name="flight_without_shell" value="0" />

            <param name="altitude_max" value="2000" />  <!-- in millimeters -->
            <param name="altitude_min" value="50" />  <!-- in millimeters -->
            <param name="euler_angle_max" value="0.1" />  <!-- maximum allowable body angle in radians = 5 degrees -->
            <param name="control_vz_max" value="200" />  <!-- maximum z velocity in mm/sec = 0.2 m/sec -->
            <param name="control_yaw" value="0.7" />  <!-- maximum rotation rate in radians/sec = 40 deg per second -->
        </node>
    </xacro:macro>

    <xacro:macro name="mock_camera" >
        <node name="ardrone" pkg="usb_cam" type="usb_cam_node" output="screen" >
	    <param name="video_device" value="/dev/input/by-id/usb-Microsoft_Microsoft_LifeCam-event-if00" />
            <param name="camera_name" value="ardrone" />
            <param name="image_width" value="640" />
            <param name="image_height" value="480" />
            <param name="pixel_format" value="yuyv" />
            <param name="camera_frame_id" value="ardrone" />
            <param name="io_method" value="mmap"/>
            <param name="camera_info_url"
                   type="string"
                   value="file://$(find spirit)/config/ardrone_front.yaml" />
        </node>
    </xacro:macro>

    <xacro:if value="${params['camera']['mock_camera']}">
        <xacro:mock_camera />
    </xacro:if>

    <xacro:unless value="${params['camera']['mock_camera']}">
        <xacro:ardrone_driver />
    </xacro:unless>

    <node name="reduce_framerate" pkg="spirit" type="reduce_framerate.py" output="screen">
        <param name="slowdown" value="${params['camera']['slowdown']}" />
    </node>
    <node ns="ardrone" name="image_proc" pkg="image_proc" type="image_proc" output="screen" />
</launch>
{'fraction_non_alphanumeric': 0.18162393162393162, 'fraction_numerical': 0.012237762237762238, 'mean_word_length': 2.603219034289713, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 2, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4997841', 'n_tokens_mistral': 1694, 'n_tokens_neox': 1583, 'n_words': 281}