Skip to content

Commit

Permalink
launch file for the real robot
Browse files Browse the repository at this point in the history
  • Loading branch information
VincidaB committed Jan 24, 2024
1 parent 990ea68 commit 25d976a
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/ezbot_descr_simul/launch/real_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 !!!

Expand All @@ -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

])

0 comments on commit 25d976a

Please sign in to comment.