diff --git a/crane_x7_examples/README.md b/crane_x7_examples/README.md index 5355116..985037f 100644 --- a/crane_x7_examples/README.md +++ b/crane_x7_examples/README.md @@ -11,6 +11,8 @@ - [RealSense D435マウンタ搭載モデルを使用する場合](#realsense-d435マウンタ搭載モデルを使用する場合) - [準備 (Gazeboを使う場合)](#準備-gazeboを使う場合) - [1. move\_groupとGazeboを起動する](#1-move_groupとgazeboを起動する) + - [準備(Mock Componentsを使う場合)](#準備mock-componentsを使う場合) + - [1. move\_groupとcontrollerを起動する](#1-move_groupとcontrollerを起動する) - [サンプルプログラムを実行する](#サンプルプログラムを実行する) - [Gazeboでサンプルプログラムを実行する場合](#gazeboでサンプルプログラムを実行する場合) - [Examples](#examples) @@ -80,6 +82,19 @@ Gazeboを起動します。 ros2 launch crane_x7_gazebo crane_x7_with_table.launch.py ``` +## 準備(Mock Componentsを使う場合) + +### 1. move_groupとcontrollerを起動する + +次のコマンドでmove_group (`crane_x7_moveit_config`)と +controller (`crane_x7_control`)を起動します。 + +```sh +ros2 launch crane_x7_examples demo.launch.py use_mock_components:=true +``` + +Mock Componentsではカメラを使ったサンプルを実行することはできません。 + ## サンプルプログラムを実行する 準備ができたらサンプルプログラムを実行します。 diff --git a/crane_x7_examples/launch/demo.launch.py b/crane_x7_examples/launch/demo.launch.py index 9b7cead..15a2aa5 100644 --- a/crane_x7_examples/launch/demo.launch.py +++ b/crane_x7_examples/launch/demo.launch.py @@ -44,6 +44,12 @@ def generate_launch_description(): description='Use d435.' ) + declare_use_mock_components = DeclareLaunchArgument( + 'use_mock_components', + default_value='false', + description='Use mock_components or not.' + ) + config_file_path = os.path.join( get_package_share_directory('crane_x7_control'), 'config', @@ -78,6 +84,7 @@ def generate_launch_description(): description_loader.port_name = LaunchConfiguration('port_name') description_loader.baudrate = LaunchConfiguration('baudrate') description_loader.use_d435 = LaunchConfiguration('use_d435') + description_loader.use_mock_components = LaunchConfiguration('use_mock_components') description_loader.timeout_seconds = '1.0' description_loader.manipulator_config_file_path = config_file_path description_loader.manipulator_links_file_path = links_file_path @@ -118,6 +125,7 @@ def generate_launch_description(): declare_port_name, declare_baudrate, declare_use_d435, + declare_use_mock_components, declare_rviz_config, declare_rviz_config_camera, move_group,