Skip to content

Commit

Permalink
Ros2 v0.8.0 autoware launch (autowarefoundation#58)
Browse files Browse the repository at this point in the history
* [autoware_launch] ros2-porting: v0.5.0 to v0.8.0

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Cleanup autoware and logging simulator launch

* Add .xml extention

* Fix missing arguments

* Fix tag

* Fix web controller launch

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Update rviz

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [autoware_launch] Fix yaml name

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [autoware_launch] Cleanup dependencies

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp>
  • Loading branch information
2 people authored and tkimura4 committed Dec 13, 2021
1 parent cfbcc84 commit 5d2b407
Show file tree
Hide file tree
Showing 7 changed files with 362 additions and 232 deletions.
5 changes: 5 additions & 0 deletions launch/autoware_launch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ project(autoware_launch)
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(
INSTALL_TO_SHARE
launch
Expand Down
42 changes: 22 additions & 20 deletions launch/autoware_launch/launch/autoware.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,56 @@
<arg name="pointcloud_map_file" default="pointcloud_map.pcd" />

<!-- Vehicle -->
<include file="$(find-pkg-share vehicle_launch)/launch/vehicle.launch">
<include file="$(find-pkg-share vehicle_launch)/launch/vehicle.launch.xml">
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
</include>

<!-- System -->
<include file="$(find-pkg-share system_launch)/launch/system.launch">
<include file="$(find-pkg-share system_launch)/launch/system.launch.xml">
<arg name="run_mode" value="online"/>
</include>

<!-- Map -->
<include file="$(find-pkg-share map_launch)/launch/map.launch">
<var name="lanelet2_map_path" value="$(var map_path)/$(var lanelet2_map_file)" />
<var name="pointcloud_map_path" value="$(var map_path)/$(var pointcloud_map_file)"/>
<include file="$(find-pkg-share map_launch)/launch/map.launch.xml">
<arg name="lanelet2_map_path" value="$(var map_path)/$(var lanelet2_map_file)" />
<arg name="pointcloud_map_path" value="$(var map_path)/$(var pointcloud_map_file)"/>
</include>

<!-- Sensing -->
<include file="$(find-pkg-share sensing_launch)/launch/sensing.launch">
<var name="launch_driver" value="true"/>
<var name="sensor_model" value="$(var sensor_model)"/>
<include file="$(find-pkg-share sensing_launch)/launch/sensing.launch.xml">
<arg name="launch_driver" value="true"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
</include>

<!-- Localization -->
<include file="$(find-pkg-share localization_launch)/launch/localization.launch">
<include file="$(find-pkg-share localization_launch)/launch/localization.launch.xml">
</include>

<!-- Perception -->
<include file="$(find-pkg-share perception_launch)/launch/perception.launch">
<var name="mode" value="lidar" doc="options: camera_lidar_fusion, lidar, camera"/>
<include file="$(find-pkg-share perception_launch)/launch/perception.launch.xml">
<arg name="mode" value="lidar" doc="options: camera_lidar_fusion, lidar, camera"/>
</include>

<!-- Planning -->
<include file="$(find-pkg-share planning_launch)/launch/planning.launch" />
<include file="$(find-pkg-share planning_launch)/launch/planning.launch.xml">
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
</include>

<!-- Control -->
<include file="$(find-pkg-share control_launch)/launch/control.launch">
<var name="lateral_controller_mode" value="mpc_follower" doc="options: mpc_follower, pure_pursuit"/>
<include file="$(find-pkg-share control_launch)/launch/control.launch.xml">
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
<arg name="lateral_controller_mode" value="mpc_follower" doc="options: mpc_follower, pure_pursuit"/>
</include>

<!-- AutowareAPI -->
<include file="$(find-pkg-share awapi_awiv_adapter)/launch/awapi_awiv_adapter.launch" />
<include file="$(find-pkg-share awapi_awiv_adapter)/launch/awapi_awiv_adapter.launch.xml" />

<!-- Rviz -->
<node pkg="rviz" exec="rviz" name="rviz" output="screen" args="-d $(find-pkg-share autoware_launch)/rviz/autoware.rviz" if="$(var rviz)" />
<node pkg="rviz2" exec="rviz2" name="rviz2" output="screen" args="-d $(find-pkg-share autoware_launch)/rviz/autoware.rviz -s $(find-pkg-share autoware_launch)/rviz/image/autoware.png" if="$(var rviz)" />

<!-- Web Controller -->
<include file="$(find-pkg-share roswww)/launch/roswww.launch">
<arg name="cached" value="false"/>
</include>
<include file="$(find-pkg-share rosbridge_server)/launch/rosbridge_websocket.launch" />
<include file="$(find-pkg-share autoware_web_controller)/launch/autoware_web_controller.launch.xml" />

</launch>
43 changes: 22 additions & 21 deletions launch/autoware_launch/launch/logging_simulator.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<arg name="map_path" doc="point cloud and lanelet2 map directory path"/>
<arg name="vehicle_model"/>
<arg name="sensor_model"/>
<arg name="vehicle_id" value="$(optenv VEHICLE_ID default)"/>
<arg name="vehicle_id" value="$(env VEHICLE_ID default)"/>
<!-- Optional parameters -->
<arg name="vehicle" default="true" doc="launch vehicle" />
<arg name="system" default="true" doc="launch system" />
Expand All @@ -17,55 +17,56 @@
<arg name="rviz" default="true" doc="launch rviz" />
<arg name="lanelet2_map_file" default="lanelet2_map.osm" />
<arg name="pointcloud_map_file" default="pointcloud_map.pcd" />
<param name="/use_sim_time" value="true" />
<set_env name="AW_ROS2_USE_SIM_TIME" value="true" />

<!-- Vehicle -->
<include file="$(find vehicle_launch)/launch/vehicle_description.launch" if="$(arg vehicle)">
<arg name="vehicle_model" value="$(arg vehicle_model)"/>
<arg name="sensor_model" value="$(arg sensor_model)"/>
<arg name="vehicle_id" value="$(arg vehicle_id)"/>
<include file="$(find-pkg-share vehicle_launch)/launch/vehicle_description.launch.xml" if="$(var vehicle)">
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="vehicle_id" value="$(var vehicle_id)"/>
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
</include>

<!-- System -->
<include file="$(find system_launch)/launch/system.launch" if="$(arg system)">
<include file="$(find-pkg-share system_launch)/launch/system.launch.xml" if="$(var system)">
<arg name="run_mode" value="online"/>
</include>

<!-- Map -->
<include file="$(find map_launch)/launch/map.launch" if="$(arg map)">
<arg name="lanelet2_map_path" value="$(arg map_path)/$(arg lanelet2_map_file)" />
<arg name="pointcloud_map_path" value="$(arg map_path)/$(arg pointcloud_map_file)"/>
<include file="$(find-pkg-share map_launch)/launch/map.launch.xml" if="$(var map)">
<arg name="lanelet2_map_path" value="$(var map_path)/$(var lanelet2_map_file)" />
<arg name="pointcloud_map_path" value="$(var map_path)/$(var pointcloud_map_file)"/>
</include>

<!-- Sensing -->
<include file="$(find sensing_launch)/launch/sensing.launch" if="$(arg sensing)">
<include file="$(find-pkg-share sensing_launch)/launch/sensing.launch.xml" if="$(var sensing)">
<arg name="launch_driver" value="false"/>
<arg name="sensor_model" value="$(arg sensor_model)"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
</include>

<!-- Localization -->
<include file="$(find localization_launch)/launch/localization.launch" if="$(arg localization)">
<include file="$(find-pkg-share localization_launch)/launch/localization.launch.xml" if="$(var localization)">
</include>

<!-- Perception -->
<include file="$(find perception_launch)/launch/perception.launch" if="$(arg perception)">
<include file="$(find-pkg-share perception_launch)/launch/perception.launch.xml" if="$(var perception)">
<arg name="mode" value="lidar" doc="options: camera_lidar_fusion, lidar, camera"/>
</include>

<!-- Planning -->
<include file="$(find planning_launch)/launch/planning.launch" if="$(arg planning)"/>
<include file="$(find-pkg-share planning_launch)/launch/planning.launch.xml" if="$(var planning)">
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
</include>

<!-- Control -->
<include file="$(find control_launch)/launch/control.launch" if="$(arg control)">
<include file="$(find-pkg-share control_launch)/launch/control.launch" if="$(var control)">
<arg name="vehicle_param_file" value="$(find-pkg-share $(var vehicle_model)_description)/config/vehicle_info.param.yaml"/>
<arg name="lateral_controller_mode" value="mpc_follower" doc="options: mpc_follower, pure_pursuit"/>
</include>

<!-- Rviz -->
<node pkg="rviz" type="rviz" name="rviz" output="screen" args="-d $(find autoware_launch)/rviz/autoware.rviz" if="$(arg rviz)" />
<node pkg="rviz2" type="rviz2" name="rviz2" output="screen" args="-d $(find-pkg-share autoware_launch)/rviz/autoware.rviz -s $(find-pkg-share autoware_launch)/rviz/image/autoware.png" if="$(var rviz)" />

<!-- Web Controller -->
<include file="$(find roswww)/launch/roswww.launch">
<arg name="cached" value="false"/>
</include>
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" />
<include file="$(find-pkg-share autoware_web_controller)/launch/autoware_web_controller.launch.xml" />
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<include file="$(find-pkg-share awapi_awiv_adapter)/launch/awapi_awiv_adapter.launch.xml" />

<!-- Rviz -->
<node pkg="rviz2" exec="rviz2" name="rviz2" output="screen" args="-d $(find-pkg-share autoware_launch)/rviz/autoware.rviz" if="$(var rviz)" />
<node pkg="rviz2" exec="rviz2" name="rviz2" output="screen" args="-d $(find-pkg-share autoware_launch)/rviz/autoware.rviz -s $(find-pkg-share autoware_launch)/rviz/image/autoware.png" if="$(var rviz)" />

<!-- Web Controller -->
<include file="$(find-pkg-share autoware_web_controller)/launch/autoware_web_controller.launch.xml" />
Expand Down
20 changes: 15 additions & 5 deletions launch/autoware_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>vehicle_launch</build_depend>
<build_depend>perception_launch</build_depend>
<build_depend>sensing_launch</build_depend>
<exec_depend>vehicle_launch</exec_depend>

<!-- launch -->
<exec_depend>control_launch</exec_depend>
<exec_depend>localization_launch</exec_depend>
<exec_depend>map_launch</exec_depend>
<exec_depend>perception_launch</exec_depend>
<exec_depend>planning_launch</exec_depend>
<exec_depend>sensing_launch</exec_depend>
<exec_depend>system_launch</exec_depend>
<exec_depend>vehicle_launch</exec_depend>

<!-- vizualization -->
<exec_depend>rviz2</exec_depend>

<!-- web controller -->
<exec_depend>autoware_web_controller</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 2">python-tornado</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 3">python3-tornado</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 2">python-bson</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 3">python3-bson</exec_depend>

<!-- The export tag contains other, unspecified, tags -->
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
Loading

0 comments on commit 5d2b407

Please sign in to comment.