diff --git a/sciurus17_description/robot_description_loader.py b/sciurus17_description/robot_description_loader.py index e555f0b..1f7ebae 100755 --- a/sciurus17_description/robot_description_loader.py +++ b/sciurus17_description/robot_description_loader.py @@ -21,6 +21,7 @@ def __init__(self): self.use_gazebo_head_camera = 'false' self.use_gazebo_chest_camera = 'false' self.use_mock_components = 'false' + self.use_isaacsim = 'false' self.gz_control_config_package = '' self.gz_control_config_file_path = '' @@ -36,6 +37,7 @@ def load(self): ' use_gazebo_head_camera:=', self.use_gazebo_head_camera, ' use_gazebo_chest_camera:=', self.use_gazebo_chest_camera, ' use_mock_components:=', self.use_mock_components, + ' use_isaacsim:=', self.use_isaacsim, ' gz_control_config_package:=', self.gz_control_config_package, ' gz_control_config_file_path:=', self.gz_control_config_file_path ]) diff --git a/test/test_robot_description_loader.py b/test/test_robot_description_loader.py index e3a2237..e5bfc61 100644 --- a/test/test_robot_description_loader.py +++ b/test/test_robot_description_loader.py @@ -88,3 +88,13 @@ def test_use_mock_components(): rdl.gz_control_config_package = 'sciurus17_description' rdl.gz_control_config_file_path = 'config/dummy_controllers.yaml' assert 'mock_components/GenericSystem' in exec_load(rdl) + + +def test_use_isaacsim(): + # use_isaacsimが変更され、xacroにIsaac Sim向けのpluginがセットされることを期待 + rdl = RobotDescriptionLoader() + rdl.use_isaacsim = 'true' + description = exec_load(rdl) + assert 'topic_based_ros2_control/TopicBasedSystem' in description + assert '/joint_command' in description + assert '/joint_states' in description diff --git a/urdf/sciurus17.ros2_control.xacro b/urdf/sciurus17.ros2_control.xacro index 3a584ab..ee9f948 100644 --- a/urdf/sciurus17.ros2_control.xacro +++ b/urdf/sciurus17.ros2_control.xacro @@ -3,6 +3,7 @@ - - mock_components/GenericSystem + + topic_based_ros2_control/TopicBasedSystem + /joint_command + /joint_states - - sciurus17_hardware/Sciurus17Hardware - ${port_name} - ${baudrate} - ${timeout_seconds} - ${manipulator_config_file_path} + + + mock_components/GenericSystem + + + sciurus17_hardware/Sciurus17Hardware + ${port_name} + ${baudrate} + ${timeout_seconds} + ${manipulator_config_file_path} + diff --git a/urdf/sciurus17.urdf.xacro b/urdf/sciurus17.urdf.xacro index 5f0fe19..402bdf8 100644 --- a/urdf/sciurus17.urdf.xacro +++ b/urdf/sciurus17.urdf.xacro @@ -21,6 +21,7 @@ + @@ -118,6 +119,7 @@