Skip to content

Commit

Permalink
Merge branch 'ros2' into moveit_py
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuwamai committed Jan 23, 2025
2 parents 1df30a4 + c565ff6 commit c76f1d4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions crane_x7_examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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ではカメラを使ったサンプルを実行することはできません。

## サンプルプログラムを実行する

準備ができたらサンプルプログラムを実行します。
Expand Down
8 changes: 8 additions & 0 deletions crane_x7_examples/launch/demo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c76f1d4

Please sign in to comment.