-
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.
created py launchfiles for joystick_interface and pc.launch + minor r…
…estructuring
- Loading branch information
Showing
11 changed files
with
74 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import os | ||
from launch import LaunchDescription | ||
from launch.actions import SetEnvironmentVariable, IncludeLaunchDescription | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch_ros.actions import Node | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
def generate_launch_description(): | ||
# Set environment variable | ||
set_env_var = SetEnvironmentVariable( | ||
name='ROSCONSOLE_FORMAT', | ||
value='[${severity}] [${time}] [${node}]: ${message}' | ||
) | ||
|
||
# Joystick node | ||
joy_node = Node( | ||
package='joy', | ||
executable='joy_node', | ||
name='joystick_driver', | ||
output='screen', | ||
parameters=[ | ||
{'_deadzone': 0.15}, | ||
{'_autorepeat_rate': 100}, | ||
], | ||
remappings=[ | ||
('/joy', '/joystick/joy'), | ||
], | ||
) | ||
|
||
# Joystick interface launch | ||
joystick_interface_launch = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(get_package_share_directory('joystick_interface'), 'launch/joystick_interface.launch.py') | ||
) | ||
) | ||
|
||
# Return launch description | ||
return LaunchDescription([ | ||
set_env_var, | ||
joy_node, | ||
joystick_interface_launch | ||
]) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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
21 changes: 21 additions & 0 deletions
21
mission/joystick_interface/launch/joystick_interface.launch.py
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,21 @@ | ||
import os | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.substitutions import LaunchConfiguration | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
|
||
def generate_launch_description(): | ||
|
||
joystick_interface_node = Node( | ||
package='joystick_interface', | ||
executable='joystick_interface.py', | ||
name='joystick_interface', | ||
output='screen', | ||
parameters=[os.path.join(get_package_share_directory('joystick_interface'), 'config/param_joystick_interface.yaml')] | ||
) | ||
|
||
return LaunchDescription([ | ||
joystick_interface_node | ||
]) | ||
|
13 changes: 0 additions & 13 deletions
13
mission/joystick_interface/launch/joystick_interface.launch.yaml
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.