diff --git a/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py b/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py index f4299977..88cbeb9e 100644 --- a/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py +++ b/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py @@ -39,6 +39,14 @@ def generate_launch_description(): "slowdown", default_value="50.0", description="Slowdown factor of the RRbot." ) ) + declared_arguments.append( + DeclareLaunchArgument( + "use_mock_hardware", + default_value="false", + description="Use mock hardware instead of real one.", + choices=["true", "false"], + ) + ) declared_arguments.append( DeclareLaunchArgument( "robot_controller", @@ -57,6 +65,7 @@ def generate_launch_description(): # Initialize Arguments prefix = LaunchConfiguration("prefix") slowdown = LaunchConfiguration("slowdown") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") robot_controller = LaunchConfiguration("robot_controller") gui = LaunchConfiguration("gui") @@ -78,6 +87,9 @@ def generate_launch_description(): " ", "slowdown:=", slowdown, + " ", + "use_mock_hardware:=", + use_mock_hardware, ] ) robot_description = {"robot_description": robot_description_content} diff --git a/example_8/description/ros2_control/rrbot_transmissions_system_position_only.ros2_control.xacro b/example_8/description/ros2_control/rrbot_transmissions_system_position_only.ros2_control.xacro index f7d13edf..4ed10e6e 100644 --- a/example_8/description/ros2_control/rrbot_transmissions_system_position_only.ros2_control.xacro +++ b/example_8/description/ros2_control/rrbot_transmissions_system_position_only.ros2_control.xacro @@ -1,12 +1,18 @@ - + - ros2_control_demo_example_8/RRBotTransmissionsSystemPositionOnlyHardware + + mock_components/GenericSystem + ${mock_sensor_commands} + + + ros2_control_demo_example_8/RRBotTransmissionsSystemPositionOnlyHardware + ${slowdown} @@ -31,7 +37,7 @@ 2.0 - 0.0 + 0.2 @@ -40,7 +46,7 @@ 4.0 - 0.0 + -0.2 diff --git a/example_8/description/urdf/rrbot_transmissions_system_position_only.urdf.xacro b/example_8/description/urdf/rrbot_transmissions_system_position_only.urdf.xacro index 02181f55..dcc00f89 100644 --- a/example_8/description/urdf/rrbot_transmissions_system_position_only.urdf.xacro +++ b/example_8/description/urdf/rrbot_transmissions_system_position_only.urdf.xacro @@ -9,6 +9,7 @@ https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_desc + @@ -27,7 +28,10 @@ https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_desc + name="RRBotTransmissionsSystemPositionOnly" + prefix="$(arg prefix)" + slowdown="$(arg slowdown)" + use_mock_hardware="$(arg use_mock_hardware)" + />