-
Notifications
You must be signed in to change notification settings - Fork 21
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
Aldokan
committed
Feb 7, 2024
1 parent
77f190f
commit 1824f8f
Showing
4 changed files
with
76 additions
and
13 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 |
---|---|---|
@@ -1,2 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
cmake_minimum_required(VERSION 3.8) | ||
project(auv_setup) | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
find_package(ament_cmake REQUIRED) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
set(ament_cmake_copyright_FOUND TRUE) | ||
set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
# Install launch files. | ||
install(DIRECTORY | ||
config | ||
launch | ||
DESTINATION share/${PROJECT_NAME}/ | ||
) | ||
|
||
ament_package() |
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.0}, | ||
], | ||
remappings=[ | ||
('/joy', '/joystick/joy'), | ||
], | ||
) | ||
|
||
# Joystick interface launch | ||
joystick_interface_launch = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(get_package_share_directory('joystick_interface_auv'), 'launch/joystick_interface_auv.launch.py') | ||
) | ||
) | ||
|
||
# Return launch description | ||
return LaunchDescription([ | ||
set_env_var, | ||
joy_node, | ||
joystick_interface_launch | ||
]) |
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 |
---|---|---|
@@ -1,11 +1,18 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>auv_setup</name> | ||
<version>0.0.0</version> | ||
<description>The auv_setup package</description> | ||
<maintainer email="[email protected]">christopher</maintainer> | ||
<maintainer email="[email protected]">alekskl01</maintainer> | ||
<license>MIT</license> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
</package> | ||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
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