From f6a5c394c8d400d566f08a6324d083087959d6a9 Mon Sep 17 00:00:00 2001 From: Kuwamai Date: Tue, 3 Dec 2024 10:54:03 +0900 Subject: [PATCH] =?UTF-8?q?Gazebo=E7=92=B0=E5=A2=83=E3=81=AB=E3=82=AB?= =?UTF-8?q?=E3=83=A1=E3=83=A9=E3=82=92=E8=BF=BD=E5=8A=A0=20(#83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * カメラ追加 * use_sim_timeオプション追加 * カメラの画角調整 * 色検出サンプルの色しきい値調整 * 把持位置調整 * 現バージョンのデフォルト設定を反映 * ArUcoマーカ付きの立方体を追加 * ワールド、launchファイル追加 * use_cameraの有効化 * use_cameraを引数で切り替えられるように変更 * カメラスタンドのURDF修正 --- crane_plus_description/urdf/camera.urdf.xacro | 15 +- .../urdf/camera_stand.urdf.xacro | 61 ++++++-- .../urdf/crane_plus.gazebo.xacro | 51 +++++++ .../urdf/crane_plus.urdf.xacro | 2 + crane_plus_examples/README.md | 22 +++ .../launch/camera_example.launch.py | 16 ++ crane_plus_examples/launch/example.launch.py | 8 + crane_plus_examples/src/color_detection.cpp | 6 +- crane_plus_examples/src/pick_and_place_tf.cpp | 4 +- crane_plus_gazebo/CMakeLists.txt | 1 + crane_plus_gazebo/README.md | 18 +++ crane_plus_gazebo/gui/gui.config | 137 ++++++++++++++++-- .../crane_plus_with_aruco_cube.launch.py | 41 ++++++ .../launch/crane_plus_with_red_cube.launch.py | 41 ++++++ .../launch/crane_plus_with_table.launch.py | 56 +++++-- .../aruco_cube_0/meshes/aruco_cube_0.dae | 115 +++++++++++++++ .../aruco_cube_0/meshes/aruco_cube_0.png | Bin 0 -> 4044 bytes .../models/aruco_cube_0/model.config | 16 ++ .../models/aruco_cube_0/model.sdf | 38 +++++ crane_plus_gazebo/worlds/table.sdf | 16 +- .../worlds/table_with_aruco_cube.sdf | 50 +++++++ .../worlds/table_with_red_cube.sdf | 50 +++++++ 22 files changed, 712 insertions(+), 52 deletions(-) create mode 100644 crane_plus_gazebo/launch/crane_plus_with_aruco_cube.launch.py create mode 100644 crane_plus_gazebo/launch/crane_plus_with_red_cube.launch.py create mode 100644 crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.dae create mode 100644 crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.png create mode 100644 crane_plus_gazebo/models/aruco_cube_0/model.config create mode 100644 crane_plus_gazebo/models/aruco_cube_0/model.sdf create mode 100644 crane_plus_gazebo/worlds/table_with_aruco_cube.sdf create mode 100644 crane_plus_gazebo/worlds/table_with_red_cube.sdf 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 3faf9dd..78a34a0 100644 --- a/crane_plus_description/urdf/crane_plus.gazebo.xacro +++ b/crane_plus_description/urdf/crane_plus.gazebo.xacro @@ -26,6 +26,8 @@ name_link_3 name_link_4 name_link_hand + use_camera + use_ignition config_package config_file_path "> @@ -72,5 +74,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 8855bd1..6741ac2 100644 --- a/crane_plus_description/urdf/crane_plus.urdf.xacro +++ b/crane_plus_description/urdf/crane_plus.urdf.xacro @@ -129,6 +129,8 @@ 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 73d9868..b6c46b6 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 99ca7a8..2c82af0 100644 --- a/crane_plus_gazebo/gui/gui.config +++ b/crane_plus_gazebo/gui/gui.config @@ -28,7 +28,7 @@ - + 3D View false docked @@ -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,12 +162,11 @@ true true true - - - - + + + false 0 0 @@ -102,9 +178,9 @@ - - - + + + false 250 0 @@ -116,18 +192,49 @@ + + + + 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 2d614d7..024cdbd 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 = {'GZ_SIM_SYSTEM_PLUGIN_PATH': os.environ['LD_LIBRARY_PATH'], - 'GZ_SIM_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') + 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')) + ':' + + 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 オプションで起動時にシミュレーションをスタートしないと、コントローラが起動しない - gz_sim = ExecuteProcess( - cmd=['gz sim -r', world_file, '--gui-config', gui_config], + ign_gazebo = ExecuteProcess( + 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.gz_control_config_package = 'crane_plus_control' description_loader.gz_control_config_file_path = 'config/crane_plus_controllers.yaml' @@ -61,9 +80,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, @@ -85,15 +118,20 @@ def generate_launch_description(): bridge = Node( package='ros_gz_bridge', executable='parameter_bridge', - arguments=['/clock@rosgraph_msgs/msg/Clock[gz.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), - gz_sim, + 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 0000000000000000000000000000000000000000..42d74b34b8810179b29711a0d3a6cc141aa2eb00 GIT binary patch literal 4044 zcmeHKdsGuw8o!~Sz^drF2vuCO@qv%#DM2zzKuLJS8j64hPAxW&Nf=0G(#!zE!$`Zk zthj1V>sCD21%-C4x{z9Gk%ko;idL(!N8z|sD1!CDDuN(j1##~L<*^)<{d3PT=ghft z@9%fN`+eX2ecznqM@5EDcc1GH0GO_bkVgaH1YeziD>G!zm6ZYD;)%t^QE|$3ND^V- zsWn6*%A*ZNhyxH9OdHinsVK!xM0FT0<#bwWIBZNK<*39;fzl{Lld*^_6B?5h8Jm=q znk3P1f`i-xX#^TDpp=?T8}vAd&{B@WE&|_~Wj=@Ppirq&PMk7|Eh9`QTg(&l1e_pu zcA!b4MWW?lPd3Aul#@(RMugAL$jIPjtmF|U9bYJsNcaK~UnJr}2A9mlDK*W-$%TxG zVH?}evN4&U2r`*? z#+DIy!bX(FMq?Ov41-LdQ<(M{bOxC~hq+cNpC5(6FfI_13QdQJc#_m{4n2*VjLkHn z{AiRU(o9KcXgZ2h3mv(Dry(*Es-{pme54$aK;*|23b~?Hu>t`i6d?l13V}o*7$GYO z4W`YUNERVtAtDq*GBTD8<)Kki>dEj&5{@wJVW*%ppX<@+9vPu0Owc(P!%ByfOb;$}yS5;5XSTYxNmq3_7~Ww_#>SPPDXkiibEBdU?;maxcyH6u-?U>9wz7jfTbU#ebBPv z59_^82hS@p6t;z!j{22{nd^0>B^@4mwO5eH5b|?7jEWU$SksF&iGeS{9;{wzl^uJzVtw@ju+I4<=7Ncai3|v zzmd&*Uv8`avhq#+#_GGrQW}E#Es}!hJg2XgvwW*R}<7ZXZpad53E&y3dasN?cre^N-iB(`4g^-Q0yZl zwC|MlA6KS_<2 z+V;>5uj93iQ@(6Tb(7xXHsoK~;92zk0m+Oq)z!Gq?%&ZBm;QcR*%{SaHaqYBcbWZd zUR&yPU1jzb<}>DIjEE-zn6sF9Sc>RHT>!ZLppdVLr9bXy5=PF8_c_^mZ~39)EZ_YK zPsFtC=Q(l_oN?E#S!&Ajsr`hy&gm9!I^LIlq{08U{<5$e{aXsV+y5E7r|XTPHtvj9 zKr5`RUFE0<;@{pn$o12^Q%6tt^yju1iIx-dXXl>RRy68Q`J4@|c5<4W?61ChBIlPcyw$eZ z7K_DW;f^ZRuE+mN*}UzY*E%$0KKHlOOLIv}Q*UqY-d_kDKgEPRbg}qnw^@@azRy;X z9-um;rDkh!%8|`A=ADfl&DIQ+N)vEN{M+VBX`k2pG?XIp=y&ZLBVL*B1s1b8_~r y)nL7u_2PP&L`l7*Os4U?%+kv&js287n(k~*{d$RSzM1(Gt_Y2kmxsLl-hTktKcd?J literal 0 HcmV?d00001 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 0fb6014..ec7e754 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.gazebosim.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