You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
Python
45 lines
1.3 KiB
Python
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,
|
|
]
|
|
)
|