diff --git a/lbr_bringup/lbr_bringup/ros2_control.py b/lbr_bringup/lbr_bringup/ros2_control.py index c5a23321..9bd23c6b 100644 --- a/lbr_bringup/lbr_bringup/ros2_control.py +++ b/lbr_bringup/lbr_bringup/ros2_control.py @@ -37,11 +37,11 @@ def arg_ctrl() -> DeclareLaunchArgument: "lbr_torque_command_controller", "lbr_wrench_command_controller", "twist_controller", - "cartesian_impedance_controller", - "gravity_compensation" + "gravity_compensation", + "cartesian_impedance_controller" ], ) - + @staticmethod def arg_sys_cfg_pkg() -> DeclareLaunchArgument: return DeclareLaunchArgument( @@ -68,7 +68,6 @@ def arg_use_sim_time() -> DeclareLaunchArgument: @staticmethod def node_ros2_control( - robot_description: Dict[str, str], robot_name: Optional[Union[LaunchConfiguration, str]] = LaunchConfiguration( "robot_name", default="lbr" ), @@ -84,8 +83,7 @@ def node_ros2_control( package="controller_manager", executable="ros2_control_node", parameters=[ - robot_description, - {"use_sim_time": False}, + {"use_sim_time": use_sim_time}, PathJoinSubstitution( [ FindPackageShare( @@ -104,7 +102,7 @@ def node_ros2_control( remappings=[ ("~/robot_description", "robot_description"), ("cartesian_impedance_controller/target_frame", "target_frame"), - ("cartesian_impedance_controller/target_wrench", "target_wrench"), + ("cartesian_impedance_controller/target_wrench", "target_wrench") ], **kwargs, ) diff --git a/lbr_description/ros2_control/lbr_controllers.yaml b/lbr_description/ros2_control/lbr_controllers.yaml index 90e2f4db..c2b684bc 100644 --- a/lbr_description/ros2_control/lbr_controllers.yaml +++ b/lbr_description/ros2_control/lbr_controllers.yaml @@ -145,4 +145,5 @@ - lbr_A5 - lbr_A6 - lbr_A7 + # flag used to enable position command together with effort command kuka: true \ No newline at end of file