Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jazzy対応(MoveitConfigsBuilder) #78

Merged
merged 62 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
587ec53
jazzy対応(MoveitConfigsBuilder)
mizonon Jul 19, 2024
1374d50
不要なコメント削除
mizonon Aug 9, 2024
6b10a74
不要ファイルのignore
mizonon Aug 13, 2024
89bdf8b
crane_plus_moveit_config/launchの中の不要ファイル削除
mizonon Aug 13, 2024
96186f6
default_***_scaling_factorを0.1->1.0に変更
mizonon Aug 15, 2024
e3898ed
setup assistantによる書換わりを元の書き方に修正
mizonon Aug 15, 2024
553e522
exampleのdemo.lauch修正
mizonon Aug 15, 2024
384f2b4
run_move_group.rviz削除
mizonon Aug 15, 2024
7147e27
sensors_3d.yaml削除
mizonon Aug 15, 2024
de86b8d
solverを元に戻す
mizonon Aug 15, 2024
0314d62
.gitignore変更
mizonon Aug 15, 2024
185c6bd
setup_assistant関連のファイル追加
mizonon Aug 15, 2024
2e01610
ciのjazzy対応
mizonon Aug 15, 2024
4ba5ed8
run_move_froup.lauch.pyの整理
mizonon Aug 15, 2024
92f9340
不要な権限変更
mizonon Aug 15, 2024
b6e6962
不要な権限変更
mizonon Aug 15, 2024
bde95e1
不要なscript削除
mizonon Aug 16, 2024
9013d35
kinematicの設定修正
mizonon Aug 16, 2024
82a96db
ソルバーをKDLに戻す
mizonon Aug 20, 2024
91add60
warehouse_ros_mongoをcrane_plus_moveit_configのpackage.xmlに含めない
mizonon Sep 19, 2024
1c3b113
レビュー結果反映
mizonon Oct 4, 2024
b227184
README.md(jazzy対応&バイナリインストール方法追加)
mizonon Oct 21, 2024
88f4313
.dockerのREADME.mdのjazzy対応
mizonon Oct 21, 2024
e9a548f
CI対応(copyright追加)
mizonon Oct 21, 2024
bf56ec0
CI対応
mizonon Oct 22, 2024
a74f3b7
CI対応(setup_assistant.launch.py)
mizonon Oct 22, 2024
a671d5e
CI対応(package.xmlの不要な部分削除)
mizonon Oct 22, 2024
86513fb
コメントをjazzyに合わせる
mizonon Oct 22, 2024
2de4b14
ign fuelでgazeboのモデルをダウンロードする記述削除
mizonon Oct 22, 2024
8a157cc
ciのDockerイメージをjazzyに対応
mizonon Oct 22, 2024
f1bfe95
他の製品と設定を共通化
mizonon Oct 22, 2024
e6866a2
crane_plus_description/package.xmlのauthorに溝口を追加
mizonon Oct 23, 2024
f2e153a
ompl_planning.yamlに抜けていた記述追加
mizonon Oct 23, 2024
4d1c0f9
.gitignoreの末尾に.vscode追加
mizonon Nov 13, 2024
cfe7373
旧115行目の改行復活
mizonon Nov 13, 2024
35a0321
ファイル名変更controllers.yaml->moveit_controllers.yaml
mizonon Nov 13, 2024
538f8b3
kinematics_solver_attemptsの指定削除
mizonon Nov 13, 2024
ad45926
RobotDescriptionLoader対応とmoveit_configの不必要な定義削除
mizonon Nov 13, 2024
a9fb79e
robot_description_kinematicsの設定を削除
mizonon Nov 13, 2024
4fc16b3
削除したrun_move_group.rvizの内容をmoveit.rvizとして反映
mizonon Nov 13, 2024
d6a4e16
Sciurus17のrun_move_group.launch.pyの書き方に合わせる
mizonon Nov 13, 2024
d0fa64a
gz_sim対応(crane_plus_gazeboパッケージ)
mizonon Nov 26, 2024
9359f4d
gz_sim対応(crane_plus_descriptionパッケージ)
mizonon Nov 27, 2024
af8dbaa
Ignitionを使用するかのパラメタuse_ignition削除
mizonon Nov 27, 2024
a0e8330
test_use_gazeboをGazebo Harmonicに対応
mizonon Nov 27, 2024
3fdea40
3D SceneのGUIをGazebo Harmonicに対応
mizonon Nov 27, 2024
30b83f4
MoveitConfigsBuilderを使いつつ、rvizの設定ファイルを適切に設定する要修正
mizonon Nov 29, 2024
89749f5
MoveitConfigsBuilderを使いつつ、rvizの設定ファイルを適切に設定する修正
mizonon Nov 29, 2024
f6a5c39
Gazebo環境にカメラを追加 (#83)
Kuwamai Dec 3, 2024
bd9e24d
GazeboのCameraモデル対応したコードのign->gz対応
mizonon Dec 5, 2024
aa875bf
CI対応
mizonon Dec 5, 2024
9ec7323
CI対応
mizonon Dec 5, 2024
f216eff
rviz_configの名称統一
mizonon Dec 12, 2024
cad9fff
spawn_gripper_contolollerの記述を他のコントローラの記述と合わせる
mizonon Dec 12, 2024
3fcac14
rviz_configの切替えの仕方を修正
mizonon Dec 12, 2024
f1a109e
Merge branch 'master' into support_jazzy
mizonon Dec 13, 2024
d744e91
スタイル修正
Kuwamai Dec 20, 2024
9010b44
declare_rviz_config追加
Kuwamai Dec 20, 2024
e43fd76
configファイルのパス設定を修正
Kuwamai Dec 20, 2024
d58ec1a
gazebo表記をgzに統一
Kuwamai Dec 20, 2024
e0d05fd
スタイル修正
Kuwamai Dec 20, 2024
17a3da5
gui.config修正
Kuwamai Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ https://github.com/rt-net/crane_plus/pkgs/container/crane_plus
をアップロードしています。
tagにはROSのディストリビューションを指定してください。

Humbleディストリビューションのイメージをダウンロードする場合は次のコマンドを実行します
Jazzyディストリビューションのイメージをダウンロードする場合は次のコマンドを実行します

```sh
$ docker pull ghcr.io/rt-net/crane_plus:humble
$ docker pull ghcr.io/rt-net/crane_plus:jazzy
```

### ノードの起動
Expand Down Expand Up @@ -67,9 +67,9 @@ $ rocker --x11 --net=host --privileged \
`./build_source.sh $ROS_DISTRO`を実行してイメージを作成します。

```sh
# humbleディストリビューションのイメージを作成する
# jazzyディストリビューションのイメージを作成する
$ cd crane_plus/.docker
$ ./build_source.sh humble
$ ./build_source.sh jazzy
...
Successfully tagged crane_plus:humble
Successfully tagged crane_plus:jazzy
```
2 changes: 1 addition & 1 deletion .docker/build_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

if [ $# -eq 0 ]; then
echo "Please set ROS_DISTRO to the argument."
echo "e.g. ./build_source.sh humble"
echo "e.g. ./build_source.sh jazzy"
fi
ROS_DISTRO=$1

Expand Down
8 changes: 1 addition & 7 deletions .docker/source/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ROS_DISTRO="humble"
ARG ROS_DISTRO="jazzy"
FROM osrf/ros:${ROS_DISTRO}-desktop
ENV OVERLAY_WS /root/overlay_ws
WORKDIR $OVERLAY_WS/src
Expand Down Expand Up @@ -31,12 +31,6 @@ RUN mkdir -p /root/.gazebo/models && \
git pull origin master && \
rm -rf .git

# Download ignition model
RUN ign fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/sun && \
ign fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/ground%20plane && \
ign fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/wood%20cube%205cm && \
ign fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/table

# Edit entrypoint to source overlay setup file
WORKDIR $OVERLAY_WS
RUN sed --in-place --expression \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

env:
ROS_DISTRO: humble
ROS_DISTRO: jazzy
REGISTRY: ghcr.io

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/industrial_ci.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
env:
- { ROS_DISTRO: humble, ROS_REPO: ros }
- { ROS_DISTRO: jazzy, ROS_REPO: ros }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ docs/_build/
# PyBuilder
target/
.pytest_cache

Kuwamai marked this conversation as resolved.
Show resolved Hide resolved
.vscode
.vscode
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ ROS 2 package suite of CRANE+ V2.
## Supported ROS 2 distributions

- [Foxy](https://github.com/rt-net/crane_plus/tree/foxy-devel)
- Humble

- [Humble](https://github.com/rt-net/crane_plus/tree/humble-devel)
- Jazzy
## Requirements

- CRANE+ V2
- [Product Introduction](https://rt-net.jp/products/cranev2/)
- [Web Shop](https://www.rt-shop.jp/index.php?main_page=product_info&cPath=1348_1&products_id=3626&language=ja)
- Linux OS
- Ubuntu 22.04
- Ubuntu 24.04
- ROS
- [Humble Hawksbill](https://docs.ros.org/en/humble/Installation.html)
- [Jazzy Jalisco](https://docs.ros.org/en/jazzy/Installation.html)

## Installation

Expand All @@ -43,14 +43,15 @@ ROS 2 package suite of CRANE+ V2.
### Binary installation

```sh
TBD
$ sudo apt update
$ sudo apt install ros-jazzy-crane-plus
```

### Source Build

```sh
# Setup ROS environment
$ source /opt/ros/humble/setup.bash
$ source /opt/ros/jazzy/setup.bash

# Download crane_plus repository
$ mkdir -p ~/ros2_ws/src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def __init__(self):
'crane_plus.urdf.xacro')
self.port_name = '/dev/ttyUSB0'
self.use_gazebo = 'false'
self.use_ignition = 'false'
self.use_camera = 'false'
self.gz_control_config_package = ''
self.gz_control_config_file_path = ''
Expand All @@ -38,7 +37,6 @@ def load(self):
self.robot_description_path,
' port_name:=', self.port_name,
' use_gazebo:=', self.use_gazebo,
' use_ignition:=', self.use_ignition,
' use_camera:=', self.use_camera,
' gz_control_config_package:=', self.gz_control_config_package,
' gz_control_config_file_path:=', self.gz_control_config_file_path
Expand Down
4 changes: 2 additions & 2 deletions crane_plus_description/package.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

<author email="[email protected]">Shota Aoki</author>
<author email="[email protected]">Atsushi Kuwagata</author>
<author email="[email protected]">Nozomi Mizoguchi</author>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>

<depend>gazebo_ros2_control</depend>
<depend>ign_ros2_control</depend>
<depend>gz_ros2_control</depend>
<depend>joint_state_publisher_gui</depend>
<depend>launch</depend>
<depend>robot_state_publisher</depend>
Expand Down
12 changes: 1 addition & 11 deletions crane_plus_description/test/test_robot_description_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,7 @@ def test_use_gazebo():
rdl.use_gazebo = 'true'
rdl.gz_control_config_package = 'crane_plus_description'
rdl.gz_control_config_file_path = 'test/dummy_controllers.yaml'
assert 'gazebo_ros2_control/GazeboSystem' in exec_load(rdl)


def test_use_ignition():
# use_gazeboとuse_ignitionが変更され、xacroにign_ros2_controlがセットされることを期待
rdl = RobotDescriptionLoader()
rdl.use_gazebo = 'true'
rdl.use_ignition = 'true'
rdl.gz_control_config_package = 'crane_plus_description'
rdl.gz_control_config_file_path = 'test/dummy_controllers.yaml'
assert 'ign_ros2_control/IgnitionSystem' in exec_load(rdl)
assert 'gz_ros2_control/GazeboSimSystem' in exec_load(rdl)


def test_use_camera():
Expand Down
22 changes: 6 additions & 16 deletions crane_plus_description/urdf/crane_plus.gazebo.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,14 @@
name_link_4
name_link_hand
use_camera
use_ignition
config_package
config_file_path
">

<gazebo>
<xacro:if value="${use_ignition}">
<plugin filename="libign_ros2_control-system.so" name="ign_ros2_control::IgnitionROS2ControlPlugin">
<parameters>$(find ${config_package})/${config_file_path}</parameters>
</plugin>
</xacro:if>

<xacro:unless value="${use_ignition}">
<plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
<robot_sim_type>gazebo_ros2_control/GazeboSystem</robot_sim_type>
<parameters>$(find ${config_package})/${config_file_path}</parameters>
</plugin>
</xacro:unless>
<plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>$(find ${config_package})/${config_file_path}</parameters>
</plugin>
</gazebo>

<gazebo reference="${name_link_base}">
Expand Down Expand Up @@ -85,9 +75,9 @@

<xacro:if value="$(arg use_camera)">
<gazebo>
<plugin filename="ignition-gazebo-sensors-system" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
<plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</gazebo>

<gazebo reference="camera_color_optical_frame">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,11 @@
joint_4_upper_limit
joint_hand_lower_limit
joint_hand_upper_limit
use_ignition
">

<ros2_control name="${name}" type="system">
<hardware>
<xacro:if value="${use_ignition}">
<plugin>ign_ros2_control/IgnitionSystem</plugin>
</xacro:if>

<xacro:unless value="${use_ignition}">
<plugin>gazebo_ros2_control/GazeboSystem</plugin>
</xacro:unless>
<plugin>gz_ros2_control/GazeboSimSystem</plugin>
</hardware>

<joint name="${name_joint_1}">
Expand Down
5 changes: 1 addition & 4 deletions crane_plus_description/urdf/crane_plus.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<xacro:include filename="$(find crane_plus_description)/urdf/crane_plus.gazebo_ros2_control.xacro"/>

<xacro:arg name="use_gazebo" default="false" />
<xacro:arg name="use_ignition" default="false" />
<xacro:arg name="use_camera" default="false" />
<xacro:arg name="port_name" default="/dev/ttyUSB0" />
<xacro:arg name="baudrate" default="1000000" />
Expand Down Expand Up @@ -131,7 +130,6 @@
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)" />

Expand All @@ -151,8 +149,7 @@
joint_4_lower_limit="${JOINT_4_LOWER_LIMIT}"
joint_4_upper_limit="${JOINT_4_UPPER_LIMIT}"
joint_hand_lower_limit="${JOINT_HAND_LOWER_LIMIT}"
joint_hand_upper_limit="${JOINT_HAND_UPPER_LIMIT}"
use_ignition="$(arg use_ignition)" />
joint_hand_upper_limit="${JOINT_HAND_UPPER_LIMIT}"/>
</xacro:if>

</robot>
50 changes: 28 additions & 22 deletions crane_plus_examples/launch/demo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,38 @@ def generate_launch_description():
description='Set video device.'
)

declare_rviz_config = DeclareLaunchArgument(
'rviz_config',
default_value=get_package_share_directory(
'crane_plus_moveit_config'
) + '/config/moveit.rviz',
description='Set the path to rviz configuration file.',
condition=UnlessCondition(LaunchConfiguration('use_camera')),
)

declare_rviz_config_camera = DeclareLaunchArgument(
'rviz_config',
default_value=get_package_share_directory(
'crane_plus_examples'
) + '/launch/camera_example.rviz',
description='Set the path to rviz configuration file.',
condition=IfCondition(LaunchConfiguration('use_camera')),
)

description_loader = RobotDescriptionLoader()
description_loader.port_name = LaunchConfiguration('port_name')
description_loader.use_camera = LaunchConfiguration('use_camera')
description = description_loader.load()

move_group = IncludeLaunchDescription(
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()
)
PythonLaunchDescriptionSource([
get_package_share_directory('crane_plus_moveit_config'),
'/launch/run_move_group.launch.py']),
launch_arguments={
'loaded_description': description,
'rviz_config': LaunchConfiguration('rviz_config')
}.items()
)

control_node = IncludeLaunchDescription(
PythonLaunchDescriptionSource([
Expand All @@ -96,8 +101,9 @@ def generate_launch_description():
declare_port_name,
declare_use_camera,
declare_video_device,
declare_rviz_config,
declare_rviz_config_camera,
move_group,
move_group_camera,
control_node,
usb_cam_node
])
2 changes: 1 addition & 1 deletion crane_plus_examples/src/aruco_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "sensor_msgs/msg/image.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/aruco.hpp"
#include "cv_bridge/cv_bridge.h"
#include "cv_bridge/cv_bridge.hpp"
#include "tf2/LinearMath/Quaternion.h"
#include "tf2/LinearMath/Matrix3x3.h"
#include "tf2_ros/transform_broadcaster.h"
Expand Down
4 changes: 2 additions & 2 deletions crane_plus_examples/src/color_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "tf2_ros/transform_broadcaster.h"
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "cv_bridge/cv_bridge.h"
#include "image_geometry/pinhole_camera_model.h"
#include "cv_bridge/cv_bridge.hpp"
#include "image_geometry/pinhole_camera_model.hpp"
using std::placeholders::_1;

class ImageSubscriber : public rclcpp::Node
Expand Down
Loading
Loading