15#ifndef ROS2_CONTROL_TEST_ASSETS__DESCRIPTIONS_HPP_
16#define ROS2_CONTROL_TEST_ASSETS__DESCRIPTIONS_HPP_
21namespace ros2_control_test_assets
25<?xml version="1.0" encoding="utf-8"?>
26<robot name="MinimalRobot">
27 <!-- Used for fixing robot -->
29 <joint name="base_joint" type="fixed">
30 <origin rpy="0 0 0" xyz="0 0 0"/>
31 <parent link="world"/>
32 <child link="base_link"/>
34 <link name="base_link">
38 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
41 <origin rpy="0 0 0" xyz="0 0 0"/>
43 <cylinder length="0.2" radius="0.1"/>
45 <material name="DarkGrey">
46 <color rgba="0.4 0.4 0.4 1.0"/>
50 <origin rpy="0 0 0" xyz="0 0 0"/>
52 <cylinder length="1" radius="0.1"/>
56 <joint name="joint1" type="revolute">
57 <origin rpy="-1.57079632679 0 0" xyz="0 0 0.2"/>
58 <parent link="base_link"/>
60 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
66 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
69 <origin rpy="0 0 0" xyz="0 0 0"/>
71 <cylinder length="1" radius="0.1"/>
73 <material name="DarkGrey">
74 <color rgba="0.4 0.4 0.4 1.0"/>
78 <origin rpy="0 0 0" xyz="0 0 0"/>
80 <cylinder length="1" radius="0.1"/>
84 <joint name="joint2" type="revolute">
85 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
86 <parent link="link1"/>
88 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
89 <safety_controller soft_lower_limit="-1.5" soft_upper_limit="0.5" k_position="10.0" k_velocity="20.0"/>
95 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
98 <origin rpy="0 0 0" xyz="0 0 0"/>
100 <cylinder length="1" radius="0.1"/>
102 <material name="DarkGrey">
103 <color rgba="0.4 0.4 0.4 1.0"/>
107 <origin rpy="0 0 0" xyz="0 0 0"/>
109 <cylinder length="1" radius="0.1"/>
113 <joint name="joint3" type="revolute">
114 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
115 <parent link="link2"/>
116 <child link="link3"/>
117 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
122 <origin xyz="0 0 0"/>
123 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
126 <origin rpy="0 0 0" xyz="0 0 0"/>
128 <cylinder length="1" radius="0.1"/>
130 <material name="DarkGrey">
131 <color rgba="0.4 0.4 0.4 1.0"/>
135 <origin rpy="0 0 0" xyz="0 0 0"/>
137 <cylinder length="1" radius="0.1"/>
141 <joint name="tool_joint" type="fixed">
142 <origin rpy="0 0 0" xyz="0 0 1"/>
143 <parent link="link2"/>
144 <child link="tool_link"/>
146 <link name="tool_link">
150const auto urdf_head_revolute_missing_limits =
152<?xml version="1.0" encoding="utf-8"?>
153<robot name="MinimalRobot">
154 <!-- Used for fixing robot -->
156 <joint name="base_joint" type="fixed">
157 <origin rpy="0 0 0" xyz="0 0 0"/>
158 <parent link="world"/>
159 <child link="base_link"/>
161 <link name="base_link">
164 <origin xyz="0 0 0"/>
165 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
168 <origin rpy="0 0 0" xyz="0 0 0"/>
170 <cylinder length="0.2" radius="0.1"/>
172 <material name="DarkGrey">
173 <color rgba="0.4 0.4 0.4 1.0"/>
177 <origin rpy="0 0 0" xyz="0 0 0"/>
179 <cylinder length="1" radius="0.1"/>
183 <joint name="joint1" type="revolute">
184 <origin rpy="-1.57079632679 0 0" xyz="0 0 0.2"/>
185 <parent link="base_link"/>
186 <child link="link1"/>
191 <origin xyz="0 0 0"/>
192 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
195 <origin rpy="0 0 0" xyz="0 0 0"/>
197 <cylinder length="1" radius="0.1"/>
199 <material name="DarkGrey">
200 <color rgba="0.4 0.4 0.4 1.0"/>
204 <origin rpy="0 0 0" xyz="0 0 0"/>
206 <cylinder length="1" radius="0.1"/>
210 <joint name="joint2" type="revolute">
211 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
212 <parent link="link1"/>
213 <child link="link2"/>
214 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
219 <origin xyz="0 0 0"/>
220 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
223 <origin rpy="0 0 0" xyz="0 0 0"/>
225 <cylinder length="1" radius="0.1"/>
227 <material name="DarkGrey">
228 <color rgba="0.4 0.4 0.4 1.0"/>
232 <origin rpy="0 0 0" xyz="0 0 0"/>
234 <cylinder length="1" radius="0.1"/>
240const auto urdf_head_continuous_missing_limits =
242<?xml version="1.0" encoding="utf-8"?>
243<robot name="MinimalRobot">
244 <!-- Used for fixing robot -->
246 <joint name="base_joint" type="fixed">
247 <origin rpy="0 0 0" xyz="0 0 0"/>
248 <parent link="world"/>
249 <child link="base_link"/>
251 <link name="base_link">
254 <origin xyz="0 0 0"/>
255 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
258 <origin rpy="0 0 0" xyz="0 0 0"/>
260 <cylinder length="0.2" radius="0.1"/>
262 <material name="DarkGrey">
263 <color rgba="0.4 0.4 0.4 1.0"/>
267 <origin rpy="0 0 0" xyz="0 0 0"/>
269 <cylinder length="1" radius="0.1"/>
273 <joint name="joint1" type="continuous">
274 <origin rpy="-1.57079632679 0 0" xyz="0 0 0.2"/>
275 <parent link="base_link"/>
276 <child link="link1"/>
281 <origin xyz="0 0 0"/>
282 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
285 <origin rpy="0 0 0" xyz="0 0 0"/>
287 <cylinder length="1" radius="0.1"/>
289 <material name="DarkGrey">
290 <color rgba="0.4 0.4 0.4 1.0"/>
294 <origin rpy="0 0 0" xyz="0 0 0"/>
296 <cylinder length="1" radius="0.1"/>
300 <joint name="joint2" type="continuous">
301 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
302 <parent link="link1"/>
303 <child link="link2"/>
308 <origin xyz="0 0 0"/>
309 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
312 <origin rpy="0 0 0" xyz="0 0 0"/>
314 <cylinder length="1" radius="0.1"/>
316 <material name="DarkGrey">
317 <color rgba="0.4 0.4 0.4 1.0"/>
321 <origin rpy="0 0 0" xyz="0 0 0"/>
323 <cylinder length="1" radius="0.1"/>
327 <joint name="joint3" type="revolute">
328 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
329 <parent link="link2"/>
330 <child link="link3"/>
331 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
336 <origin xyz="0 0 0"/>
337 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
340 <origin rpy="0 0 0" xyz="0 0 0"/>
342 <cylinder length="1" radius="0.1"/>
344 <material name="DarkGrey">
345 <color rgba="0.4 0.4 0.4 1.0"/>
349 <origin rpy="0 0 0" xyz="0 0 0"/>
351 <cylinder length="1" radius="0.1"/>
355 <joint name="tool_joint" type="fixed">
356 <origin rpy="0 0 0" xyz="0 0 1"/>
357 <parent link="link2"/>
358 <child link="tool_link"/>
360 <link name="tool_link">
364const auto urdf_head_continuous_with_limits =
366<?xml version="1.0" encoding="utf-8"?>
367<robot name="MinimalRobot">
368 <!-- Used for fixing robot -->
370 <joint name="base_joint" type="fixed">
371 <origin rpy="0 0 0" xyz="0 0 0"/>
372 <parent link="world"/>
373 <child link="base_link"/>
375 <link name="base_link">
378 <origin xyz="0 0 0"/>
379 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
382 <origin rpy="0 0 0" xyz="0 0 0"/>
384 <cylinder length="0.2" radius="0.1"/>
386 <material name="DarkGrey">
387 <color rgba="0.4 0.4 0.4 1.0"/>
391 <origin rpy="0 0 0" xyz="0 0 0"/>
393 <cylinder length="1" radius="0.1"/>
397 <joint name="joint1" type="continuous">
398 <origin rpy="-1.57079632679 0 0" xyz="0 0 0.2"/>
399 <parent link="base_link"/>
400 <child link="link1"/>
401 <limit effort="0.1" velocity="0.2"/>
406 <origin xyz="0 0 0"/>
407 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
410 <origin rpy="0 0 0" xyz="0 0 0"/>
412 <cylinder length="1" radius="0.1"/>
414 <material name="DarkGrey">
415 <color rgba="0.4 0.4 0.4 1.0"/>
419 <origin rpy="0 0 0" xyz="0 0 0"/>
421 <cylinder length="1" radius="0.1"/>
425 <joint name="joint2" type="continuous">
426 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
427 <parent link="link1"/>
428 <child link="link2"/>
429 <limit effort="0.1" velocity="0.2"/>
434 <origin xyz="0 0 0"/>
435 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
438 <origin rpy="0 0 0" xyz="0 0 0"/>
440 <cylinder length="1" radius="0.1"/>
442 <material name="DarkGrey">
443 <color rgba="0.4 0.4 0.4 1.0"/>
447 <origin rpy="0 0 0" xyz="0 0 0"/>
449 <cylinder length="1" radius="0.1"/>
455const auto urdf_head_prismatic_missing_limits =
457<?xml version="1.0" encoding="utf-8"?>
458<robot name="MinimalRobot">
459 <!-- Used for fixing robot -->
461 <joint name="base_joint" type="fixed">
462 <origin rpy="0 0 0" xyz="0 0 0"/>
463 <parent link="world"/>
464 <child link="base_link"/>
466 <link name="base_link">
469 <origin xyz="0 0 0"/>
470 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
473 <origin rpy="0 0 0" xyz="0 0 0"/>
475 <cylinder length="0.2" radius="0.1"/>
477 <material name="DarkGrey">
478 <color rgba="0.4 0.4 0.4 1.0"/>
482 <origin rpy="0 0 0" xyz="0 0 0"/>
484 <cylinder length="1" radius="0.1"/>
488 <joint name="joint1" type="prismatic">
489 <origin rpy="-1.57079632679 0 0" xyz="0 0 0.2"/>
490 <parent link="base_link"/>
491 <child link="link1"/>
496 <origin xyz="0 0 0"/>
497 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
500 <origin rpy="0 0 0" xyz="0 0 0"/>
502 <cylinder length="1" radius="0.1"/>
504 <material name="DarkGrey">
505 <color rgba="0.4 0.4 0.4 1.0"/>
509 <origin rpy="0 0 0" xyz="0 0 0"/>
511 <cylinder length="1" radius="0.1"/>
515 <joint name="joint2" type="revolute">
516 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
517 <parent link="link1"/>
518 <child link="link2"/>
519 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
524 <origin xyz="0 0 0"/>
525 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
528 <origin rpy="0 0 0" xyz="0 0 0"/>
530 <cylinder length="1" radius="0.1"/>
532 <material name="DarkGrey">
533 <color rgba="0.4 0.4 0.4 1.0"/>
537 <origin rpy="0 0 0" xyz="0 0 0"/>
539 <cylinder length="1" radius="0.1"/>
545const auto urdf_head_mimic =
547<?xml version="1.0" encoding="utf-8"?>
548<robot name="MinimalRobot">
549 <!-- Used for fixing robot -->
551 <joint name="base_joint" type="fixed">
552 <origin rpy="0 0 0" xyz="0 0 0"/>
553 <parent link="world"/>
554 <child link="base_link"/>
556 <link name="base_link">
559 <origin xyz="0 0 0"/>
560 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
563 <origin rpy="0 0 0" xyz="0 0 0"/>
565 <cylinder length="0.2" radius="0.1"/>
567 <material name="DarkGrey">
568 <color rgba="0.4 0.4 0.4 1.0"/>
572 <origin rpy="0 0 0" xyz="0 0 0"/>
574 <cylinder length="1" radius="0.1"/>
578 <joint name="joint1" type="revolute">
579 <origin rpy="-1.57079632679 0 0" xyz="0 0 0.2"/>
580 <parent link="base_link"/>
581 <child link="link1"/>
582 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
587 <origin xyz="0 0 0"/>
588 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
591 <origin rpy="0 0 0" xyz="0 0 0"/>
593 <cylinder length="1" radius="0.1"/>
595 <material name="DarkGrey">
596 <color rgba="0.4 0.4 0.4 1.0"/>
600 <origin rpy="0 0 0" xyz="0 0 0"/>
602 <cylinder length="1" radius="0.1"/>
606 <joint name="joint2" type="revolute">
607 <mimic joint="joint1" multiplier="-2" offset="0"/>
608 <origin rpy="1.57079632679 0 0" xyz="0 0 0.9"/>
609 <parent link="link1"/>
610 <child link="link2"/>
611 <limit effort="0.1" lower="-3.14159265359" upper="3.14159265359" velocity="0.2"/>
616 <origin xyz="0 0 0"/>
617 <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
620 <origin rpy="0 0 0" xyz="0 0 0"/>
622 <cylinder length="1" radius="0.1"/>
624 <material name="DarkGrey">
625 <color rgba="0.4 0.4 0.4 1.0"/>
629 <origin rpy="0 0 0" xyz="0 0 0"/>
631 <cylinder length="1" radius="0.1"/>
635 <joint name="tool_joint" type="fixed">
636 <origin rpy="0 0 0" xyz="0 0 1"/>
637 <parent link="link2"/>
638 <child link="tool_link"/>
640 <link name="tool_link">
644const auto urdf_tail =
649const auto hardware_resources =
651 <ros2_control name="TestActuatorHardware" type="actuator">
653 <plugin>test_actuator</plugin>
655 <joint name="joint1">
656 <command_interface name="position"/>
657 <state_interface name="position"/>
658 <state_interface name="velocity"/>
659 <command_interface name="max_velocity" />
661 <transmission name="ros2_control_transmission1">
662 <plugin>transmission_interface/SimpleTransmission</plugin>
663 <joint name="joint1" role="joint1">
664 <mechanical_reduction>325.949</mechanical_reduction>
668 <ros2_control name="TestSensorHardware" type="sensor">
670 <plugin>test_sensor</plugin>
671 <param name="example_param_write_for_sec">2</param>
672 <param name="example_param_read_for_sec">2</param>
674 <sensor name="sensor1">
675 <state_interface name="velocity"/>
678 <ros2_control name="TestSystemHardware" type="system">
680 <plugin>test_system</plugin>
681 <param name="example_param_write_for_sec">2</param>
682 <param name="example_param_read_for_sec">2</param>
684 <joint name="joint2">
685 <command_interface name="velocity"/>
686 <state_interface name="position"/>
687 <state_interface name="velocity"/>
688 <state_interface name="acceleration"/>
689 <command_interface name="max_acceleration" />
691 <joint name="joint3">
692 <command_interface name="velocity"/>
693 <state_interface name="position"/>
694 <state_interface name="velocity"/>
695 <state_interface name="acceleration"/>
697 <gpio name="configuration">
698 <command_interface name="max_tcp_jerk"/>
699 <state_interface name="max_tcp_jerk"/>
701 <transmission name="differential_transmission">
702 <plugin>transmission_interface/DifferentialTransmission</plugin>
703 <actuator name="joint2_motor" role="actuator1">
704 <mechanical_reduction>50</mechanical_reduction>
706 <actuator name="joint3_motor" role="actuator2">
707 <mechanical_reduction>-50</mechanical_reduction>
709 <joint name="joint2" role="joint1">
711 <mechanical_reduction>2.0</mechanical_reduction>
713 <joint name="joint3" role="joint2">
714 <offset>-0.5</offset>
715 <mechanical_reduction>-2.0</mechanical_reduction>
718 <transmission name="four_bar_transmission">
719 <plugin>transmission_interface/FourBarLinkageTransmission</plugin>
720 <actuator name="joint2_motor" role="actuator1">
721 <mechanical_reduction>50</mechanical_reduction>
723 <actuator name="joint3_motor" role="actuator2">
724 <mechanical_reduction>-50</mechanical_reduction>
726 <joint name="joint2" role="joint1">
728 <mechanical_reduction>2.0</mechanical_reduction>
730 <joint name="joint3" role="joint2">
731 <offset>-0.5</offset>
732 <mechanical_reduction>-2.0</mechanical_reduction>
738const auto minimal_robot_transmissions =
740 <transmission name="minimal_transmission1">
741 <type>transmission_interface/SimpleTransmission</type>
742 <joint name="joint1">
743 <hardwareInterface>PositionJointInterface</hardwareInterface>
745 <actuator name="minimal_motor1">
746 <mechanicalReduction>1</mechanicalReduction>
747 <hardwareInterface>PositionJointInterface</hardwareInterface>
750 <transmission name="minimal_transmission2">
751 <type>transmission_interface/SimpleTransmission</type>
752 <joint name="joint2">
753 <hardwareInterface>VelocityJointInterface</hardwareInterface>
755 <actuator name="minimal_motor2">
756 <mechanicalReduction>60</mechanicalReduction>
757 <hardwareInterface>VelocityJointInterface</hardwareInterface>
762const auto hardware_resources_with_disabled_limits =
764 <ros2_control name="TestActuatorHardware" type="actuator">
766 <plugin>test_actuator</plugin>
768 <joint name="joint1">
769 <limits enable="false"/>
770 <command_interface name="position"/>
771 <command_interface name="velocity"/>
772 <command_interface name="effort"/>
773 <state_interface name="position"/>
774 <state_interface name="velocity"/>
775 <command_interface name="max_velocity" />
778 <ros2_control name="TestSensorHardware" type="sensor">
780 <plugin>test_sensor</plugin>
781 <param name="example_param_write_for_sec">2</param>
782 <param name="example_param_read_for_sec">2</param>
784 <sensor name="sensor1">
785 <state_interface name="velocity"/>
788 <ros2_control name="TestSystemHardware" type="system">
790 <plugin>test_system</plugin>
791 <param name="example_param_write_for_sec">2</param>
792 <param name="example_param_read_for_sec">2</param>
794 <joint name="joint2">
795 <limits enable="false"/>
796 <command_interface name="velocity"/>
797 <state_interface name="position"/>
798 <state_interface name="velocity"/>
799 <state_interface name="acceleration"/>
800 <command_interface name="max_acceleration" />
802 <joint name="joint3">
803 <command_interface name="position">
804 <limits enable="false"/>
806 <command_interface name="velocity"/>
807 <state_interface name="position"/>
808 <state_interface name="velocity"/>
809 <state_interface name="acceleration"/>
811 <gpio name="configuration">
812 <command_interface name="max_tcp_jerk"/>
813 <state_interface name="max_tcp_jerk"/>
818const auto async_hardware_resources =
820 <ros2_control name="TestActuatorHardware" type="actuator" is_async="true" thread_priority="30">
822 <async affinity="[2, 4,6]" scheduling_policy="detached" print_warnings="false"/>
825 <plugin>test_actuator</plugin>
827 <joint name="joint1">
828 <command_interface name="position"/>
829 <state_interface name="position"/>
830 <state_interface name="velocity"/>
831 <command_interface name="max_velocity" />
834 <ros2_control name="TestSensorHardware" type="sensor" is_async="true">
836 <plugin>test_sensor</plugin>
837 <param name="example_param_write_for_sec">2</param>
838 <param name="example_param_read_for_sec">2</param>
840 <sensor name="sensor1">
841 <state_interface name="velocity"/>
844 <ros2_control name="TestSystemHardware" type="system" is_async="true">
846 <async thread_priority="70" affinity="[1]" scheduling_policy="synchronized"/>
849 <plugin>test_system</plugin>
850 <param name="example_param_write_for_sec">2</param>
851 <param name="example_param_read_for_sec">2</param>
853 <joint name="joint2">
854 <command_interface name="velocity"/>
855 <state_interface name="position"/>
856 <state_interface name="velocity"/>
857 <state_interface name="acceleration"/>
858 <command_interface name="max_acceleration" />
860 <joint name="joint3">
861 <command_interface name="velocity"/>
862 <state_interface name="position"/>
863 <state_interface name="velocity"/>
864 <state_interface name="acceleration"/>
866 <gpio name="configuration">
867 <command_interface name="max_tcp_jerk"/>
868 <state_interface name="max_tcp_jerk"/>
873const auto hardware_resources_with_different_rw_rates =
875 <ros2_control name="TestActuatorHardware" type="actuator" rw_rate="50">
877 <plugin>test_actuator</plugin>
879 <joint name="joint1">
880 <command_interface name="position"/>
881 <state_interface name="position"/>
882 <state_interface name="velocity"/>
883 <command_interface name="max_velocity" />
886 <ros2_control name="TestSensorHardware" type="sensor" rw_rate="20">
888 <plugin>test_sensor</plugin>
889 <param name="example_param_write_for_sec">2</param>
890 <param name="example_param_read_for_sec">2</param>
892 <sensor name="sensor1">
893 <state_interface name="velocity"/>
896 <ros2_control name="TestSystemHardware" type="system" rw_rate="25">
898 <plugin>test_system</plugin>
899 <param name="example_param_write_for_sec">2</param>
900 <param name="example_param_read_for_sec">2</param>
902 <joint name="joint2">
903 <command_interface name="velocity"/>
904 <state_interface name="position"/>
905 <state_interface name="velocity"/>
906 <state_interface name="acceleration"/>
907 <command_interface name="max_acceleration" />
909 <joint name="joint3">
910 <command_interface name="velocity"/>
911 <state_interface name="position"/>
912 <state_interface name="velocity"/>
913 <state_interface name="acceleration"/>
915 <gpio name="configuration">
916 <command_interface name="max_tcp_jerk"/>
917 <state_interface name="max_tcp_jerk"/>
922const auto hardware_resources_with_different_rw_rates_with_async =
924 <ros2_control name="TestActuatorHardware" type="actuator" rw_rate="50" is_async="true">
926 <plugin>test_actuator</plugin>
928 <joint name="joint1">
929 <command_interface name="position"/>
930 <state_interface name="position"/>
931 <state_interface name="velocity"/>
932 <command_interface name="max_velocity" />
935 <ros2_control name="TestSensorHardware" type="sensor" rw_rate="20" is_async="true">
937 <plugin>test_sensor</plugin>
938 <param name="example_param_write_for_sec">2</param>
939 <param name="example_param_read_for_sec">2</param>
941 <sensor name="sensor1">
942 <state_interface name="velocity"/>
945 <ros2_control name="TestSystemHardware" type="system" rw_rate="25" is_async="true">
947 <plugin>test_system</plugin>
948 <param name="example_param_write_for_sec">2</param>
949 <param name="example_param_read_for_sec">2</param>
951 <joint name="joint2">
952 <command_interface name="velocity"/>
953 <state_interface name="position"/>
954 <state_interface name="velocity"/>
955 <state_interface name="acceleration"/>
956 <command_interface name="max_acceleration" />
958 <joint name="joint3">
959 <command_interface name="velocity"/>
960 <state_interface name="position"/>
961 <state_interface name="velocity"/>
962 <state_interface name="acceleration"/>
964 <gpio name="configuration">
965 <command_interface name="max_tcp_jerk"/>
966 <state_interface name="max_tcp_jerk"/>
971const auto hardware_resources_with_negative_rw_rates =
973 <ros2_control name="TestActuatorHardware" type="actuator" rw_rate="-50">
975 <plugin>test_actuator</plugin>
977 <joint name="right_finger_joint">
978 <command_interface name="position"/>
979 <state_interface name="position"/>
980 <state_interface name="velocity"/>
981 <command_interface name="max_velocity" />
986const auto hardware_resources_invalid_with_text_in_rw_rates =
988 <ros2_control name="TestActuatorHardware" type="actuator" rw_rate="d 50">
990 <plugin>test_actuator</plugin>
992 <joint name="right_finger_joint">
993 <command_interface name="position"/>
994 <state_interface name="position"/>
995 <state_interface name="velocity"/>
996 <command_interface name="max_velocity" />
1001const auto hardware_resources_invalid_out_of_range_in_rw_rates =
1003 <ros2_control name="TestActuatorHardware" type="actuator" rw_rate="12345678901">
1005 <plugin>test_actuator</plugin>
1007 <joint name="right_finger_joint">
1008 <command_interface name="position"/>
1009 <state_interface name="position"/>
1010 <state_interface name="velocity"/>
1011 <command_interface name="max_velocity" />
1016const auto uninitializable_hardware_resources =
1018 <ros2_control name="TestUninitializableActuatorHardware" type="actuator">
1020 <plugin>test_uninitializable_actuator</plugin>
1022 <joint name="joint1">
1023 <command_interface name="position"/>
1024 <state_interface name="position"/>
1025 <state_interface name="velocity"/>
1026 <command_interface name="max_velocity" />
1029 <ros2_control name="TestUninitializableSensorHardware" type="sensor">
1031 <plugin>test_uninitializable_sensor</plugin>
1032 <param name="example_param_write_for_sec">2</param>
1033 <param name="example_param_read_for_sec">2</param>
1035 <sensor name="sensor1">
1036 <state_interface name="velocity"/>
1039 <ros2_control name="TestUninitializableSystemHardware" type="system">
1041 <plugin>test_uninitializable_system</plugin>
1042 <param name="example_param_write_for_sec">2</param>
1043 <param name="example_param_read_for_sec">2</param>
1045 <joint name="joint2">
1046 <command_interface name="velocity"/>
1047 <state_interface name="position"/>
1048 <state_interface name="velocity"/>
1049 <state_interface name="acceleration"/>
1050 <command_interface name="max_acceleration" />
1052 <joint name="joint3">
1053 <command_interface name="velocity"/>
1054 <state_interface name="position"/>
1055 <state_interface name="velocity"/>
1056 <state_interface name="acceleration"/>
1061const auto hardware_resources_not_existing_actuator_plugin =
1063 <ros2_control name="TestActuatorHardware" type="actuator">
1065 <plugin>test_actuator23</plugin>
1067 <joint name="joint1">
1068 <command_interface name="position"/>
1069 <state_interface name="position"/>
1070 <state_interface name="velocity"/>
1071 <command_interface name="max_velocity" />
1074 <ros2_control name="TestSensorHardware" type="sensor">
1076 <plugin>test_sensor</plugin>
1077 <param name="example_param_write_for_sec">2</param>
1078 <param name="example_param_read_for_sec">2</param>
1080 <sensor name="sensor1">
1081 <state_interface name="velocity"/>
1084 <ros2_control name="TestSystemHardware" type="system">
1086 <plugin>test_system</plugin>
1087 <param name="example_param_write_for_sec">2</param>
1088 <param name="example_param_read_for_sec">2</param>
1090 <joint name="joint2">
1091 <command_interface name="velocity"/>
1092 <state_interface name="position"/>
1093 <state_interface name="velocity"/>
1094 <state_interface name="acceleration"/>
1095 <command_interface name="max_acceleration" />
1097 <joint name="joint3">
1098 <command_interface name="velocity"/>
1099 <state_interface name="position"/>
1100 <state_interface name="velocity"/>
1101 <state_interface name="acceleration"/>
1103 <gpio name="configuration">
1104 <command_interface name="max_tcp_jerk"/>
1105 <state_interface name="max_tcp_jerk"/>
1110const auto hardware_resources_not_existing_sensor_plugin =
1112 <ros2_control name="TestActuatorHardware" type="actuator">
1114 <plugin>test_actuator</plugin>
1116 <joint name="joint1">
1117 <command_interface name="position"/>
1118 <state_interface name="position"/>
1119 <state_interface name="velocity"/>
1120 <command_interface name="max_velocity" />
1123 <ros2_control name="TestSensorHardware" type="sensor">
1125 <plugin>test_sensor23</plugin>
1126 <param name="example_param_write_for_sec">2</param>
1127 <param name="example_param_read_for_sec">2</param>
1129 <sensor name="sensor1">
1130 <state_interface name="velocity"/>
1133 <ros2_control name="TestSystemHardware" type="system">
1135 <plugin>test_system</plugin>
1136 <param name="example_param_write_for_sec">2</param>
1137 <param name="example_param_read_for_sec">2</param>
1139 <joint name="joint2">
1140 <command_interface name="velocity"/>
1141 <state_interface name="position"/>
1142 <state_interface name="velocity"/>
1143 <state_interface name="acceleration"/>
1144 <command_interface name="max_acceleration" />
1146 <joint name="joint3">
1147 <command_interface name="velocity"/>
1148 <state_interface name="position"/>
1149 <state_interface name="velocity"/>
1150 <state_interface name="acceleration"/>
1152 <gpio name="configuration">
1153 <command_interface name="max_tcp_jerk"/>
1154 <state_interface name="max_tcp_jerk"/>
1158const auto hardware_resources_not_existing_system_plugin =
1160 <ros2_control name="TestActuatorHardware" type="actuator">
1162 <plugin>test_actuator</plugin>
1164 <joint name="joint1">
1165 <command_interface name="position"/>
1166 <state_interface name="position"/>
1167 <state_interface name="velocity"/>
1168 <command_interface name="max_velocity" />
1171 <ros2_control name="TestSensorHardware" type="sensor">
1173 <plugin>test_sensor</plugin>
1174 <param name="example_param_write_for_sec">2</param>
1175 <param name="example_param_read_for_sec">2</param>
1177 <sensor name="sensor1">
1178 <state_interface name="velocity"/>
1181 <ros2_control name="TestSystemHardware" type="system">
1183 <plugin>test_system23</plugin>
1184 <param name="example_param_write_for_sec">2</param>
1185 <param name="example_param_read_for_sec">2</param>
1187 <joint name="joint2">
1188 <command_interface name="velocity"/>
1189 <state_interface name="position"/>
1190 <state_interface name="velocity"/>
1191 <state_interface name="acceleration"/>
1192 <command_interface name="max_acceleration" />
1194 <joint name="joint3">
1195 <command_interface name="velocity"/>
1196 <state_interface name="position"/>
1197 <state_interface name="velocity"/>
1198 <state_interface name="acceleration"/>
1200 <gpio name="configuration">
1201 <command_interface name="max_tcp_jerk"/>
1202 <state_interface name="max_tcp_jerk"/>
1207const auto hardware_resources_duplicated_component =
1209 <ros2_control name="TestActuatorHardware" type="actuator">
1211 <plugin>test_actuator</plugin>
1213 <joint name="joint1">
1214 <command_interface name="position"/>
1215 <state_interface name="position"/>
1216 <state_interface name="velocity"/>
1217 <command_interface name="max_velocity" />
1220 <ros2_control name="TestActuatorHardware" type="sensor">
1222 <plugin>test_sensor</plugin>
1223 <param name="example_param_write_for_sec">2</param>
1224 <param name="example_param_read_for_sec">2</param>
1226 <sensor name="sensor1">
1227 <state_interface name="velocity"/>
1230 <ros2_control name="TestSystemHardware" type="system">
1232 <plugin>test_system</plugin>
1233 <param name="example_param_write_for_sec">2</param>
1234 <param name="example_param_read_for_sec">2</param>
1236 <joint name="joint2">
1237 <command_interface name="velocity"/>
1238 <state_interface name="position"/>
1239 <state_interface name="velocity"/>
1240 <state_interface name="acceleration"/>
1241 <command_interface name="max_acceleration" />
1243 <joint name="joint3">
1244 <command_interface name="velocity"/>
1245 <state_interface name="position"/>
1246 <state_interface name="velocity"/>
1247 <state_interface name="acceleration"/>
1249 <gpio name="configuration">
1250 <command_interface name="max_tcp_jerk"/>
1251 <state_interface name="max_tcp_jerk"/>
1256const auto hardware_resources_actuator_initializaion_error =
1258 <ros2_control name="TestActuatorHardware" type="actuator">
1260 <plugin>test_actuator</plugin>
1262 <joint name="joint1">
1263 <command_interface name="position"/>
1264 <state_interface name="position"/>
1265 <state_interface name="does_not_exist"/>
1268 <ros2_control name="TestSensorHardware" type="sensor">
1270 <plugin>test_sensor</plugin>
1271 <param name="example_param_write_for_sec">2</param>
1272 <param name="example_param_read_for_sec">2</param>
1274 <sensor name="sensor1">
1275 <state_interface name="velocity"/>
1278 <ros2_control name="TestSystemHardware" type="system">
1280 <plugin>test_system</plugin>
1281 <param name="example_param_write_for_sec">2</param>
1282 <param name="example_param_read_for_sec">2</param>
1284 <joint name="joint2">
1285 <command_interface name="velocity"/>
1286 <state_interface name="position"/>
1287 <state_interface name="velocity"/>
1289 <joint name="joint3">
1290 <command_interface name="velocity"/>
1291 <state_interface name="position"/>
1292 <state_interface name="velocity"/>
1297const auto hardware_resources_sensor_initializaion_error =
1299 <ros2_control name="TestActuatorHardware" type="actuator">
1301 <plugin>test_actuator</plugin>
1303 <joint name="joint1">
1304 <command_interface name="position"/>
1305 <state_interface name="position"/>
1306 <state_interface name="velocity"/>
1309 <ros2_control name="TestSensorHardware" type="sensor">
1311 <plugin>test_sensor</plugin>
1312 <param name="example_param_write_for_sec">2</param>
1313 <param name="example_param_read_for_sec">2</param>
1315 <sensor name="sensor1">
1316 <state_interface name="velocity"/>
1317 <state_interface name="does_not_exist"/>
1320 <ros2_control name="TestSystemHardware" type="system">
1322 <plugin>test_system</plugin>
1323 <param name="example_param_write_for_sec">2</param>
1324 <param name="example_param_read_for_sec">2</param>
1326 <joint name="joint2">
1327 <command_interface name="velocity"/>
1328 <state_interface name="position"/>
1329 <state_interface name="velocity"/>
1331 <joint name="joint3">
1332 <command_interface name="velocity"/>
1333 <state_interface name="position"/>
1334 <state_interface name="velocity"/>
1339const auto hardware_resources_system_initializaion_error =
1341 <ros2_control name="TestActuatorHardware" type="actuator">
1343 <plugin>test_actuator</plugin>
1345 <joint name="joint1">
1346 <command_interface name="position"/>
1347 <state_interface name="position"/>
1348 <state_interface name="velocity"/>
1351 <ros2_control name="TestSensorHardware" type="sensor">
1353 <plugin>test_sensor</plugin>
1354 <param name="example_param_write_for_sec">2</param>
1355 <param name="example_param_read_for_sec">2</param>
1357 <sensor name="sensor1">
1358 <state_interface name="velocity"/>
1361 <ros2_control name="TestSystemHardware" type="system">
1363 <plugin>test_system</plugin>
1364 <param name="example_param_write_for_sec">2</param>
1365 <param name="example_param_read_for_sec">2</param>
1367 <joint name="joint2">
1368 <command_interface name="velocity"/>
1369 <state_interface name="position"/>
1370 <state_interface name="does_not_exist"/>
1372 <joint name="joint3">
1373 <command_interface name="velocity"/>
1374 <state_interface name="position"/>
1375 <state_interface name="does_not_exist"/>
1380const auto hardware_resources_missing_state_keys =
1382 <ros2_control name="TestActuatorHardware" type="actuator">
1384 <plugin>test_actuator</plugin>
1386 <joint name="joint1">
1387 <command_interface name="position"/>
1388 <state_interface name="position"/>
1389 <state_interface name="velocity"/>
1390 <state_interface name="does_not_exist"/>
1393 <ros2_control name="TestSensorHardware" type="sensor">
1395 <plugin>test_sensor</plugin>
1396 <param name="example_param_write_for_sec">2</param>
1397 <param name="example_param_read_for_sec">2</param>
1399 <sensor name="sensor1">
1400 <state_interface name="velocity"/>
1401 <state_interface name="does_not_exist"/>
1402 <state_interface name="does_not_exist"/>
1405 <ros2_control name="TestSystemHardware" type="system">
1407 <plugin>test_system</plugin>
1408 <param name="example_param_write_for_sec">2</param>
1409 <param name="example_param_read_for_sec">2</param>
1411 <joint name="joint2">
1412 <command_interface name="velocity"/>
1413 <command_interface name="max_acceleration"/>
1414 <state_interface name="position"/>
1415 <state_interface name="velocity"/>
1417 <joint name="joint3">
1418 <command_interface name="velocity"/>
1419 <state_interface name="position"/>
1420 <state_interface name="velocity"/>
1421 <state_interface name="does_not_exist"/>
1426const auto hardware_resources_missing_command_keys =
1428 <ros2_control name="TestActuatorHardware" type="actuator">
1430 <plugin>test_actuator</plugin>
1432 <joint name="joint1">
1433 <command_interface name="position"/>
1434 <command_interface name="does_not_exist"/>
1435 <state_interface name="position"/>
1436 <state_interface name="velocity"/>
1439 <ros2_control name="TestSensorHardware" type="sensor">
1441 <plugin>test_sensor</plugin>
1442 <param name="example_param_write_for_sec">2</param>
1443 <param name="example_param_read_for_sec">2</param>
1445 <sensor name="sensor1">
1446 <state_interface name="velocity"/>
1449 <ros2_control name="TestSystemHardware" type="system">
1451 <plugin>test_system</plugin>
1452 <param name="example_param_write_for_sec">2</param>
1453 <param name="example_param_read_for_sec">2</param>
1455 <joint name="joint2">
1456 <command_interface name="velocity"/>
1457 <command_interface name="max_acceleration"/>
1458 <state_interface name="position"/>
1459 <state_interface name="velocity"/>
1461 <joint name="joint3">
1462 <command_interface name="velocity"/>
1463 <command_interface name="does_not_exist"/>
1464 <state_interface name="position"/>
1465 <state_interface name="velocity"/>
1470const auto hardware_resources_missing_gpio_state_keys =
1472 <ros2_control name="TestSystemHardware" type="system">
1474 <plugin>test_system</plugin>
1476 <joint name="joint2">
1477 <command_interface name="velocity"/>
1478 <command_interface name="max_acceleration"/>
1479 <state_interface name="position"/>
1480 <state_interface name="velocity"/>
1482 <gpio name="configuration">
1483 <command_interface name="max_tcp_jerk"/>
1484 <state_interface name="max_tcp_jerk"/>
1485 <state_interface name="does_not_exist"/>
1490const auto hardware_resources_missing_gpio_command_keys =
1492 <ros2_control name="TestSystemHardware" type="system">
1494 <plugin>test_system</plugin>
1496 <joint name="joint2">
1497 <command_interface name="velocity"/>
1498 <command_interface name="max_acceleration"/>
1499 <state_interface name="position"/>
1500 <state_interface name="velocity"/>
1502 <gpio name="configuration">
1503 <command_interface name="max_tcp_jerk"/>
1504 <command_interface name="does_not_exist"/>
1505 <state_interface name="max_tcp_jerk"/>
1510const auto hardware_resources_with_exclusive_interface =
1512 <ros2_control name="TestActuatorHardware1" type="actuator">
1514 <plugin>test_actuator_exclusive_interfaces</plugin>
1516 <joint name="joint1">
1517 <command_interface name="position"/>
1518 <command_interface name="velocity"/>
1519 <command_interface name="effort"/>
1520 <state_interface name="position"/>
1521 <state_interface name="velocity"/>
1522 <state_interface name="effort"/>
1525 <ros2_control name="TestActuatorHardware2" type="actuator">
1527 <plugin>test_actuator_exclusive_interfaces</plugin>
1529 <joint name="joint2">
1530 <command_interface name="position"/>
1531 <command_interface name="velocity"/>
1532 <command_interface name="effort"/>
1533 <state_interface name="position"/>
1534 <state_interface name="velocity"/>
1535 <state_interface name="effort"/>
1538 <ros2_control name="TestActuatorHardware3" type="actuator">
1540 <plugin>test_actuator_exclusive_interfaces</plugin>
1542 <joint name="joint3">
1543 <command_interface name="position"/>
1544 <command_interface name="velocity"/>
1545 <command_interface name="effort"/>
1546 <state_interface name="position"/>
1547 <state_interface name="velocity"/>
1548 <state_interface name="effort"/>
1551 <ros2_control name="TestSensorHardware" type="sensor">
1553 <plugin>test_sensor</plugin>
1554 <param name="example_param_write_for_sec">2</param>
1555 <param name="example_param_read_for_sec">2</param>
1557 <sensor name="sensor1">
1558 <state_interface name="velocity"/>
1563const auto diffbot_urdf =
1565<?xml version="1.0" ?>
1567 <!-- Space btw top of beam and the each joint -->
1568 <!-- Links: inertial,visual,collision -->
1569 <link name="base_link">
1571 <!-- origin is relative -->
1572 <origin rpy="0 0 0" xyz="0 0 0"/>
1574 <inertia ixx="5" ixy="0" ixz="0" iyy="5" iyz="0" izz="5"/>
1578 <box size="0.5 0.1 0.1"/>
1582 <!-- origin is relative -->
1583 <origin xyz="0 0 0"/>
1585 <box size="0.5 0.1 0.1"/>
1589 <link name="base_footprint">
1592 <sphere radius="0.01"/>
1596 <origin xyz="0 0 0"/>
1598 <sphere radius="0.00000001"/>
1602 <joint name="base_footprint_joint" type="fixed">
1603 <origin rpy="0 0 0" xyz="0 0 0.11"/>
1604 <child link="base_link"/>
1605 <parent link="base_footprint"/>
1607 <link name="wheel_0_link">
1609 <origin rpy="0 0 0" xyz="0 0 0"/>
1611 <inertia ixx="0.2" ixy="0" ixz="0" iyy="0.2" iyz="0" izz="0.2"/>
1614 <origin rpy="0 0 0" xyz="0 0 0"/>
1616 <cylinder length="0.086" radius="0.11"/>
1620 <origin rpy="0 0 0" xyz="0 0 0"/>
1622 <cylinder length="0.086" radius="0.11"/>
1626 <joint name="wheel_left" type="continuous">
1627 <parent link="base_link"/>
1628 <child link="wheel_0_link"/>
1629 <origin rpy="-1.5707963267948966 0 0" xyz="0.3 0 0"/>
1631 <limit effort="100" velocity="1.0"/>
1633 <!-- Transmission is important to link the joints and the controller -->
1634 <transmission name="wheel_left_trans" type="SimpleTransmission">
1635 <actuator name="wheel_left_motor"/>
1636 <joint name="wheel_left"/>
1637 <mechanicalReduction>1</mechanicalReduction>
1638 <motorTorqueConstant>1</motorTorqueConstant>
1640 <gazebo reference="wheel_0_link">
1641 <material>Gazebo/Red</material>
1643 <link name="wheel_1_link">
1645 <origin rpy="0 0 0" xyz="0 0 0"/>
1647 <inertia ixx="0.2" ixy="0" ixz="0" iyy="0.2" iyz="0" izz="0.2"/>
1650 <origin rpy="0 0 0" xyz="0 0 0"/>
1652 <cylinder length="0.086" radius="0.11"/>
1656 <origin rpy="0 0 0" xyz="0 0 0"/>
1658 <cylinder length="0.086" radius="0.11"/>
1662 <joint name="wheel_right" type="continuous">
1663 <parent link="base_link"/>
1664 <child link="wheel_1_link"/>
1665 <origin rpy="-1.5707963267948966 0 0" xyz="-0.2 0 0"/>
1667 <limit effort="100" velocity="1.0"/>
1669 <!-- Transmission is important to link the joints and the controller -->
1670 <transmission name="wheel_right_trans" type="SimpleTransmission">
1671 <actuator name="wheel_right_motor"/>
1672 <joint name="wheel_right"/>
1673 <mechanicalReduction>1</mechanicalReduction>
1674 <motorTorqueConstant>1</motorTorqueConstant>
1676 <gazebo reference="wheel_1_link">
1677 <material>Gazebo/Red</material>
1680 <gazebo reference="base_link">
1681 <material>Gazebo/Green</material>
1683 <gazebo reference="base_footprint">
1684 <material>Gazebo/Purple</material>
1686 <ros2_control name="TestActuatorHardwareLeft" type="actuator">
1688 <plugin>test_actuator</plugin>
1690 <joint name="wheel_left">
1691 <state_interface name="position"/>
1692 <command_interface name="velocity"/>
1693 <state_interface name="velocity"/>
1696 <ros2_control name="TestActuatorHardwareRight" type="actuator">
1698 <plugin>test_actuator</plugin>
1700 <joint name="wheel_right">
1701 <state_interface name="position"/>
1702 <command_interface name="velocity"/>
1703 <state_interface name="velocity"/>
1706 <ros2_control name="TestIMUSensorHardware" type="sensor">
1708 <plugin>test_hardware_components/TestIMUSensor</plugin>
1710 <sensor name="base_imu">
1711 <state_interface name="orientation.x"/>
1712 <state_interface name="orientation.y"/>
1713 <state_interface name="orientation.z"/>
1714 <state_interface name="orientation.w"/>
1715 <state_interface name="angular_velocity.x"/>
1716 <state_interface name="angular_velocity.y"/>
1717 <state_interface name="angular_velocity.z"/>
1718 <state_interface name="linear_acceleration.x"/>
1719 <state_interface name="linear_acceleration.y"/>
1720 <state_interface name="linear_acceleration.z"/>
1726const auto gripper_urdf_head =
1727 R
"(<?xml version="1.0" ?>
1728<robot name="gripper">
1729 <link name="world"/>
1733 <box size="0.5 1 1"/>
1735 <origin xyz="0 0 0.5"/>
1736 <material name="violet">
1737 <color rgba="0.4 0.18 0.57 1.0" />
1742 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1745 <link name="finger_right">
1748 <box size="0.4 0.1 1"/>
1750 <origin xyz="0 0.05 0.5"/>
1751 <material name="grey">
1752 <color rgba="0.2 0.2 0.2 1"/>
1757 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1760 <link name="finger_left">
1763 <box size="0.4 0.1 1"/>
1765 <origin xyz="0 0.05 0.5"/>
1766 <material name="grey">
1767 <color rgba="0.2 0.2 0.2 1"/>
1772 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1775 <joint name="world_to_base" type="fixed">
1776 <origin rpy="0 0 0" xyz="0 0 0"/>
1777 <parent link="world"/>
1778 <child link="base"/>
1780 <joint name="right_finger_joint" type="prismatic">
1782 <origin xyz="0.0 -0.48 1" rpy="0.0 0.0 0.0"/>
1783 <parent link="base"/>
1784 <child link="finger_right"/>
1785 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
1787 <joint name="left_finger_joint" type="prismatic">
1788 <mimic joint="right_finger_joint" multiplier="2" offset="1"/>
1790 <origin xyz="0.0 0.48 1" rpy="0.0 0.0 3.1415926535"/>
1791 <parent link="base"/>
1792 <child link="finger_left"/>
1793 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
1797const auto gripper_urdf_head_no_mimic =
1798 R
"(<?xml version="1.0" ?>
1799<robot name="gripper">
1800 <link name="world"/>
1804 <box size="0.5 1 1"/>
1806 <origin xyz="0 0 0.5"/>
1807 <material name="violet">
1808 <color rgba="0.4 0.18 0.57 1.0" />
1813 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1816 <link name="finger_right">
1819 <box size="0.4 0.1 1"/>
1821 <origin xyz="0 0.05 0.5"/>
1822 <material name="grey">
1823 <color rgba="0.2 0.2 0.2 1"/>
1828 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1831 <link name="finger_left">
1834 <box size="0.4 0.1 1"/>
1836 <origin xyz="0 0.05 0.5"/>
1837 <material name="grey">
1838 <color rgba="0.2 0.2 0.2 1"/>
1843 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1846 <joint name="world_to_base" type="fixed">
1847 <origin rpy="0 0 0" xyz="0 0 0"/>
1848 <parent link="world"/>
1849 <child link="base"/>
1851 <joint name="right_finger_joint" type="prismatic">
1853 <origin xyz="0.0 -0.48 1" rpy="0.0 0.0 0.0"/>
1854 <parent link="base"/>
1855 <child link="finger_right"/>
1856 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
1858 <joint name="left_finger_joint" type="prismatic">
1860 <origin xyz="0.0 0.48 1" rpy="0.0 0.0 3.1415926535"/>
1861 <parent link="base"/>
1862 <child link="finger_left"/>
1863 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
1867const auto gripper_urdf_head_unknown_joint =
1868 R
"(<?xml version="1.0" ?>
1869<robot name="gripper">
1870 <link name="world"/>
1874 <box size="0.5 1 1"/>
1876 <origin xyz="0 0 0.5"/>
1877 <material name="violet">
1878 <color rgba="0.4 0.18 0.57 1.0" />
1883 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1886 <link name="finger_right">
1889 <box size="0.4 0.1 1"/>
1891 <origin xyz="0 0.05 0.5"/>
1892 <material name="grey">
1893 <color rgba="0.2 0.2 0.2 1"/>
1898 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1901 <link name="finger_left">
1904 <box size="0.4 0.1 1"/>
1906 <origin xyz="0 0.05 0.5"/>
1907 <material name="grey">
1908 <color rgba="0.2 0.2 0.2 1"/>
1913 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1916 <joint name="world_to_base" type="fixed">
1917 <origin rpy="0 0 0" xyz="0 0 0"/>
1918 <parent link="world"/>
1919 <child link="base"/>
1921 <joint name="right_finger_joint" type="prismatic">
1923 <origin xyz="0.0 -0.48 1" rpy="0.0 0.0 0.0"/>
1924 <parent link="base"/>
1925 <child link="finger_right"/>
1926 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
1928 <joint name="left_finger_joint" type="prismatic">
1929 <mimic joint="middle_finger_joint" multiplier="1" offset="0"/>
1931 <origin xyz="0.0 0.48 1" rpy="0.0 0.0 3.1415926535"/>
1932 <parent link="base"/>
1933 <child link="finger_left"/>
1934 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
1938const auto gripper_urdf_head_incomplete =
1939 R
"(<?xml version="1.0" ?>
1940<robot name="gripper">
1941 <link name="world"/>
1945 <box size="0.5 1 1"/>
1947 <origin xyz="0 0 0.5"/>
1948 <material name="violet">
1949 <color rgba="0.4 0.18 0.57 1.0" />
1954 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1957 <link name="finger_right">
1960 <box size="0.4 0.1 1"/>
1962 <origin xyz="0 0.05 0.5"/>
1963 <material name="grey">
1964 <color rgba="0.2 0.2 0.2 1"/>
1969 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
1972 <joint name="world_to_base" type="fixed">
1973 <origin rpy="0 0 0" xyz="0 0 0"/>
1974 <parent link="world"/>
1975 <child link="base"/>
1977 <joint name="right_finger_joint" type="prismatic">
1979 <origin xyz="0.0 -0.48 1" rpy="0.0 0.0 0.0"/>
1980 <parent link="base"/>
1981 <child link="finger_right"/>
1982 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
1986const auto gripper_urdf_head_invalid_two_root_links =
1987 R
"(<?xml version="1.0" ?>
1988<robot name="gripper">
1989 <link name="world"/>
1993 <box size="0.5 1 1"/>
1995 <origin xyz="0 0 0.5"/>
1996 <material name="violet">
1997 <color rgba="0.4 0.18 0.57 1.0" />
2002 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
2005 <link name="finger_right">
2008 <box size="0.4 0.1 1"/>
2010 <origin xyz="0 0.05 0.5"/>
2011 <material name="grey">
2012 <color rgba="0.2 0.2 0.2 1"/>
2017 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
2020 <link name="finger_left">
2023 <box size="0.4 0.1 1"/>
2025 <origin xyz="0 0.05 0.5"/>
2026 <material name="grey">
2027 <color rgba="0.2 0.2 0.2 1"/>
2032 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
2035 <joint name="world_to_base" type="fixed">
2036 <origin rpy="0 0 0" xyz="0 0 0"/>
2037 <parent link="world"/>
2038 <child link="base"/>
2040 <joint name="right_finger_joint" type="prismatic">
2042 <origin xyz="0.0 -0.48 1" rpy="0.0 0.0 0.0"/>
2043 <parent link="base"/>
2044 <child link="finger_right"/>
2045 <limit effort="1000.0" lower="0" upper="0.38" velocity="10"/>
2049const auto gripper_hardware_resources_no_command_if =
2051 <ros2_control name="TestGripper" type="system">
2052 <joint name="right_finger_joint">
2053 <command_interface name="effort"/>
2054 <state_interface name="position"/>
2055 <state_interface name="velocity"/>
2056 <state_interface name="effort"/>
2058 <joint name="left_finger_joint">
2059 <state_interface name="position"/>
2060 <state_interface name="velocity"/>
2065const auto gripper_hardware_resources_mimic_true_no_command_if =
2067 <ros2_control name="TestGripper" type="system">
2068 <joint name="right_finger_joint">
2069 <command_interface name="effort"/>
2070 <state_interface name="position"/>
2071 <state_interface name="velocity"/>
2072 <state_interface name="effort"/>
2074 <joint name="left_finger_joint" mimic="true">
2075 <state_interface name="position"/>
2076 <state_interface name="velocity"/>
2081const auto gripper_hardware_resources_mimic_true_command_if =
2083 <ros2_control name="TestGripper" type="system">
2084 <joint name="right_finger_joint">
2085 <command_interface name="effort"/>
2086 <state_interface name="position"/>
2087 <state_interface name="velocity"/>
2088 <state_interface name="effort"/>
2090 <joint name="left_finger_joint" mimic="true">
2091 <command_interface name="effort"/>
2092 <state_interface name="position"/>
2093 <state_interface name="velocity"/>
2098const auto gripper_hardware_resources_mimic_false_command_if =
2100 <ros2_control name="TestGripper" type="system">
2101 <joint name="right_finger_joint">
2102 <command_interface name="effort"/>
2103 <state_interface name="position"/>
2104 <state_interface name="velocity"/>
2105 <state_interface name="effort"/>
2107 <joint name="left_finger_joint" mimic="false">
2108 <command_interface name="effort"/>
2109 <state_interface name="position"/>
2110 <state_interface name="velocity"/>
2115const auto diff_drive_robot_sdf =
2117<?xml version="1.0" ?>
2119 <model canonical_link="base_link" name="my_robot">
2121 <link name="base_link">
2122 <must_be_base_link>true</must_be_base_link>
2125 <joint name="chassis_joint" type="fixed">
2126 <parent>base_link</parent>
2127 <child>chassis_link</child>
2128 <pose relative_to="base_link">0 0 0.075 0 0 0</pose>
2130 <link name="chassis_link">
2131 <pose relative_to="chassis_joint"/>
2132 <visual name="chassis_link_visual">
2141 <ambient>1 1 1 1</ambient>
2142 <diffuse>1 1 1 1</diffuse>
2145 <collision name="chassis_link_collision">
2157 <ixx>0.0046875</ixx>
2160 <iyy>0.0046875</iyy>
2167 <joint name="left_wheel_joint" type="revolute">
2168 <parent>chassis_link</parent>
2169 <child>left_wheel_link</child>
2170 <pose relative_to="chassis_link">0.09 0.16999999999999998 -0.075 -1.5707963267948966 0 0</pose>
2179 <link name="left_wheel_link">
2180 <pose relative_to="left_wheel_joint"/>
2181 <visual name="left_wheel_link_visual">
2184 <radius>0.05</radius>
2185 <length>0.04</length>
2189 <ambient>0 0 1</ambient>
2190 <diffuse>0 0 1</diffuse>
2193 <collision name="left_wheel_link_collision">
2196 <radius>0.05</radius>
2197 <length>0.04</length>
2204 <ixx>7.583333333333335e-05</ixx>
2207 <iyy>7.583333333333335e-05</iyy>
2209 <izz>0.00012500000000000003</izz>
2213 <!-- RIGHT WHEEL -->
2214 <joint name="right_wheel_joint" type="revolute">
2215 <parent>chassis_link</parent>
2216 <child>right_wheel_link</child>
2217 <pose relative_to="chassis_link">0.09 -0.16999999999999998 -0.075 -1.5707963267948966 0 0</pose>
2220 <!-- limit would not be specified because if the type was continuous -->
2227 <link name="right_wheel_link">
2228 <pose relative_to="right_wheel_joint"/>
2229 <visual name="right_wheel_link_visual">
2232 <radius>0.05</radius>
2233 <length>0.04</length>
2237 <ambient>0 0 1</ambient>
2238 <diffuse>0 0 1</diffuse>
2241 <collision name="right_wheel_link_collision">
2244 <radius>0.05</radius>
2245 <length>0.04</length>
2252 <ixx>7.583333333333335e-05</ixx>
2255 <iyy>7.583333333333335e-05</iyy>
2257 <izz>0.00012500000000000003</izz>
2262 <joint name="caster_joint" type="revolute">
2263 <parent>chassis_link</parent>
2264 <child>caster_link</child>
2265 <pose relative_to="chassis_link">-0.09 0 -0.075 0 0 0</pose>
2274 <link name="caster_link">
2275 <pose relative_to="caster_joint"/>
2276 <visual name="caster_link_visual">
2279 <radius>0.05</radius>
2283 <ambient>0 0 1</ambient>
2284 <diffuse>0 0 1</diffuse>
2287 <collision name="caster_link_collision">
2290 <radius>0.05</radius>
2297 <ixx>0.00010000000000000002</ixx>
2300 <iyy>0.00010000000000000002</iyy>
2302 <izz>0.00010000000000000002</izz>
2306 <ros2_control name="GazeboSimSystem" type="system">
2308 <plugin>gz_ros2_control/GazeboSimSystem</plugin>
2310 <joint name="left_wheel_joint">
2311 <command_interface name="velocity">
2312 <param name="min">-10</param>
2313 <param name="max">10</param>
2314 </command_interface>
2315 <state_interface name="velocity"/>
2316 <state_interface name="position"/>
2318 <joint name="right_wheel_joint">
2319 <command_interface name="velocity">
2320 <param name="min">-10</param>
2321 <param name="max">10</param>
2322 </command_interface>
2323 <state_interface name="velocity"/>
2324 <state_interface name="position"/>
2327 <plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
2328 <parameters>/path/to/config.yml</parameters>
2334const auto invalid_urdf_without_hardware_plugin =
2336 <robot name="minimal_robot">
2337 <link name="base_link"/>
2338 <joint name="joint1" type="revolute">
2339 <parent link="base_link"/>
2340 <child link="link1"/>
2341 <origin xyz="0 0 0"/>
2343 <limit effort="10" lower="-1.57" upper="1.57" velocity="1.0"/>
2345 <link name="link1"/>
2346 <ros2_control name="default" type="system">
2351const auto invalid_urdf_with_nonexistent_plugin =
2353 <robot name="minimal_robot">
2354 <link name="base_link"/>
2355 <joint name="joint1" type="revolute">
2356 <parent link="base_link"/>
2357 <child link="link1"/>
2358 <origin xyz="0 0 0"/>
2360 <limit effort="10" lower="-1.57" upper="1.57" velocity="1.0"/>
2362 <link name="link1"/>
2363 <ros2_control name="default" type="system">
2365 <plugin>mock_components/NonExistentSystem</plugin>
2371const auto invalid_urdf_no_geometry =
2373 <robot name="minimal_robot">
2374 <ros2_control name="default" type="system">
2376 <plugin>mock_components/GenericSystem</plugin>
2382const auto minimal_robot_urdf = std::string(urdf_head) + std::string(hardware_resources) +
2383 std::string(minimal_robot_transmissions) + std::string(urdf_tail);
2384const auto minimal_robot_urdf_no_limits = std::string(urdf_head_continuous_missing_limits) +
2385 std::string(hardware_resources) + std::string(urdf_tail);
2386const auto minimal_async_robot_urdf =
2387 std::string(urdf_head) + std::string(async_hardware_resources) + std::string(urdf_tail);
2388const auto minimal_robot_urdf_with_different_hw_rw_rate =
2389 std::string(urdf_head) + std::string(hardware_resources_with_different_rw_rates) +
2390 std::string(urdf_tail);
2391const auto minimal_uninitializable_robot_urdf =
2392 std::string(urdf_head) + std::string(uninitializable_hardware_resources) + std::string(urdf_tail);
2394const auto minimal_robot_not_existing_actuator_plugin =
2395 std::string(urdf_head) + std::string(hardware_resources_not_existing_actuator_plugin) +
2396 std::string(urdf_tail);
2397const auto minimal_robot_not_existing_sensors_plugin =
2398 std::string(urdf_head) + std::string(hardware_resources_not_existing_sensor_plugin) +
2399 std::string(urdf_tail);
2400const auto minimal_robot_not_existing_system_plugin =
2401 std::string(urdf_head) + std::string(hardware_resources_not_existing_system_plugin) +
2402 std::string(urdf_tail);
2404const auto minimal_robot_duplicated_component =
2405 std::string(urdf_head) + std::string(hardware_resources_duplicated_component) +
2406 std::string(urdf_tail);
2408const auto minimal_robot_actuator_initialization_error =
2409 std::string(urdf_head) + std::string(hardware_resources_not_existing_actuator_plugin) +
2410 std::string(urdf_tail);
2411const auto minimal_robot_sensor_initialization_error =
2412 std::string(urdf_head) + std::string(hardware_resources_sensor_initializaion_error) +
2413 std::string(urdf_tail);
2414const auto minimal_robot_system_initialization_error =
2415 std::string(urdf_head) + std::string(hardware_resources_system_initializaion_error) +
2416 std::string(urdf_tail);
2418const auto minimal_robot_missing_state_keys_urdf =
2419 std::string(urdf_head) + std::string(hardware_resources_missing_state_keys) +
2420 std::string(urdf_tail);
2422const auto minimal_robot_missing_command_keys_urdf =
2423 std::string(urdf_head) + std::string(hardware_resources_missing_command_keys) +
2424 std::string(urdf_tail);
2426const auto minimal_robot_missing_gpio_state_keys_urdf =
2427 std::string(urdf_head) + std::string(hardware_resources_missing_gpio_state_keys) +
2428 std::string(urdf_tail);
2430const auto minimal_robot_missing_gpio_command_keys_urdf =
2431 std::string(urdf_head) + std::string(hardware_resources_missing_gpio_command_keys) +
2432 std::string(urdf_tail);
2434[[maybe_unused]]
const std::string TEST_ACTUATOR_HARDWARE_NAME =
"TestActuatorHardware";
2435[[maybe_unused]]
const std::string TEST_ACTUATOR_HARDWARE_TYPE =
"actuator";
2436[[maybe_unused]]
const std::string TEST_ACTUATOR_HARDWARE_PLUGIN_NAME =
"test_actuator";
2437[[maybe_unused]]
const std::vector<std::string> TEST_ACTUATOR_HARDWARE_COMMAND_INTERFACES = {
2438 "joint1/position",
"joint1/max_velocity"};
2439[[maybe_unused]]
const std::vector<std::string> TEST_ACTUATOR_HARDWARE_STATE_INTERFACES = {
2440 "joint1/position",
"joint1/velocity",
"joint1/some_unlisted_interface"};
2442[[maybe_unused]]
const std::string TEST_SENSOR_HARDWARE_NAME =
"TestSensorHardware";
2443[[maybe_unused]]
const std::string TEST_SENSOR_HARDWARE_TYPE =
"sensor";
2444[[maybe_unused]]
const std::string TEST_SENSOR_HARDWARE_PLUGIN_NAME =
"test_sensor";
2445[[maybe_unused]]
const std::vector<std::string> TEST_SENSOR_HARDWARE_COMMAND_INTERFACES = {
""};
2446[[maybe_unused]]
const std::vector<std::string> TEST_SENSOR_HARDWARE_STATE_INTERFACES = {
2447 "sensor1/velocity"};
2449[[maybe_unused]]
const std::string TEST_SYSTEM_HARDWARE_NAME =
"TestSystemHardware";
2450[[maybe_unused]]
const std::string TEST_SYSTEM_HARDWARE_TYPE =
"system";
2451[[maybe_unused]]
const std::string TEST_SYSTEM_HARDWARE_PLUGIN_NAME =
"test_system";
2452[[maybe_unused]]
const std::vector<std::string> TEST_SYSTEM_HARDWARE_COMMAND_INTERFACES = {
2453 "joint2/velocity",
"joint2/max_acceleration",
"joint3/velocity",
"configuration/max_tcp_jerk"};
2454[[maybe_unused]]
const std::vector<std::string> TEST_SYSTEM_HARDWARE_STATE_INTERFACES = {
2455 "joint2/position",
"joint2/velocity",
"joint2/acceleration",
"joint3/position",
2456 "joint3/velocity",
"joint3/acceleration",
"configuration/max_tcp_jerk"};