Created
November 15, 2023 14:36
-
-
Save JasonRBowling/3e22f81d299b33792ed9f5b465ba26fb to your computer and use it in GitHub Desktop.
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
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
# POSSIBILITY OF SUCH DAMAGE. | |
"""Launch the ublox gps node with c94-m8p configuration.""" | |
import os | |
import ament_index_python.packages | |
import launch | |
import launch_ros.actions | |
def generate_launch_description(): | |
config_directory = os.path.join( | |
ament_index_python.packages.get_package_share_directory('ublox_gps'), | |
'config') | |
params = os.path.join(config_directory, 'zed_f9p.yaml') | |
ublox_gps_node = launch_ros.actions.Node(package='ublox_gps', | |
executable='ublox_gps_node', | |
output='both', | |
parameters=[params]) | |
return launch.LaunchDescription([ublox_gps_node, | |
launch.actions.RegisterEventHandler( | |
event_handler=launch.event_handlers.OnProcessExit( | |
target_action=ublox_gps_node, | |
on_exit=[launch.actions.EmitEvent( | |
event=launch.events.Shutdown())], | |
)), | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment