diff --git a/crane_plus_description/urdf/camera.urdf.xacro b/crane_plus_description/urdf/camera.urdf.xacro index 8e467e3..1fd58bd 100644 --- a/crane_plus_description/urdf/camera.urdf.xacro +++ b/crane_plus_description/urdf/camera.urdf.xacro @@ -7,14 +7,23 @@ - + - + + + + + + + + + + - + diff --git a/crane_plus_description/urdf/camera_stand.urdf.xacro b/crane_plus_description/urdf/camera_stand.urdf.xacro index d5c3d86..e4db139 100644 --- a/crane_plus_description/urdf/camera_stand.urdf.xacro +++ b/crane_plus_description/urdf/camera_stand.urdf.xacro @@ -7,16 +7,23 @@ - + + + + + + + + - + @@ -31,11 +38,18 @@ + + + + + + + - - + + @@ -43,17 +57,24 @@ - + + + + + + + + - - + + @@ -61,17 +82,24 @@ - + + + + + + + + - - + + @@ -79,17 +107,24 @@ - + + + + + + + + - - + + diff --git a/crane_plus_description/urdf/crane_plus.gazebo.xacro b/crane_plus_description/urdf/crane_plus.gazebo.xacro index 791a00b..26daa5a 100644 --- a/crane_plus_description/urdf/crane_plus.gazebo.xacro +++ b/crane_plus_description/urdf/crane_plus.gazebo.xacro @@ -26,6 +26,7 @@ name_link_3 name_link_4 name_link_hand + use_camera use_ignition config_package config_file_path @@ -82,5 +83,54 @@ + + + + ogre2 + + + + + + 0 0 0 ${radians(90)} ${radians(-90)} 0 + 10 + true + image_raw + camera_color_optical_frame + + + + + + ${camera_hfov} + + ${camera_width} + ${camera_height} + + + 0.1 + 10.0 + + + + ${camera_focal_length} + ${camera_focal_length} + ${(camera_width + 1) / 2} + ${(camera_height + 1) / 2} + 1.0 + + + ${camera_focal_length} + ${camera_focal_length} + ${(camera_width + 1) / 2} + ${(camera_height + 1) / 2} + 0 + 0 + + + + + + diff --git a/crane_plus_description/urdf/crane_plus.urdf.xacro b/crane_plus_description/urdf/crane_plus.urdf.xacro index d783b81..2989e4c 100644 --- a/crane_plus_description/urdf/crane_plus.urdf.xacro +++ b/crane_plus_description/urdf/crane_plus.urdf.xacro @@ -130,6 +130,7 @@ name_link_3="${NAME_LINK_3}" name_link_4="${NAME_LINK_4}" name_link_hand="${NAME_LINK_HAND}" + use_camera="$(arg use_camera)" use_ignition="$(arg use_ignition)" config_package="$(arg gz_control_config_package)" config_file_path="$(arg gz_control_config_file_path)" /> diff --git a/crane_plus_examples/README.md b/crane_plus_examples/README.md index 872e7bd..6d25c56 100644 --- a/crane_plus_examples/README.md +++ b/crane_plus_examples/README.md @@ -53,6 +53,28 @@ $ ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0 use_cam $ ros2 launch crane_plus_gazebo crane_plus_with_table.launch.py ``` +#### Webカメラ搭載モデルを使用する場合 + +Webカメラ搭載モデルの場合は、次のコマンドを実行してください。 + +```sh +$ ros2 launch crane_plus_gazebo crane_plus_with_table.launch.py use_camera:=true +``` + +CRANE+ V2の前にArUcoマーカ付きのBoxを置いたシミュレータ環境を使用する場合は次のコマンドを実行します。 +[aruco\_detection](#aruco_detection)サンプルを実行する際に使用することを想定しています。 + +```sh +$ ros2 launch crane_plus_gazebo crane_plus_with_aruco_cube.launch.py use_camera:=true +``` + +CRANE+ V2の前に赤いBoxを置いたシミュレータ環境を使用する場合は次のコマンドを実行します。 +[color\_detection](#color_detection)サンプルを実行する際に使用すること想定しています。 + +```sh +$ ros2 launch crane_plus_gazebo crane_plus_with_red_cube.launch.py use_camera:=true +``` + ## サンプルプログラムを実行する 準備ができたらサンプルプログラムを実行します。 diff --git a/crane_plus_examples/launch/camera_example.launch.py b/crane_plus_examples/launch/camera_example.launch.py index 3bd94df..e0a7b1b 100644 --- a/crane_plus_examples/launch/camera_example.launch.py +++ b/crane_plus_examples/launch/camera_example.launch.py @@ -20,6 +20,7 @@ from launch.actions import DeclareLaunchArgument from launch.substitutions import LaunchConfiguration from launch_ros.actions import Node +from launch_ros.actions import SetParameter import yaml @@ -46,7 +47,14 @@ def load_yaml(package_name, file_path): def generate_launch_description(): + declare_use_camera = DeclareLaunchArgument( + 'use_camera', + default_value='true', + description='Use camera.' + ) + description_loader = RobotDescriptionLoader() + description_loader.use_camera = LaunchConfiguration('use_camera') robot_description_semantic_config = load_file( 'crane_plus_moveit_config', 'config/crane_plus.srdf') @@ -61,6 +69,11 @@ def generate_launch_description(): '[color_detection]') ) + declare_use_sim_time = DeclareLaunchArgument( + 'use_sim_time', default_value='false', + description=('Set true when using the gazebo simulator.') + ) + picking_node = Node(name='pick_and_place_tf', package='crane_plus_examples', executable='pick_and_place_tf', @@ -75,6 +88,9 @@ def generate_launch_description(): output='screen') return LaunchDescription([ + declare_use_camera, + declare_use_sim_time, + SetParameter(name='use_sim_time', value=LaunchConfiguration('use_sim_time')), detection_node, picking_node, declare_example_name diff --git a/crane_plus_examples/launch/example.launch.py b/crane_plus_examples/launch/example.launch.py index 01ea634..e5f9874 100644 --- a/crane_plus_examples/launch/example.launch.py +++ b/crane_plus_examples/launch/example.launch.py @@ -47,7 +47,14 @@ def load_yaml(package_name, file_path): def generate_launch_description(): + declare_use_camera = DeclareLaunchArgument( + 'use_camera', + default_value='false', + description='Use camera.' + ) + description_loader = RobotDescriptionLoader() + description_loader.use_camera = LaunchConfiguration('use_camera') robot_description_semantic_config = load_file( 'crane_plus_moveit_config', 'config/crane_plus.srdf') @@ -76,6 +83,7 @@ def generate_launch_description(): kinematics_yaml]) return LaunchDescription([ + declare_use_camera, declare_use_sim_time, SetParameter(name='use_sim_time', value=LaunchConfiguration('use_sim_time')), declare_example_name, diff --git a/crane_plus_examples/src/color_detection.cpp b/crane_plus_examples/src/color_detection.cpp index 8590e51..c4cd53f 100644 --- a/crane_plus_examples/src/color_detection.cpp +++ b/crane_plus_examples/src/color_detection.cpp @@ -65,10 +65,10 @@ class ImageSubscriber : public rclcpp::Node if (camera_info_) { // 赤い物体を検出するようにHSVの範囲を設定 // 周囲の明るさ等の動作環境に合わせて調整 - const int LOW_H_1 = 0, HIGH_H_1 = 20; - const int LOW_H_2 = 160, HIGH_H_2 = 179; + const int LOW_H_1 = 0, HIGH_H_1 = 10; + const int LOW_H_2 = 170, HIGH_H_2 = 179; const int LOW_S = 100, HIGH_S = 255; - const int LOW_V = 50, HIGH_V = 255; + const int LOW_V = 100, HIGH_V = 255; // ウェブカメラの画像を受け取る auto cv_img = cv_bridge::toCvShare(msg, msg->encoding); diff --git a/crane_plus_examples/src/pick_and_place_tf.cpp b/crane_plus_examples/src/pick_and_place_tf.cpp index 6a49915..d91bdbc 100644 --- a/crane_plus_examples/src/pick_and_place_tf.cpp +++ b/crane_plus_examples/src/pick_and_place_tf.cpp @@ -155,7 +155,7 @@ class PickAndPlaceTf : public rclcpp::Node const double GRIPPER_OFFSET = 0.13; double gripper_offset_x = GRIPPER_OFFSET * std::cos(theta_rad); double gripper_offset_y = GRIPPER_OFFSET * std::sin(theta_rad); - if (!control_arm(x - gripper_offset_x, y - gripper_offset_y, 0.05, 0, 90, theta_deg)) { + if (!control_arm(x - gripper_offset_x, y - gripper_offset_y, 0.04, 0, 90, theta_deg)) { // アーム動作に失敗した時はpick_and_placeを中断して待機姿勢に戻る control_arm(0.0, 0.0, 0.17, 0, 0, 0); return; @@ -168,7 +168,7 @@ class PickAndPlaceTf : public rclcpp::Node control_arm(0.0, 0.0, 0.17, 0, 90, 0); // 下ろす - control_arm(0.0, -0.15, 0.06, 0, 90, -90); + control_arm(0.0, -0.15, 0.05, 0, 90, -90); // ハンドを開く control_gripper(GRIPPER_OPEN); diff --git a/crane_plus_gazebo/CMakeLists.txt b/crane_plus_gazebo/CMakeLists.txt index 8709f0e..a139c35 100644 --- a/crane_plus_gazebo/CMakeLists.txt +++ b/crane_plus_gazebo/CMakeLists.txt @@ -7,6 +7,7 @@ install(DIRECTORY launch worlds gui + models DESTINATION share/${PROJECT_NAME}/ ) diff --git a/crane_plus_gazebo/README.md b/crane_plus_gazebo/README.md index 07a43ed..d76b9b2 100644 --- a/crane_plus_gazebo/README.md +++ b/crane_plus_gazebo/README.md @@ -15,4 +15,22 @@ CRANE+ V2 の[Gazebo](https://gazebosim.org/home) $ ros2 launch crane_plus_gazebo crane_plus_with_table.launch.py ``` +カメラ付きモデルを使用する場合は下記コマンドを実行します。 + +```sh +$ ros2 launch crane_plus_gazebo crane_plus_with_table.launch.py use_camera:=true +``` + +CRANE+ V2の前にArUcoマーカ付きのBoxを置いたシミュレータ環境を使用する場合は下記コマンドを実行します。 + +```sh +$ ros2 launch crane_plus_gazebo crane_plus_with_aruco_cube.launch.py +``` + +CRANE+ V2の前に赤いBoxを置いたシミュレータ環境を使用する場合は下記コマンドを実行します。 + +```sh +$ ros2 launch crane_plus_gazebo crane_plus_with_red_cube.launch.py +``` + ![crane_plus_ignition](https://rt-net.github.io/images/crane-plus/crane_plus_ignition.png) diff --git a/crane_plus_gazebo/gui/gui.config b/crane_plus_gazebo/gui/gui.config index 6f8b4dc..0acf58f 100644 --- a/crane_plus_gazebo/gui/gui.config +++ b/crane_plus_gazebo/gui/gui.config @@ -27,7 +27,7 @@ - + 3D View false @@ -38,10 +38,86 @@ scene 0.4 0.4 0.4 0.8 0.8 0.8 - 0.4 0 1.4 0 0.4 3.14 + 0.7 0 1.5 0 0.4 3.14 + 50 - + + + + floating + 5 + 5 + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + false + 5 + 5 + floating + false + + + + + + false + 5 + 5 + floating + false + + + + + + false + 5 + 5 + floating + false + + + + World control @@ -61,10 +137,11 @@ true true true + true - + World stats @@ -85,11 +162,10 @@ true true true - - - + + false 0 @@ -102,8 +178,8 @@ - - + + false 250 @@ -116,17 +192,48 @@ + + + + false + 0 + 50 + 250 + 50 + floating + false + #777777 + + + + false + + false - 400 - 0 + 250 + 50 50 50 floating false - #666666 + #777777 + + + + + + + false + 300 + 50 + 100 + 50 + floating + false + #777777 diff --git a/crane_plus_gazebo/launch/crane_plus_with_aruco_cube.launch.py b/crane_plus_gazebo/launch/crane_plus_with_aruco_cube.launch.py new file mode 100644 index 0000000..077e9b4 --- /dev/null +++ b/crane_plus_gazebo/launch/crane_plus_with_aruco_cube.launch.py @@ -0,0 +1,41 @@ +# Copyright 2024 RT Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription +from launch_ros.actions import SetParameter +from launch.launch_description_sources import PythonLaunchDescriptionSource + + +def generate_launch_description(): + world_file = os.path.join( + get_package_share_directory('crane_plus_gazebo'), + 'worlds', + 'table_with_aruco_cube.sdf') + world_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource([ + get_package_share_directory('crane_plus_gazebo'), + '/launch/crane_plus_with_table.launch.py']), + launch_arguments={ + 'world_name': world_file + }.items() + ) + + return LaunchDescription([ + SetParameter(name='use_sim_time', value=True), + world_launch + ]) diff --git a/crane_plus_gazebo/launch/crane_plus_with_red_cube.launch.py b/crane_plus_gazebo/launch/crane_plus_with_red_cube.launch.py new file mode 100644 index 0000000..8d7130a --- /dev/null +++ b/crane_plus_gazebo/launch/crane_plus_with_red_cube.launch.py @@ -0,0 +1,41 @@ +# Copyright 2024 RT Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription +from launch_ros.actions import SetParameter +from launch.launch_description_sources import PythonLaunchDescriptionSource + + +def generate_launch_description(): + world_file = os.path.join( + get_package_share_directory('crane_plus_gazebo'), + 'worlds', + 'table_with_red_cube.sdf') + world_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource([ + get_package_share_directory('crane_plus_gazebo'), + '/launch/crane_plus_with_table.launch.py']), + launch_arguments={ + 'world_name': world_file + }.items() + ) + + return LaunchDescription([ + SetParameter(name='use_sim_time', value=True), + world_launch + ]) diff --git a/crane_plus_gazebo/launch/crane_plus_with_table.launch.py b/crane_plus_gazebo/launch/crane_plus_with_table.launch.py index 67a2187..f13715f 100644 --- a/crane_plus_gazebo/launch/crane_plus_with_table.launch.py +++ b/crane_plus_gazebo/launch/crane_plus_with_table.launch.py @@ -17,25 +17,43 @@ from ament_index_python.packages import get_package_share_directory from crane_plus_description.robot_description_loader import RobotDescriptionLoader from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument from launch.actions import ExecuteProcess from launch.actions import IncludeLaunchDescription +from launch.conditions import IfCondition +from launch.conditions import UnlessCondition from launch.launch_description_sources import PythonLaunchDescriptionSource from launch_ros.actions import Node from launch_ros.actions import SetParameter +from launch.substitutions import LaunchConfiguration def generate_launch_description(): + declare_use_camera = DeclareLaunchArgument( + 'use_camera', + default_value='false', + description='Use camera.' + ) + + declare_world_name = DeclareLaunchArgument( + 'world_name', + default_value=os.path.join( + get_package_share_directory('crane_plus_gazebo'), 'worlds', 'table.sdf'), + description='Set world name.' + ) + # PATHを追加で通さないとSTLファイルが読み込まれない env = {'IGN_GAZEBO_SYSTEM_PLUGIN_PATH': os.environ['LD_LIBRARY_PATH'], 'IGN_GAZEBO_RESOURCE_PATH': os.path.dirname( - get_package_share_directory('crane_plus_description'))} - world_file = os.path.join( - get_package_share_directory('crane_plus_gazebo'), 'worlds', 'table.sdf') + get_package_share_directory('crane_plus_description')) + ':' + + os.path.join(get_package_share_directory('crane_plus_gazebo'), 'models'), + } + gui_config = os.path.join( get_package_share_directory('crane_plus_gazebo'), 'gui', 'gui.config') # -r オプションで起動時にシミュレーションをスタートしないと、コントローラが起動しない ign_gazebo = ExecuteProcess( - cmd=['ign gazebo -r', world_file, '--gui-config', gui_config], + cmd=['ign gazebo -r', LaunchConfiguration('world_name'), '--gui-config', gui_config], output='screen', additional_env=env, shell=True @@ -52,6 +70,7 @@ def generate_launch_description(): ) description_loader = RobotDescriptionLoader() + description_loader.use_camera = LaunchConfiguration('use_camera') description_loader.use_gazebo = 'true' description_loader.use_ignition = 'true' description_loader.gz_control_config_package = 'crane_plus_control' @@ -62,9 +81,23 @@ def generate_launch_description(): PythonLaunchDescriptionSource([ get_package_share_directory('crane_plus_moveit_config'), '/launch/run_move_group.launch.py']), + condition=UnlessCondition(LaunchConfiguration('use_camera')), launch_arguments={'loaded_description': description}.items() ) + rviz_config_file = get_package_share_directory( + 'crane_plus_examples') + '/launch/camera_example.rviz' + move_group_camera = IncludeLaunchDescription( + PythonLaunchDescriptionSource([ + get_package_share_directory('crane_plus_moveit_config'), + '/launch/run_move_group.launch.py']), + condition=IfCondition(LaunchConfiguration('use_camera')), + launch_arguments={ + 'loaded_description': description, + 'rviz_config_file': rviz_config_file + }.items() + ) + spawn_joint_state_controller = ExecuteProcess( cmd=['ros2 run controller_manager spawner joint_state_broadcaster'], shell=True, @@ -86,15 +119,20 @@ def generate_launch_description(): bridge = Node( package='ros_gz_bridge', executable='parameter_bridge', - arguments=['/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock'], + arguments=['/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock', + 'image_raw@sensor_msgs/msg/Image[ignition.msgs.Image', + 'camera_info@sensor_msgs/msg/CameraInfo[ignition.msgs.CameraInfo'], output='screen' ) return LaunchDescription([ SetParameter(name='use_sim_time', value=True), + declare_use_camera, + declare_world_name, ign_gazebo, gazebo_spawn_entity, move_group, + move_group_camera, spawn_joint_state_controller, spawn_arm_controller, spawn_gripper_controller, diff --git a/crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.dae b/crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.dae new file mode 100644 index 0000000..099e173 --- /dev/null +++ b/crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.dae @@ -0,0 +1,115 @@ + + + + + Blender User + Blender 4.3.0 commit date:2024-11-19, commit time:08:52, hash:2b18cad88b13 + + 2024-11-27T02:32:31 + 2024-11-27T02:32:31 + + Z_UP + + + + + + + aruco_cube_0_png + + + + + aruco_cube_0_png-surface + + + + + + 0 0 0 1 + + + + + + 1.5 + + + + + + + + + aruco_cube_0.png + + + + + + + + + + + + -0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 0.5 + + + + + + + + + + -1 0 0 0 1 0 1 0 0 0 -1 0 0 0 -1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 -1 0 0 0 1 0 1 0 0 0 -1 0 0 0 -1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 + + + + + + + + + + 0.625 0 0.375 0.25 0.375 0 0.625 0.25 0.375 0.5 0.375 0.25 0.625 0.5 0.375 0.75 0.375 0.5 0.625 0.75 0.375 1 0.375 0.75 0.375 0.5 0.125 0.75 0.125 0.5 0.875 0.5 0.625 0.75 0.625 0.5 0.375 0 0.375 0.25 0.375 0.25 0.375 0.75 0.625 0.75 0.625 0.75 0.375 0.5 0.375 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.25 0.625 0 0.375 0 0.375 0 0.375 0.75 0.375 1 0.375 1 0.375 0.5 0.625 0.5 0.625 0.5 0.625 0 0.625 0.25 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1 0.375 1 0.375 0.5 0.375 0.75 0.125 0.75 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0 0.375 0 0.375 0.25 0.375 0.75 0.375 0.75 0.625 0.75 0.375 0.5 0.375 0.5 0.375 0.75 0.375 0.25 0.375 0.25 0.625 0.25 0.625 0 0.625 0 0.375 0 0.375 0.75 0.375 0.75 0.375 1 0.375 0.5 0.375 0.5 0.625 0.5 + + + + + + + + + + + + + + +

1 0 0 2 0 1 0 0 2 3 1 3 6 1 4 2 1 5 7 2 6 4 2 7 6 2 8 5 3 9 0 3 10 4 3 11 6 4 12 0 4 13 2 4 14 3 5 15 5 5 16 7 5 17 0 6 18 10 6 19 2 6 20 4 7 21 13 7 22 5 7 23 6 8 24 12 8 25 4 8 26 2 9 27 11 9 28 3 9 29 1 10 30 8 10 31 0 10 32 4 11 33 8 11 34 0 11 35 6 12 36 15 12 37 7 12 38 1 13 39 3 13 40 2 13 41 3 14 42 7 14 43 6 14 44 7 15 45 5 15 46 4 15 47 5 16 48 1 16 49 0 16 50 6 17 51 4 17 52 0 17 53 3 18 54 1 18 55 5 18 56 0 19 57 8 19 58 10 19 59 4 20 60 12 20 61 13 20 62 6 21 63 14 21 64 12 21 65 2 22 66 10 22 67 11 22 68 1 23 69 9 23 70 8 23 71 4 24 72 12 24 73 8 24 74 6 25 75 14 25 76 15 25 77

+
+
+
+
+ + + + 0.05000001 0 0 0 0 0.05000001 0 0 0 0 0.05000001 0 0 0 0 1 + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.png b/crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.png new file mode 100644 index 0000000..42d74b3 Binary files /dev/null and b/crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.png differ diff --git a/crane_plus_gazebo/models/aruco_cube_0/model.config b/crane_plus_gazebo/models/aruco_cube_0/model.config new file mode 100644 index 0000000..75ee551 --- /dev/null +++ b/crane_plus_gazebo/models/aruco_cube_0/model.config @@ -0,0 +1,16 @@ + + + + aruco_cube_0 + 1.0 + model.sdf + + + Atsushi Kuwagata + kuwagata@rt-net.jp + + + + 5 cm cube with ArUco marker + + diff --git a/crane_plus_gazebo/models/aruco_cube_0/model.sdf b/crane_plus_gazebo/models/aruco_cube_0/model.sdf new file mode 100644 index 0000000..22e7ad9 --- /dev/null +++ b/crane_plus_gazebo/models/aruco_cube_0/model.sdf @@ -0,0 +1,38 @@ + + + + + 0 0 0 0 0 0 + + + + model://aruco_cube_0/meshes/aruco_cube_0.dae + + + + + + + 0.05 0.05 0.05 + + + + + + 0.9 + 0.9 + + + + + + + 0.00002 + 0.00002 + 0.00002 + + 0.05 + + + + diff --git a/crane_plus_gazebo/worlds/table.sdf b/crane_plus_gazebo/worlds/table.sdf index bc2925b..7e1da5d 100644 --- a/crane_plus_gazebo/worlds/table.sdf +++ b/crane_plus_gazebo/worlds/table.sdf @@ -1,5 +1,5 @@ - + 0.001 @@ -37,12 +37,14 @@ 0.29 0 0 0 0 1.5708 - - - https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Wood%20cube%205cm - - 0 -0.1 1.0 0 0 0 - + + + + model://aruco_cube_0 + + + 0 -0.1 1.05 0 0 0 + \ No newline at end of file diff --git a/crane_plus_gazebo/worlds/table_with_aruco_cube.sdf b/crane_plus_gazebo/worlds/table_with_aruco_cube.sdf new file mode 100644 index 0000000..fbc4ce8 --- /dev/null +++ b/crane_plus_gazebo/worlds/table_with_aruco_cube.sdf @@ -0,0 +1,50 @@ + + + + + 0.001 + 1.0 + + + + + + + + + + + https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Sun + + + + + + https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ground%20Plane + + + + + + https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Table + + 0.29 0 0 0 0 1.5708 + + + + + + model://aruco_cube_0 + + + 0.2 0.05 1.05 0 0 0 + + + + \ No newline at end of file diff --git a/crane_plus_gazebo/worlds/table_with_red_cube.sdf b/crane_plus_gazebo/worlds/table_with_red_cube.sdf new file mode 100644 index 0000000..0804c9f --- /dev/null +++ b/crane_plus_gazebo/worlds/table_with_red_cube.sdf @@ -0,0 +1,50 @@ + + + + + 0.001 + 1.0 + + + + + + + + + + + https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Sun + + + + + + https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ground%20Plane + + + + + + https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Table + + 0.29 0 0 0 0 1.5708 + + + + + + model://aruco_cube_0 + + + 0.2 0.05 1.05 3.1415 0 0 + + + + \ No newline at end of file