Added general launch file
This commit is contained in:
13
mg_bringup/CMakeLists.txt
Normal file
13
mg_bringup/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
|
||||
|
||||
project(mg_bringup)
|
||||
|
||||
find_package(ament_cmake REQUIRED)
|
||||
|
||||
install(DIRECTORY
|
||||
launch
|
||||
DESTINATION share/${PROJECT_NAME}/
|
||||
)
|
||||
|
||||
ament_package()
|
||||
50
mg_bringup/launch/launch.py
Normal file
50
mg_bringup/launch/launch.py
Normal file
@ -0,0 +1,50 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, GroupAction
|
||||
from launch.conditions import UnlessCondition
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution, PythonExpression
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
is_local_test = DeclareLaunchArgument(
|
||||
'local_test',
|
||||
default_value="False",
|
||||
description='Launch with simulated components'
|
||||
)
|
||||
|
||||
return LaunchDescription([
|
||||
is_local_test,
|
||||
IncludeLaunchDescription(
|
||||
PathJoinSubstitution([
|
||||
FindPackageShare("mg_control"),
|
||||
'launch',
|
||||
'launch.py'
|
||||
]),
|
||||
launch_arguments={
|
||||
'local_test': LaunchConfiguration('local_test')
|
||||
}.items()
|
||||
),
|
||||
Node(
|
||||
package="mg_odometry",
|
||||
executable="mg_odom_publisher",
|
||||
name="mg_odom_publisher",
|
||||
condition=UnlessCondition(LaunchConfiguration('local_test')),
|
||||
parameters=[{
|
||||
'odom': "odom",
|
||||
'serial_path': "/dev/ttyACM1",
|
||||
}],
|
||||
|
||||
emulate_tty=True,
|
||||
output='screen'
|
||||
),
|
||||
Node(
|
||||
package="mg_navigation",
|
||||
executable="mg_nav_server",
|
||||
name="mg_nav_server",
|
||||
emulate_tty=True,
|
||||
output='screen',
|
||||
)
|
||||
])
|
||||
|
||||
20
mg_bringup/package.xml
Normal file
20
mg_bringup/package.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
||||
<package format="3">
|
||||
<name>mg_bringup</name>
|
||||
<version>0.0.0</version>
|
||||
<description>TODO: Package description</description>
|
||||
<maintainer email="82343504+Pimpest@users.noreply.github.com">Pimpest</maintainer>
|
||||
<license>Apache-2.0</license>
|
||||
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
<depend>launch</depend>
|
||||
<depend>launch_ros</depend>
|
||||
<depend>mg_control</depend>
|
||||
<depend>mg_odometry</depend>
|
||||
<depend>mg_navigation</depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
</export>
|
||||
</package>
|
||||
Reference in New Issue
Block a user