devided launches
parent
ffe7eb7bf3
commit
27ceee1fcf
@ -0,0 +1,44 @@
|
|||||||
|
from launch import LaunchDescription
|
||||||
|
from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument
|
||||||
|
from launch.substitutions import (
|
||||||
|
PathJoinSubstitution,
|
||||||
|
LaunchConfiguration,
|
||||||
|
)
|
||||||
|
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||||
|
from launch_ros.substitutions import FindPackageShare
|
||||||
|
from launch_ros.actions import Node
|
||||||
|
from launch_ros.descriptions import ParameterFile
|
||||||
|
|
||||||
|
def generate_launch_description():
|
||||||
|
pkg_unity_robot_controller = FindPackageShare(package="").find("unity_robot_controller")
|
||||||
|
|
||||||
|
# Launch arguments
|
||||||
|
launch_args = [
|
||||||
|
DeclareLaunchArgument(
|
||||||
|
"namespace", default_value="sirius_bot", description="Top-level namespace"
|
||||||
|
),
|
||||||
|
# DeclareLaunchArgument(
|
||||||
|
# "start_rviz", default_value="True", description="Use basic rviz"
|
||||||
|
# ),
|
||||||
|
]
|
||||||
|
|
||||||
|
joy_config = PathJoinSubstitution([pkg_unity_robot_controller, "config", "joy_config.yaml"])
|
||||||
|
|
||||||
|
joy_node = Node(
|
||||||
|
package="joy",
|
||||||
|
executable="joy_node",
|
||||||
|
name="joy",
|
||||||
|
namespace=LaunchConfiguration("namespace"),
|
||||||
|
output="both",
|
||||||
|
parameters=[
|
||||||
|
ParameterFile(joy_config),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
return LaunchDescription(
|
||||||
|
launch_args
|
||||||
|
+ [
|
||||||
|
joy_node,
|
||||||
|
]
|
||||||
|
)
|
||||||
Loading…
Reference in New Issue