2
2
from xacro import process_file
3
3
import yaml
4
4
from launch import LaunchDescription
5
- from launch .actions import IncludeLaunchDescription
5
+ from launch .actions import GroupAction , IncludeLaunchDescription
6
6
from launch .substitutions import LaunchConfiguration
7
7
from launch .launch_description_sources import PythonLaunchDescriptionSource
8
- from launch_ros .actions import Node
8
+ from launch_ros .actions import Node , SetRemap
9
9
from launch_ros .substitutions import FindPackageShare
10
10
from ament_index_python .packages import get_package_share_directory
11
11
from launch_xml .launch_description_sources import XMLLaunchDescriptionSource
@@ -24,9 +24,7 @@ def load_yaml(package_name, file_path):
24
24
25
25
def generate_launch_description ():
26
26
pkg_urc_bringup = get_package_share_directory ("urc_bringup" )
27
- pkg_nmea_navsat_driver = FindPackageShare ("nmea_navsat_driver" ).find (
28
- "nmea_navsat_driver"
29
- )
27
+ pkg_ublox_dgnss = get_package_share_directory ("ublox_dgnss" )
30
28
pkg_urc_platform = get_package_share_directory ("urc_platform" )
31
29
32
30
pkg_vectornav = get_package_share_directory ("vectornav" )
@@ -45,12 +43,6 @@ def generate_launch_description():
45
43
xacro_file , mappings = {"use_simulation" : "false" }
46
44
)
47
45
robot_desc = robot_description_config .toxml ()
48
- # gps_config = os.path.join(
49
- # get_package_share_directory("urc_bringup"), "config", "nmea_serial_driver.yaml"
50
- # )
51
- gps_config = os .path .join (
52
- get_package_share_directory ("urc_localization" ), "config" , "rover_gps.yaml"
53
- )
54
46
55
47
control_node = Node (
56
48
package = "controller_manager" ,
@@ -93,18 +85,18 @@ def generate_launch_description():
93
85
name = "twist_mux" ,
94
86
)
95
87
96
- # launch_gps = Node (
97
- # package="nmea_navsat_driver",
98
- # executable="nmea_serial_driver" ,
99
- # output="screen",
100
- # parameters=[gps_config],
101
- # )
102
- launch_gps = Node (
103
- package = "ublox_gps" ,
104
- executable = "ublox_gps_node" ,
105
- name = "ublox_gps_node_rover" ,
106
- output = "screen" ,
107
- parameters = [ gps_config , { "device" : "/dev/ttyACM0" }], # DEBUG
88
+ launch_gps = GroupAction (
89
+ actions = [
90
+ SetRemap ( src = "/rover/fix" , dst = "/gps/data" ) ,
91
+ IncludeLaunchDescription (
92
+ PythonLaunchDescriptionSource (
93
+ os . path . join (
94
+ pkg_ublox_dgnss , "launch" , "ublox_fb+r_rover.launch.py"
95
+ )
96
+ ) ,
97
+ launch_arguments = { "device_serial_string" : "rover" }. items () ,
98
+ ) ,
99
+ ]
108
100
)
109
101
110
102
launch_vectornav = IncludeLaunchDescription (
@@ -154,6 +146,6 @@ def generate_launch_description():
154
146
launch_gps ,
155
147
rosbridge_server_node ,
156
148
odom_frame_node ,
157
- # launch_vectornav,
149
+ launch_vectornav ,
158
150
]
159
151
)
0 commit comments