From 5e11636056db2b1d988c438afb2c976a58938347 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Tue, 11 Jul 2023 08:21:29 +0200 Subject: [PATCH 1/2] Use mock_hardware and mock_sensor_commands instead of fake This has been deprecated a while back and was never adapted. --- ur_moveit_config/launch/ur_moveit.launch.py | 10 +++---- ur_robot_driver/launch/ur10.launch.py | 18 ++++++------- ur_robot_driver/launch/ur10e.launch.py | 18 ++++++------- ur_robot_driver/launch/ur16e.launch.py | 18 ++++++------- ur_robot_driver/launch/ur3.launch.py | 18 ++++++------- ur_robot_driver/launch/ur3e.launch.py | 18 ++++++------- ur_robot_driver/launch/ur5.launch.py | 18 ++++++------- ur_robot_driver/launch/ur5e.launch.py | 18 ++++++------- ur_robot_driver/launch/ur_control.launch.py | 30 ++++++++++----------- 9 files changed, 83 insertions(+), 83 deletions(-) diff --git a/ur_moveit_config/launch/ur_moveit.launch.py b/ur_moveit_config/launch/ur_moveit.launch.py index 279ef69f6..3f52aef33 100644 --- a/ur_moveit_config/launch/ur_moveit.launch.py +++ b/ur_moveit_config/launch/ur_moveit.launch.py @@ -44,7 +44,7 @@ def launch_setup(context, *args, **kwargs): # Initialize Arguments ur_type = LaunchConfiguration("ur_type") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") safety_limits = LaunchConfiguration("safety_limits") safety_pos_margin = LaunchConfiguration("safety_pos_margin") safety_k_position = LaunchConfiguration("safety_k_position") @@ -166,8 +166,8 @@ def launch_setup(context, *args, **kwargs): # Trajectory Execution Configuration controllers_yaml = load_yaml("ur_moveit_config", "config/controllers.yaml") - # the scaled_joint_trajectory_controller does not work on fake hardware - change_controllers = context.perform_substitution(use_fake_hardware) + # the scaled_joint_trajectory_controller does not work on mock hardware + change_controllers = context.perform_substitution(use_mock_hardware) if change_controllers == "true": controllers_yaml["scaled_joint_trajectory_controller"]["default"] = False controllers_yaml["joint_trajectory_controller"]["default"] = True @@ -268,9 +268,9 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Indicate whether robot is running with fake hardware mirroring command to its states.", + description="Indicate whether robot is running with mock hardware mirroring command to its states.", ) ) declared_arguments.append( diff --git a/ur_robot_driver/launch/ur10.launch.py b/ur_robot_driver/launch/ur10.launch.py index e838f7ce9..fe484af5e 100644 --- a/ur_robot_driver/launch/ur10.launch.py +++ b/ur_robot_driver/launch/ur10.launch.py @@ -46,17 +46,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( @@ -82,8 +82,8 @@ def generate_launch_description(): # Initialize Arguments robot_ip = LaunchConfiguration("robot_ip") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -92,8 +92,8 @@ def generate_launch_description(): launch_arguments={ "ur_type": "ur10", "robot_ip": robot_ip, - "use_fake_hardware": use_fake_hardware, - "fake_sensor_commands": fake_sensor_commands, + "use_mock_hardware": use_mock_hardware, + "mock_sensor_commands": mock_sensor_commands, "initial_joint_controller": initial_joint_controller, "activate_joint_controller": activate_joint_controller, }.items(), diff --git a/ur_robot_driver/launch/ur10e.launch.py b/ur_robot_driver/launch/ur10e.launch.py index f0142749c..a75b5ad9c 100644 --- a/ur_robot_driver/launch/ur10e.launch.py +++ b/ur_robot_driver/launch/ur10e.launch.py @@ -46,17 +46,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( @@ -82,8 +82,8 @@ def generate_launch_description(): # Initialize Arguments robot_ip = LaunchConfiguration("robot_ip") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -92,8 +92,8 @@ def generate_launch_description(): launch_arguments={ "ur_type": "ur10e", "robot_ip": robot_ip, - "use_fake_hardware": use_fake_hardware, - "fake_sensor_commands": fake_sensor_commands, + "use_mock_hardware": use_mock_hardware, + "mock_sensor_commands": mock_sensor_commands, "initial_joint_controller": initial_joint_controller, "activate_joint_controller": activate_joint_controller, }.items(), diff --git a/ur_robot_driver/launch/ur16e.launch.py b/ur_robot_driver/launch/ur16e.launch.py index d27c8bf37..e488b40e7 100644 --- a/ur_robot_driver/launch/ur16e.launch.py +++ b/ur_robot_driver/launch/ur16e.launch.py @@ -46,17 +46,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( @@ -82,8 +82,8 @@ def generate_launch_description(): # Initialize Arguments robot_ip = LaunchConfiguration("robot_ip") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -92,8 +92,8 @@ def generate_launch_description(): launch_arguments={ "ur_type": "ur16e", "robot_ip": robot_ip, - "use_fake_hardware": use_fake_hardware, - "fake_sensor_commands": fake_sensor_commands, + "use_mock_hardware": use_mock_hardware, + "mock_sensor_commands": mock_sensor_commands, "initial_joint_controller": initial_joint_controller, "activate_joint_controller": activate_joint_controller, }.items(), diff --git a/ur_robot_driver/launch/ur3.launch.py b/ur_robot_driver/launch/ur3.launch.py index 7add62462..c7b823eea 100644 --- a/ur_robot_driver/launch/ur3.launch.py +++ b/ur_robot_driver/launch/ur3.launch.py @@ -46,17 +46,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( @@ -82,8 +82,8 @@ def generate_launch_description(): # Initialize Arguments robot_ip = LaunchConfiguration("robot_ip") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -92,8 +92,8 @@ def generate_launch_description(): launch_arguments={ "ur_type": "ur3", "robot_ip": robot_ip, - "use_fake_hardware": use_fake_hardware, - "fake_sensor_commands": fake_sensor_commands, + "use_mock_hardware": use_mock_hardware, + "mock_sensor_commands": mock_sensor_commands, "initial_joint_controller": initial_joint_controller, "activate_joint_controller": activate_joint_controller, }.items(), diff --git a/ur_robot_driver/launch/ur3e.launch.py b/ur_robot_driver/launch/ur3e.launch.py index e9745d5c1..0ba3bcbad 100644 --- a/ur_robot_driver/launch/ur3e.launch.py +++ b/ur_robot_driver/launch/ur3e.launch.py @@ -46,17 +46,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( @@ -82,8 +82,8 @@ def generate_launch_description(): # Initialize Arguments robot_ip = LaunchConfiguration("robot_ip") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -92,8 +92,8 @@ def generate_launch_description(): launch_arguments={ "ur_type": "ur3e", "robot_ip": robot_ip, - "use_fake_hardware": use_fake_hardware, - "fake_sensor_commands": fake_sensor_commands, + "use_mock_hardware": use_mock_hardware, + "mock_sensor_commands": mock_sensor_commands, "initial_joint_controller": initial_joint_controller, "activate_joint_controller": activate_joint_controller, }.items(), diff --git a/ur_robot_driver/launch/ur5.launch.py b/ur_robot_driver/launch/ur5.launch.py index 14bb98c0b..6a6300e7e 100644 --- a/ur_robot_driver/launch/ur5.launch.py +++ b/ur_robot_driver/launch/ur5.launch.py @@ -46,17 +46,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( @@ -82,8 +82,8 @@ def generate_launch_description(): # Initialize Arguments robot_ip = LaunchConfiguration("robot_ip") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -92,8 +92,8 @@ def generate_launch_description(): launch_arguments={ "ur_type": "ur5", "robot_ip": robot_ip, - "use_fake_hardware": use_fake_hardware, - "fake_sensor_commands": fake_sensor_commands, + "use_mock_hardware": use_mock_hardware, + "mock_sensor_commands": mock_sensor_commands, "initial_joint_controller": initial_joint_controller, "activate_joint_controller": activate_joint_controller, }.items(), diff --git a/ur_robot_driver/launch/ur5e.launch.py b/ur_robot_driver/launch/ur5e.launch.py index 0b5c6f856..3a166cce7 100644 --- a/ur_robot_driver/launch/ur5e.launch.py +++ b/ur_robot_driver/launch/ur5e.launch.py @@ -46,17 +46,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( @@ -82,8 +82,8 @@ def generate_launch_description(): # Initialize Arguments robot_ip = LaunchConfiguration("robot_ip") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -92,8 +92,8 @@ def generate_launch_description(): launch_arguments={ "ur_type": "ur5e", "robot_ip": robot_ip, - "use_fake_hardware": use_fake_hardware, - "fake_sensor_commands": fake_sensor_commands, + "use_mock_hardware": use_mock_hardware, + "mock_sensor_commands": mock_sensor_commands, "initial_joint_controller": initial_joint_controller, "activate_joint_controller": activate_joint_controller, }.items(), diff --git a/ur_robot_driver/launch/ur_control.launch.py b/ur_robot_driver/launch/ur_control.launch.py index 11c9d3482..6231f7a39 100644 --- a/ur_robot_driver/launch/ur_control.launch.py +++ b/ur_robot_driver/launch/ur_control.launch.py @@ -51,8 +51,8 @@ def launch_setup(context, *args, **kwargs): description_package = LaunchConfiguration("description_package") description_file = LaunchConfiguration("description_file") tf_prefix = LaunchConfiguration("tf_prefix") - use_fake_hardware = LaunchConfiguration("use_fake_hardware") - fake_sensor_commands = LaunchConfiguration("fake_sensor_commands") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") controller_spawner_timeout = LaunchConfiguration("controller_spawner_timeout") initial_joint_controller = LaunchConfiguration("initial_joint_controller") activate_joint_controller = LaunchConfiguration("activate_joint_controller") @@ -138,11 +138,11 @@ def launch_setup(context, *args, **kwargs): "tf_prefix:=", tf_prefix, " ", - "use_fake_hardware:=", - use_fake_hardware, + "use_mock_hardware:=", + use_mock_hardware, " ", - "fake_sensor_commands:=", - fake_sensor_commands, + "mock_sensor_commands:=", + mock_sensor_commands, " ", "headless_mode:=", headless_mode, @@ -206,7 +206,7 @@ def launch_setup(context, *args, **kwargs): executable="ros2_control_node", parameters=[robot_description, update_rate_config_file, initial_joint_controllers], output="screen", - condition=IfCondition(use_fake_hardware), + condition=IfCondition(use_mock_hardware), ) ur_control_node = Node( @@ -214,12 +214,12 @@ def launch_setup(context, *args, **kwargs): executable="ur_ros2_control_node", parameters=[robot_description, update_rate_config_file, initial_joint_controllers], output="screen", - condition=UnlessCondition(use_fake_hardware), + condition=UnlessCondition(use_mock_hardware), ) dashboard_client_node = Node( package="ur_robot_driver", - condition=IfCondition(launch_dashboard_client) and UnlessCondition(use_fake_hardware), + condition=IfCondition(launch_dashboard_client) and UnlessCondition(use_mock_hardware), executable="dashboard_client", name="dashboard_client", output="screen", @@ -248,7 +248,7 @@ def launch_setup(context, *args, **kwargs): name="controller_stopper", output="screen", emulate_tty=True, - condition=UnlessCondition(use_fake_hardware), + condition=UnlessCondition(use_mock_hardware), parameters=[ {"headless_mode": headless_mode}, {"joint_controller_active": activate_joint_controller}, @@ -427,17 +427,17 @@ def generate_launch_description(): ) declared_arguments.append( DeclareLaunchArgument( - "use_fake_hardware", + "use_mock_hardware", default_value="false", - description="Start robot with fake hardware mirroring command to its states.", + description="Start robot with mock hardware mirroring command to its states.", ) ) declared_arguments.append( DeclareLaunchArgument( - "fake_sensor_commands", + "mock_sensor_commands", default_value="false", - description="Enable fake command interfaces for sensors used for simple simulations. \ - Used only if 'use_fake_hardware' parameter is true.", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", ) ) declared_arguments.append( From f5542c9868c2c77472d75877f13533a5dcd88925 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Wed, 12 Jul 2023 20:19:02 +0200 Subject: [PATCH 2/2] Update documentation to mock_hardware --- ur_calibration/README.md | 2 +- .../doc/setup_tool_communication.rst | 2 +- ur_robot_driver/doc/usage.rst | 30 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ur_calibration/README.md b/ur_calibration/README.md index d55e4763a..06567be28 100644 --- a/ur_calibration/README.md +++ b/ur_calibration/README.md @@ -74,5 +74,5 @@ Then, anybody cloning this repository can startup the robot simply by launching $ cd $ colcon build --packages-select _ur_launch $ ros2 launch _ur_launch ex-ur10-1.launch.py -robot_ip:=xxx.yyy.zzz.www ur_type:=ur5e use_fake_hardware:=false launch_rviz:=true +robot_ip:=xxx.yyy.zzz.www ur_type:=ur5e use_mock_hardware:=false launch_rviz:=true ``` diff --git a/ur_robot_driver/doc/setup_tool_communication.rst b/ur_robot_driver/doc/setup_tool_communication.rst index ff6516807..82ea00eec 100644 --- a/ur_robot_driver/doc/setup_tool_communication.rst +++ b/ur_robot_driver/doc/setup_tool_communication.rst @@ -38,7 +38,7 @@ launch files: .. code-block:: bash - $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_tool_communication:=true use_fake_hardware:=false launch_rviz:=false + $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_tool_communication:=true use_mock_hardware:=false launch_rviz:=false # remember that your user needs to have the rights to write that file handle to /tmp/ttyUR Following parameters can be set `ur.ros2_control.xacro `_\ : diff --git a/ur_robot_driver/doc/usage.rst b/ur_robot_driver/doc/usage.rst index 0fad8972a..c43b5e550 100644 --- a/ur_robot_driver/doc/usage.rst +++ b/ur_robot_driver/doc/usage.rst @@ -22,9 +22,9 @@ The most relevant arguments are the following: * ``ur_type`` (\ *mandatory* ) - a type of used UR robot (\ *ur3*\ , *ur3e*\ , *ur5*\ , *ur5e*\ , *ur10*\ , *ur10e*\ , or *ur16e*\ ). * ``robot_ip`` (\ *mandatory* ) - IP address by which the root can be reached. -* ``use_fake_hardware`` (default: *false* ) - use simple hardware emulator from ros2_control. +* ``use_mock_hardware`` (default: *false* ) - use simple hardware emulator from ros2_control. Useful for testing launch files, descriptions, etc. See explanation below. -* ``initial_positions`` (default: dictionary with all joint values set to 0) - Allows passing a dictionary to set the initial joint values for the fake hardware from `ros2_control `_. It can also be set from a yaml file with the ``load_yaml`` commands as follows: +* ``initial_positions`` (default: dictionary with all joint values set to 0) - Allows passing a dictionary to set the initial joint values for the mock hardware from `ros2_control `_. It can also be set from a yaml file with the ``load_yaml`` commands as follows: .. code-block:: @@ -41,7 +41,7 @@ The most relevant arguments are the following: wrist_2_joint: -1.765 wrist_3_joint: 0.0 -* ``fake_sensor_commands`` (default: *false* ) - enables setting sensor values for the hardware emulators. +* ``mock_sensor_commands`` (default: *false* ) - enables setting sensor values for the hardware emulators. Useful for offline testing of controllers. * ``robot_controller`` (default: *joint_trajectory_controller* ) - controller for robot joints to be started. @@ -55,12 +55,12 @@ The most relevant arguments are the following: *HINT* : list all loaded controllers using ``ros2 control list_controllers`` command. -**NOTE**\ : The package can simulate hardware with the ros2_control ``FakeSystem``. This emulator enables an environment for testing of "piping" of hardware and controllers, as well as testing robot's descriptions. For more details see `ros2_control documentation `_ for more details. +**NOTE**\ : The package can simulate hardware with the ros2_control ``MockSystem``. This emulator enables an environment for testing of "piping" of hardware and controllers, as well as testing robot's descriptions. For more details see `ros2_control documentation `_ for more details. Modes of operation ------------------ -As mentioned in the last section the driver has two basic modes of operation: Using fake hardware or +As mentioned in the last section the driver has two basic modes of operation: Using mock hardware or using real hardware(Or the URSim simulator, which is equivalent from the driver's perspective). Additionally, the robot can be simulated using `Gazebo `_ or @@ -72,7 +72,7 @@ outside of this driver's scope. * - mode - available controllers - * - fake_hardware + * - mock_hardware - :raw-html-m2r:`
  • joint_trajectory_controller
  • forward_velocity_controller
  • forward_position_controller
