-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
203 additions
and
681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# This is a comment | ||
#mavlink UDP 14581, remote port: 14541) | ||
|
||
# ros2 launch mavros px4.launch namespace:=drone0 fcu_url:=udp://:[email protected]:14557 | ||
# ros2 launch mavros px4.launch namespace:=drone0 fcu_url:=udp://:[email protected]:14581 | ||
ros2 launch mavros px4.launch namespace:=drone0 fcu_url:="udp://:[email protected]:14557" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,9 @@ | |
__license__ = 'BSD-3-Clause' | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.substitutions import EnvironmentVariable, LaunchConfiguration, PathJoinSubstitution | ||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription | ||
from launch.launch_description_sources import AnyLaunchDescriptionSource | ||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution | ||
from launch_ros.actions import Node | ||
from launch_ros.substitutions import FindPackageShare | ||
|
||
|
@@ -52,18 +53,22 @@ def generate_launch_description(): | |
'config', 'platform_config_file.yaml' | ||
]) | ||
|
||
mavros_launch_file = PathJoinSubstitution([ | ||
FindPackageShare('mavros'), 'launch', 'px4.launch']) | ||
|
||
return LaunchDescription([ | ||
DeclareLaunchArgument('namespace', | ||
default_value=EnvironmentVariable( | ||
'AEROSTACK2_SIMULATION_DRONE_ID'), | ||
default_value='drone0', | ||
description='Drone namespace'), | ||
DeclareLaunchArgument('control_modes_file', | ||
default_value=control_modes, | ||
description='Platform control modes file'), | ||
DeclareLaunchArgument('platform_config_file', | ||
default_value=platform_config_file, | ||
description='Platform configuration file'), | ||
|
||
DeclareLaunchArgument('fcu_url', | ||
default_value='udp://:[email protected]:14557', | ||
description='Mavlink connection URL'), | ||
Node( | ||
package='as2_platform_mavlink', | ||
executable='as2_platform_mavlink_node', | ||
|
@@ -77,5 +82,11 @@ def generate_launch_description(): | |
}, | ||
LaunchConfiguration('platform_config_file') | ||
] | ||
) | ||
), | ||
IncludeLaunchDescription(AnyLaunchDescriptionSource([mavros_launch_file]), | ||
launch_arguments={ | ||
'namespace': 'drone0/mavros', | ||
'fcu_url': LaunchConfiguration('fcu_url'), | ||
}.items()) | ||
|
||
]) |
Oops, something went wrong.