lidar_loc_test.launch 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <launch>
  2. <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  3. <include file="$(find gazebo_ros)/launch/empty_world.launch">
  4. <arg name="world_name" value="$(find wpr_simulation)/worlds/robocup_home.world"/>
  5. <arg name="paused" value="false"/>
  6. <arg name="use_sim_time" value="true"/>
  7. <arg name="gui" value="true"/>
  8. <arg name="recording" value="false"/>
  9. <arg name="debug" value="false"/>
  10. </include>
  11. <!-- Spawn the objects into Gazebo -->
  12. <node name="bed" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/bed.model -x 5.0 -y -3.9 -z 0 -Y 3.14159 -urdf -model bed" />
  13. <node name="sofa" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/sofa.model -x -1.0 -y -3.9 -z 0 -Y 1.57 -urdf -model sofa" />
  14. <node name="tea_table" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/tea_table.model -x -2.1 -y -2.2 -z 0 -Y 1.57 -urdf -model tea_table" />
  15. <node name="bookshelft" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/bookshelft.model -x 2.0 -y -0.55 -z 0 -Y -1.57 -urdf -model bookshelft" />
  16. <node name="kitchen_table" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/table.model -x -3.5 -y 3.7 -z 0 -Y 1.57 -urdf -model kitchen_table" />
  17. <node name="cupboard_0" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/cupboard.model -x -2.0 -y 0.7 -z 0 -Y 1.57 -urdf -model cupboard_0" />
  18. <node name="cupboard_1" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/cupboard.model -x -1.3 -y 3.7 -z 0 -Y -1.57 -urdf -model cupboard_1" />
  19. <node name="dinning_table_0" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/table.model -x 1.5 -y 1.5 -z 0 -Y 1.57 -urdf -model dinning_table_0" />
  20. <node name="dinning_table_1" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/table.model -x 1.5 -y 2.0 -z 0 -Y 1.57 -urdf -model dinning_table_1" />
  21. <node name="dinning_table_2" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/table.model -x 2.7 -y 1.5 -z 0 -Y 1.57 -urdf -model dinning_table_2" />
  22. <node name="dinning_table_3" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/table.model -x 2.7 -y 2.0 -z 0 -Y 1.57 -urdf -model dinning_table_3" />
  23. <node name="chair_0" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/chair.model -x 1.5 -y 1.2 -z 0 -Y 1.57 -urdf -model chair_0" />
  24. <node name="chair_1" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/chair.model -x 1.5 -y 2.3 -z 0 -Y -1.57 -urdf -model chair_1" />
  25. <node name="chair_2" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/chair.model -x 2.7 -y 1.2 -z 0 -Y 1.57 -urdf -model chair_2" />
  26. <node name="chair_3" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/chair.model -x 2.7 -y 2.3 -z 0 -Y -1.57 -urdf -model chair_3" />
  27. <!-- Spawn a robot into Gazebo -->
  28. <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find wpr_simulation)/models/wpb_home.model -urdf -x 0.0 -y 0.0 -model wpb_home" />
  29. <!-- Run the map server -->
  30. <node name="map_server" pkg="map_server" type="map_server" args="$(find wpr_simulation)/maps/map.yaml"/>
  31. <!-- Run lidar_loc -->
  32. <node pkg="jie_ware" type="lidar_loc" name="lidar_loc" >
  33. <param name="base_frame" value="base_footprint" />
  34. <param name="odom_frame" value="odom" />
  35. <param name="laser_frame" value="laser" />
  36. <param name="laser_topic" value="scan" />
  37. </node>
  38. <!--- Run move base -->
  39. <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
  40. <rosparam file="$(find wpb_home_tutorials)/nav_lidar/costmap_common_params.yaml" command="load" ns="global_costmap" />
  41. <rosparam file="$(find wpb_home_tutorials)/nav_lidar/costmap_common_params.yaml" command="load" ns="local_costmap" />
  42. <rosparam file="$(find wpb_home_tutorials)/nav_lidar/local_costmap_params.yaml" command="load" />
  43. <rosparam file="$(find wpb_home_tutorials)/nav_lidar/global_costmap_params.yaml" command="load" />
  44. <rosparam file="$(find wpb_home_tutorials)/nav_lidar/local_planner_params.yaml" command="load" />
  45. <param name="base_global_planner" value="global_planner/GlobalPlanner" />
  46. <param name="use_dijkstra" value="true"/>
  47. <param name="base_local_planner" value="wpbh_local_planner/WpbhLocalPlanner" />
  48. <param name= "controller_frequency" value="10" type="double"/>
  49. </node>
  50. <!-- RViz and TF tree -->
  51. <arg name="model" default="$(find wpb_home_bringup)/urdf/wpb_home.urdf"/>
  52. <arg name="gui" default="false" />
  53. <arg name="rvizconfig" default="$(find wpr_simulation)/rviz/nav.rviz" />
  54. <param name="robot_description" command="$(find xacro)/xacro $(arg model)" />
  55. <param name="use_gui" value="$(arg gui)"/>
  56. <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
  57. <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
  58. <rosparam command="load" file="$(find wpb_home_bringup)/config/wpb_home.yaml" />
  59. </node>
  60. <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
  61. </launch>