base gesture
parent
c18df27d7a
commit
b6c467ed52
@ -0,0 +1,66 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import (
|
||||
PathJoinSubstitution,
|
||||
LaunchConfiguration,
|
||||
TextSubstitution,
|
||||
)
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.descriptions import ParameterFile
|
||||
|
||||
def generate_launch_description():
|
||||
pkg_unity_robot_controller = FindPackageShare(package="").find("unity_robot_controller")
|
||||
|
||||
|
||||
# Launch arguments
|
||||
launch_args = [
|
||||
DeclareLaunchArgument(
|
||||
"use_sim_time",
|
||||
description="Use clock from simulation",
|
||||
default_value="True",
|
||||
),
|
||||
DeclareLaunchArgument(
|
||||
"namespace", default_value="sirius_bot", description="Top-level namespace"
|
||||
),
|
||||
]
|
||||
|
||||
base_gesture_control_node = Node(
|
||||
package="wave_rover_controller",
|
||||
executable="base_gesture_control_node",
|
||||
name="base_gesture_control",
|
||||
namespace=LaunchConfiguration("namespace"),
|
||||
output="both",
|
||||
parameters=[
|
||||
{"fire_ext_max_capacity": 5},
|
||||
],
|
||||
remappings=[
|
||||
('image', '/camera_node/image_raw')
|
||||
]
|
||||
)
|
||||
|
||||
camera_node = Node(
|
||||
package='camera_ros',
|
||||
executable='camera_node',
|
||||
name='camera_node',
|
||||
#namespace='camera',
|
||||
output='screen',
|
||||
parameters=[{
|
||||
# Camera selection index (0 for the first detected libcamera device)
|
||||
'camera': 0,
|
||||
# Image streams configuration
|
||||
'width': 640,
|
||||
'height': 480,
|
||||
'frame_rate': 10.0,
|
||||
# Available options depend on your camera (e.g., 'sensor', 'video', 'still')
|
||||
'role': 'video',
|
||||
}]
|
||||
)
|
||||
|
||||
return LaunchDescription(
|
||||
launch_args
|
||||
+ [
|
||||
base_gesture_control_node,
|
||||
camera_node
|
||||
]
|
||||
)
|
||||
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import rclpy
|
||||
from wave_rover_controller.wave_rover_controller2 import WaveRoverController
|
||||
from unity_robot_controller.base_gesture_control_node import BaseGestureControlNode
|
||||
|
||||
def main(args=None):
|
||||
rclpy.init(args=args)
|
||||
|
||||
node = BaseGestureControlNode(WaveRoverController)
|
||||
rclpy.spin(node)
|
||||
node.destroy_node()
|
||||
rclpy.shutdown()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Reference in New Issue