diff --git a/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/launch/keyboard_server.launch.py b/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/launch/keyboard_server.launch.py new file mode 100644 index 000000000..234e9b74c --- /dev/null +++ b/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/launch/keyboard_server.launch.py @@ -0,0 +1,54 @@ +# Copyright 2021 RobosoftAI Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument, OpaqueFunction +from launch.substitutions import LaunchConfiguration, PathJoinSubstitution +from launch_ros.actions import Node +from launch_ros.substitutions import FindPackageShare +from ament_index_python.packages import get_package_share_directory +from moveit_configs_utils import MoveItConfigsBuilder + + +def generate_launch_description(): + + declared_arguments = [] + declared_arguments.append( + DeclareLaunchArgument( + "rviz_config", + default_value="panda_moveit_config_demo.rviz", + description="RViz configuration file", + ) + ) + + return LaunchDescription(declared_arguments + [OpaqueFunction(function=launch_setup)]) + + +def launch_setup(context, *args, **kwargs): + + keyboard_client_node = Node( + package="keyboard_client", + executable="keyboard_server_node.py", + name="keyboard_client", + output="screen", + prefix="xterm -hold -e", + arguments=["--ros-args", "--log-level", "INFO"], + ) + + nodes_to_start = [ + keyboard_client_node, + ] + + return nodes_to_start diff --git a/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/launch/sm_multi_panda_sim.launch.py b/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/launch/sm_multi_panda_sim.launch.py index 2ad945367..c6886fc72 100644 --- a/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/launch/sm_multi_panda_sim.launch.py +++ b/smacc2_sm_reference_library/sm_multi_panda_sim/sm_multi_panda_sim/launch/sm_multi_panda_sim.launch.py @@ -41,4 +41,14 @@ def generate_launch_description(): ) ) - return LaunchDescription([panda_arm_1, panda_arm_2]) + keyboard_server = IncludeLaunchDescription( + AnyLaunchDescriptionSource( + os.path.join( + get_package_share_directory("sm_multi_panda_sim"), + "launch", + "keyboard_server.launch.py", + ) + ) + ) + + return LaunchDescription([panda_arm_1, panda_arm_2, keyboard_server]) diff --git a/smacc2_sm_reference_library/sm_panda_moveit2z_cb_inventory/config/move_group_client/known_states/control_authority_posture2.yaml b/smacc2_sm_reference_library/sm_panda_moveit2z_cb_inventory/config/move_group_client/known_states/control_authority_posture2.yaml index a8c023890..28318c0c3 100644 --- a/smacc2_sm_reference_library/sm_panda_moveit2z_cb_inventory/config/move_group_client/known_states/control_authority_posture2.yaml +++ b/smacc2_sm_reference_library/sm_panda_moveit2z_cb_inventory/config/move_group_client/known_states/control_authority_posture2.yaml @@ -1,4 +1,3 @@ joint_states: panda_finger_joint1: 0.03 panda_finger_joint2: 0.03 -