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

Revision history [back]

click to hide/show revision 1
initial version

Just go to the directory where that launchfile is placed.

For example it is in /home/workspace/myros/launchfiles, go with cd to that directory (cd /home/workspace/myros/launchfiles) and then start the launchfile with

roslaunch myexamplefile.launch

Here is an example file which works with a sick s300 laserscanner and hector mapping without odometry:

    <launch>
    <node name="laser" pkg="cob_sick_s300" type="cob_sick_s300" respawn="false" output="screen" />


    <node pkg="tf" type="static_transform_publisher" name="odom_to_base_lnk" args="0 0 0 0 0 0 /odom /base_link 100"/>
    <node pkg="tf" type="static_transform_publisher" name="base_lnk_to_laser_lnk" args="0 0 0 0 0 0 /base_link /camera_link 100"/>

    <param name="pub_map_odom_transform" value="true"/>
    <param name="map_frame" value="map" />
    <param name="base_frame" value="base_link" />
    <param name="odom_frame" value="base_link" />


    <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

        <param name="use_tf_scan_transformation" value="true"/>
        <param name="use_tf_pose_start_estimate" value="false"/>

        <param name="map_resolution" value="0.050"/>
        <param name="map_size" value="2048"/>
        <param name="map_start_x" value="0.5"/>
        <param name="map_start_y" value="0.5" />
        <param name="map_multi_res_levels" value="3" />

        <param name="update_factor_free" value="0.4"/>
        <param name="update_factor_occupied" value="0.9" />    
        <param name="map_update_distance_thresh" value="0.04"/>
        <param name="map_update_angle_thresh" value="0.006" />

        <param name="advertise_map_service" value="true"/>

        <param name="scan_subscriber_queue_size" value="5"/>
        <param name="scan_topic" value="laser/scan"/>

        <param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />

    </node>
 </launch>