diff --git a/src/ezbot_descr_simul/launch/real_robot.launch.py b/src/ezbot_descr_simul/launch/real_robot.launch.py index 1c45796..964dd27 100644 --- a/src/ezbot_descr_simul/launch/real_robot.launch.py +++ b/src/ezbot_descr_simul/launch/real_robot.launch.py @@ -5,19 +5,24 @@ from launch import LaunchDescription -from launch.actions import IncludeLaunchDescription +from launch.actions import IncludeLaunchDescription, TimerAction +from launch.actions import RegisterEventHandler +from launch.event_handlers import OnProcessStart from launch.actions import DeclareLaunchArgument import launch_ros.actions from launch.substitutions import LaunchConfiguration from launch.launch_description_sources import PythonLaunchDescriptionSource from launch_ros.actions import Node +from launch.substitutions import Command def generate_launch_description(): + logger = LaunchConfiguration('log_level') + # Include the robot_state_publisher launch file, provided by our own package. Force sim time to be enabled # !!! MAKE SURE YOU SET THE PACKAGE NAME CORRECTLY !!! @@ -26,19 +31,27 @@ def generate_launch_description(): rsp = IncludeLaunchDescription( PythonLaunchDescriptionSource([os.path.join( get_package_share_directory(package_name),'launch','rsp.launch.py' - )]), launch_arguments={'use_sim_time': 'true'}.items() + )]), launch_arguments={'use_sim_time': 'false'}.items() ) joystick = IncludeLaunchDescription( - PythonLaunchDescriptionSource([os.path.join( - get_package_share_directory("teleop_twist_joy"),'launch','teleop-launch.py' - )]), launch_arguments={'config_filepath': '/home/vincent/joystick.yaml'}.items()) - - + PythonLaunchDescriptionSource([os.path.join( + get_package_share_directory("teleop_twist_joy"),'launch','teleop-launch.py' + )]), launch_arguments={'config_filepath': '/home/vincent/joystick.yaml','joy_vel':'/omnidirectional_controller/cmd_vel_unstamped'}.items(), + + ) + homemade_controller = Node( + package='ezbot_descr_simul', + executable='homemade_controller', + name='homemade_controller', + output='screen', + parameters=[{'log_level': logger}] + ) - # Launch them all! return LaunchDescription([ rsp, - joystick + joystick, + homemade_controller + ]) \ No newline at end of file