Skip to content

Commit

Permalink
launch file in python
Browse files Browse the repository at this point in the history
  • Loading branch information
LeRatDuFA committed Oct 28, 2023
1 parent 275b625 commit 0832c05
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
3 changes: 1 addition & 2 deletions asv_setup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ endif()

find_package(ament_cmake_python REQUIRED)
find_package(rclpy REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)

ament_python_install_package(scripts)

Expand All @@ -23,4 +21,5 @@ install(PROGRAMS
DESTINATION lib/${PROJECT_NAME}
)


ament_package()
10 changes: 0 additions & 10 deletions asv_setup/launch/launch_to_erase.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions asv_setup/launch/parameter_manager_to_erase.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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():

parameter_manager_node = Node(
package='asv_setup',
executable='parameter_manager_node.py',
name='parameter_manager_node',
output='screen',
parameters=[os.path.join(get_package_share_directory('asv_setup'), 'config','freya.yaml')]
)

return LaunchDescription([
parameter_manager_node
])
3 changes: 1 addition & 2 deletions asv_setup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<buildtool_depend>ament_cmake_python</buildtool_depend>

<exec_depend>rclpy</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>



<export>
Expand Down
7 changes: 4 additions & 3 deletions asv_setup/scripts/parameter_manager_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ def StringInto2DArray(input_string):
def main():
rclpy.init()
parameter_manager_node = ParameterManagerNode()
test = parameter_manager_node.configuration_matrix
print(test)
#rclpy.spin(joystick_interface)

#test = parameter_manager_node.configuration_matrix
#print(test)

parameter_manager_node.destroy_node()
rclpy.shutdown()

Expand Down

0 comments on commit 0832c05

Please sign in to comment.