Skip to content

Commit

Permalink
Changed vimfly to be a parameter interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
iandareid committed Aug 22, 2024
1 parent 5bb33ab commit be98801
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rosflight_sim/launch/fixedwing_sim_io_joy.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""

import os
import sys

from ament_index_python import get_package_share_directory
from launch import LaunchDescription
Expand All @@ -17,6 +18,13 @@

def generate_launch_description():
"""This is a launch file that runs the bare minimum requirements fly a fixedwing in gazebo"""

use_vimfly = False

for arg in sys.argv:
if arg.startswith("use_vimfly:="):
use_vimfly = arg.split(":=")[1]
use_vimfly = use_vimfly.lower() == 'true'

# Start simulator
simulator_launch_include = IncludeLaunchDescription(
Expand Down Expand Up @@ -44,6 +52,9 @@ def generate_launch_description():
executable='rc.py',
remappings=[
('/RC', '/fixedwing/RC')
],
parameters=[
{'use_vimfly': use_vimfly}
]
)

Expand Down

0 comments on commit be98801

Please sign in to comment.