Skip to content

Commit 79162b2

Browse files
authored
Add example launch file for dual_ekf_navsat (#611)
* Add example launch file for dual_ekf_navsat * Removed license * keep only OSRF in license
1 parent 7906d64 commit 79162b2

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2018 Open Source Robotics Foundation, Inc.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
from launch import LaunchDescription
15+
import launch_ros.actions
16+
import os
17+
import yaml
18+
from launch.substitutions import EnvironmentVariable
19+
import pathlib
20+
import launch.actions
21+
from launch.actions import DeclareLaunchArgument
22+
from ament_index_python.packages import get_package_share_directory
23+
24+
def generate_launch_description():
25+
robot_localization_dir = get_package_share_directory('robot_localization')
26+
parameters_file_dir = os.path.join(robot_localization_dir, 'params')
27+
parameters_file_path = os.path.join(parameters_file_dir, 'dual_ekf_navsat_example.yaml')
28+
os.environ['FILE_PATH'] = str(parameters_file_dir)
29+
return LaunchDescription([
30+
launch.actions.DeclareLaunchArgument(
31+
'output_final_position',
32+
default_value='false'),
33+
launch.actions.DeclareLaunchArgument(
34+
'output_location',
35+
default_value='~/dual_ekf_navsat_example_debug.txt'),
36+
37+
launch_ros.actions.Node(
38+
package='robot_localization',
39+
executable='ekf_node',
40+
name='ekf_filter_node_odom',
41+
output='screen',
42+
parameters=[parameters_file_path],
43+
remappings=[('odometry/filtered', 'odometry/local')]
44+
),
45+
launch_ros.actions.Node(
46+
package='robot_localization',
47+
executable='ekf_node',
48+
name='ekf_filter_node_map',
49+
output='screen',
50+
parameters=[parameters_file_path],
51+
remappings=[('odometry/filtered', 'odometry/global')]
52+
),
53+
launch_ros.actions.Node(
54+
package='robot_localization',
55+
executable='navsat_transform_node',
56+
name='navsat_transform',
57+
output='screen',
58+
parameters=[parameters_file_path],
59+
remappings=[('imu/data', 'imu/data'),
60+
('gps/fix', 'gps/fix'),
61+
('gps/filtered', 'gps/filtered'),
62+
('odometry/gps', 'odometry/gps'),
63+
('odometry/filtered', 'odometry/global')]
64+
65+
)
66+
])

0 commit comments

Comments
 (0)