diff --git a/test/test_robot_description_loader.py b/test/test_robot_description_loader.py index 4a4e869..a2aa567 100644 --- a/test/test_robot_description_loader.py +++ b/test/test_robot_description_loader.py @@ -98,3 +98,13 @@ def test_use_rgb_camera(): rdl.gz_control_config_package = 'raspimouse_description' rdl.gz_control_config_file_path = 'test/dummy_controllers.yaml' assert 'realsense2_description/meshes/d435.dae' in exec_load(rdl) + + +def test_camera_link(): + # use_gazeboとuse_rgb_cameraが変更され、xacroにcamera linkがセットされることを期待 + rdl = RobotDescriptionLoader() + rdl.use_gazebo = 'true' + rdl.use_rgb_camera = 'true' + rdl.gz_control_config_package = 'raspimouse_description' + rdl.gz_control_config_file_path = 'test/dummy_controllers.yaml' + assert 'camera_link' in exec_load(rdl) diff --git a/urdf/raspimouse.urdf.xacro b/urdf/raspimouse.urdf.xacro index f1262d8..f183eaf 100644 --- a/urdf/raspimouse.urdf.xacro +++ b/urdf/raspimouse.urdf.xacro @@ -29,6 +29,7 @@ + @@ -98,19 +99,10 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + ogre2 + + + + + + 30.0 + true + camera_link + 0 0 0 0 0 0 + /camera/color/image_raw + + 1.20428 + + 1920 + 1080 + R8G8B8 + + + 0.02 + 300 + + + + + + + + diff --git a/urdf/wheel/diffdrive.gazebo.xacro b/urdf/wheel/diffdrive.gazebo.xacro index 21ea78f..c7afbd1 100644 --- a/urdf/wheel/diffdrive.gazebo.xacro +++ b/urdf/wheel/diffdrive.gazebo.xacro @@ -20,6 +20,7 @@ +