-
Notifications
You must be signed in to change notification settings - Fork 18
launch_file
The provided example launch file shows how to launch the autonomy algorithms with parameters.
The first line of the launch file specifies if simulation time should be used. If "use_sim_time=true", then the clock message must be published by whichever simulator you use. Otherwise the system clock will be used and the autonomy algorithms will run in real time.
<param name="/use_sim_time" value="false"/> The next line loads the desired wayponts for the global path. Other files besides "waypoints.yaml" may be created by the user.
<rosparam file="$(find avt_341)/config/waypoints.yaml" /> The next four lines handle the publishing and dynamic updating of the transform tree, including the robot state publisher.
<param name="robot_description" command="cat $(find avt_341)/config/avt_bot.urdf" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node pkg="tf" name="static_transform_publisher" type="static_transform_publisher" args="0 0 0 0 0 0 1 map odom 10" />
<node name="state_publisher" pkg="avt_341" type="avt_bot_state_publisher_node" />Next, the perception algorithm and parameters are launched.
<node name="perception_node" pkg="avt_341" type="avt_341_perception_node" required="true" output="screen">
<param name="use_elevation" value="false" />
<param name="slope_threshold" value="0.5" />
<param name="grid_size" value="200.0" />
<param name="grid_res" value="1.0" />
<param name="warmup_time" value="5.0" />
<param name="use_registered" value="true" />
</node>Followed by the vehicle control node
<node name="vehicle_control_node" pkg="avt_341" type="avt_341_control_node" required="true" output="screen" >
<param name="vehicle_wheelbase" value="2.0" />
<param name="vehicle_max_steer_angle_degrees" value="30.0" />
<param name="steering_coefficient" value="2.5" />
<param name="vehicle_speed" value="5.0" />
</node>and global path node.
<node name="global_path_node" pkg="avt_341" type="avt_341_global_path_node" required="true" output="screen" >
<param name="goal_dist" value="4.0" />
</node>The local planner with parameters is launched:
<node name="local_planner_node" pkg="avt_341" type="avt_341_local_planner_node" output="screen" required="true" >
<param name="path_look_ahead" value="40.0" />
<param name="vehicle_width" value="3.0" />
<param name="num_paths" value="21" />
<param name="max_steer_angle" value="0.5" />
<param name="output_path_step" value="0.5" />
<param name="path_integration_step" value="0.35" />
<param name="dilation_factor" value="2" />
<param name="w_c" value="0.3" />
<param name="w_s" value="0.5" />
<param name="w_d" value="0.0" />
<param name="w_r" value="0.2" />
<param name="rate" value="10.0" />
<param name="trim_path" value="false" />
<param name="display" value="true" />
</node>Finally, the simulation test node, which subscribes to and publishes topics, is launched.
<node name="sim_test_node" pkg="avt_341" type="avt_341_sim_test_node" required="true" output="screen" />To use with a simulator, the preceding line can be commented out and replaced with the include file to launch the simulator. For example, if the MAVS simulator is being used, the following lines are needed.
<include file="$(find mavs_avt_example)/launch/mavs_sim.launch">
<arg name="cmd_vel_topic_arg" default="avt_341/cmd_vel" />
<arg name="point_cloud_topic_arg" default="avt_341/points" />
<arg name="odometry_topic_arg" default="avt_341/odometry" />
</include>Note that the default AVT-341 package topic names have been remapped to the topic names used by the simulator.