` * - real hardware / URSim - :raw-html-m2r:`
  • joint_trajectory_controller
  • scaled_joint_trajectory_controller
  • forward_velocity_controller
  • forward_position_controller
` @@ -124,11 +124,11 @@ Allowed UR - Type strings: ``ur3``\ , ``ur3e``\ , ``ur5``\ , ``ur5e``\ , ``ur10` * To do an offline test with URSim check details about it in `this section <#usage-with-official-ur-simulator>`_ -* To use mocked hardware(capability of ros2_control), use ``use_fake_hardware`` argument, like: +* To use mocked hardware(capability of ros2_control), use ``use_mock_hardware`` argument, like: .. code-block:: - ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=true + ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_mock_hardware:=true launch_rviz:=true **NOTE**\ : Instead of using the global launch file for control stack, there are also prepeared launch files for each type of UR robots named. They accept the same arguments are the global one and are used by: @@ -150,11 +150,11 @@ Before running any commands, first check the controllers' state using ``ros2 con After a few seconds the robot should move. -* To test another controller, simply define it using ``initial_joint_controller`` argument, for example when using fake hardware: +* To test another controller, simply define it using ``initial_joint_controller`` argument, for example when using mock hardware: .. code-block:: - ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy initial_joint_controller:=joint_trajectory_controller use_fake_hardware:=true launch_rviz:=true + ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy initial_joint_controller:=joint_trajectory_controller use_mock_hardware:=true launch_rviz:=true And send the command using demo node: @@ -191,17 +191,17 @@ To test the driver with the example MoveIt-setup, first start the driver as desc Now you should be able to use the MoveIt Plugin in rviz2 to plan and execute trajectories with the robot as explained `here `_. -Fake hardware +Mock hardware ^^^^^^^^^^^^^ -Currently, the ``scaled_joint_trajectory_controller`` does not work with ros2_control fake_hardware. There is an -`upstream Merge-Request `_ pending to fix that. Until this is merged and released, you'll have to fallback to the ``joint_trajectory_controller`` by passing ``initial_controller:=joint_trajectory_controller`` to the driver's startup. Also, you'll have to tell MoveIt! that you're using fake_hardware as it then has to map to the other controller: +Currently, the ``scaled_joint_trajectory_controller`` does not work with ros2_control mock_hardware. There is an +`upstream Merge-Request `_ pending to fix that. Until this is merged and released, you'll have to fallback to the ``joint_trajectory_controller`` by passing ``initial_controller:=joint_trajectory_controller`` to the driver's startup. Also, you'll have to tell MoveIt! that you're using mock_hardware as it then has to map to the other controller: .. code-block:: - ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=false initial_joint_controller:=joint_trajectory_controller + ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_mock_hardware:=true launch_rviz:=false initial_joint_controller:=joint_trajectory_controller # and in another shell - ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e launch_rviz:=true use_fake_hardware:=true + ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e launch_rviz:=true use_mock_hardware:=true Robot frames ------------