14from launch
import LaunchDescription
15import launch_ros.actions
17from launch.substitutions
import LaunchConfiguration
21from ament_index_python.packages
import get_package_share_directory
25 robot_localization_dir = get_package_share_directory(
"robot_localization")
26 parameters_file_dir = os.path.join(robot_localization_dir,
"params")
29 parameters_file_path = os.path.join(parameters_file_dir,
"dual_ekf_navsat_example.yaml")
30 os.environ[
"FILE_PATH"] = str(parameters_file_dir)
32 xtermprefix =
"xterm -xrm 'XTerm*scrollBar: true' -xrm 'xterm*rightScrollBar: true' -hold -geometry 1000x600 -sl 10000 -e"
34 return LaunchDescription(
36 launch.actions.DeclareLaunchArgument(
"use_sim_time", default_value=
"false"),
37 launch.actions.DeclareLaunchArgument(
"output_final_position", default_value=
"false"),
38 launch.actions.DeclareLaunchArgument(
39 "output_location", default_value=
"~/dual_ekf_navsat_example_debug.txt"
49 launch_ros.actions.Node(
50 package=
"robot_localization",
51 executable=
"ekf_node",
52 name=
"ekf_filter_node_map",
55 {
"use_sim_time": LaunchConfiguration(
"use_sim_time")},
58 remappings=[(
"odometry/filtered",
"odometry/global"), (
"odometry/wheel",
"/odom")],
61 launch_ros.actions.Node(
62 package=
"robot_localization",
63 executable=
"navsat_transform_node",
64 name=
"navsat_transform",
67 {
"use_sim_time": LaunchConfiguration(
"use_sim_time")},
72 (
"gps/fix",
"gps/data"),
73 (
"gps/filtered",
"gps/filtered"),
74 (
"odometry/gps",
"odometry/gps"),
75 (
"odometry/filtered",
"odometry/global"),
def generate_launch_description()