Skip to content

Commit

Permalink
Jazzy対応 (#198)
Browse files Browse the repository at this point in the history
* crane_plushのjazzy対応を参考に設定ファイルをjazzy対応

* .h->.hppに対応

* idustrial_ci.yamlをjazzyに対応

* crane_x7_moveit_configのPackage.xmlにauthor追加

* ファイル名変更controlles.yaml->moveit_controlles.yaml

* Setup Assistantで生成した設定ファイルを追加

* crane_x7_descriptionのjazzyブランチに対応させる

* Update README.md

* Update README.en.md

* MoveItConfigsBuilderによるMoveit設定に対応

* import yamlを復活

* gz_sim対応

* ブランチ名修正

* Update README

* Update README

* use_d435によるrvizコンフィグファイルパスの切り替え

* 変数名、パラメータ変更

* RVizコンフィグファイル変更

* 不要な記述を削除

* setup_assistant設定追加

* パッケージ情報更新

* スタイル修正

* Update README

* Gazeboカメラ位置調整

* move_group_capabilitiesの変更に対応

* 依存パッケージ修正

* CIのバージョン更新

Co-authored-by: YusukeKato <[email protected]>

* ヘッダーファイル名修正

* computeCartesianPathの変更に対応

---------

Co-authored-by: mizonon <[email protected]>
Co-authored-by: YusukeKato <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent 5719d70 commit d82509b
Show file tree
Hide file tree
Showing 28 changed files with 298 additions and 278 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/industrial_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
strategy:
matrix:
env:
- { ROS_DISTRO: humble, ROS_REPO: ros }
- { ROS_DISTRO: jazzy, ROS_REPO: ros }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: "ros-industrial/industrial_ci@master"
env: ${{ matrix.env }}
19 changes: 9 additions & 10 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ROS 2 package suite of CRANE-X7.
- [crane\_x7\_ros](#crane_x7_ros)
- [Table of Contents](#table-of-contents)
- [Supported ROS 2 distributions](#supported-ros-2-distributions)
- [ROS](#ros)
- [ROS 1](#ros-1)
- [Requirements](#requirements)
- [Installation](#installation)
- [Build from source](#build-from-source)
Expand All @@ -24,35 +24,34 @@ ROS 2 package suite of CRANE-X7.
## Supported ROS 2 distributions

- [Foxy](https://github.com/rt-net/crane_x7_ros/tree/foxy-devel)
- Humble
- [Humble](https://github.com/rt-net/crane_x7_ros/tree/humble)
- [Jazzy](https://github.com/rt-net/crane_x7_ros/tree/jazzy)

### ROS
### ROS 1

- [Melodic](https://github.com/rt-net/crane_x7_ros/tree/master)
- [Noetic](https://github.com/rt-net/crane_x7_ros/tree/master)

## Requirements

- CRANE-X7
- [Product Introduction](https://rt-net.jp/products/crane-x7/)
- [Web Shop](https://www.rt-shop.jp/index.php?main_page=product_info&products_id=3660&language=en)
- Linux OS
- Ubuntu 22.04
- Ubuntu 24.04
- ROS
- [Humble Hawksbill](https://docs.ros.org/en/humble/Installation.html)
- [Jazzy](https://docs.ros.org/en/jazzy/Installation.html)

## Installation

### Build from source

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

# Download crane_x7 repositories
$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src
$ git clone -b ros2 https://github.com/rt-net/crane_x7_ros.git
$ git clone -b ros2 https://github.com/rt-net/crane_x7_description.git
$ git clone -b $ROS_DISTRO https://github.com/rt-net/crane_x7_ros.git
$ git clone -b $ROS_DISTRO https://github.com/rt-net/crane_x7_description.git

# Install dependencies
$ rosdep install -r -y -i --from-paths .
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ROS 2 package suite of CRANE-X7.
- [crane\_x7\_ros](#crane_x7_ros)
- [Table of Contents](#table-of-contents)
- [Supported ROS 2 distributions](#supported-ros-2-distributions)
- [ROS](#ros)
- [ROS 1](#ros-1)
- [Requirements](#requirements)
- [Installation](#installation)
- [Build from source](#build-from-source)
Expand All @@ -25,9 +25,10 @@ ROS 2 package suite of CRANE-X7.
## Supported ROS 2 distributions

- [Foxy](https://github.com/rt-net/crane_x7_ros/tree/foxy-devel)
- Humble
- [Humble](https://github.com/rt-net/crane_x7_ros/tree/humble)
- [Jazzy](https://github.com/rt-net/crane_x7_ros/tree/jazzy)

### ROS
### ROS 1

- [Melodic](https://github.com/rt-net/crane_x7_ros/tree/master)
- [Noetic](https://github.com/rt-net/crane_x7_ros/tree/master)
Expand All @@ -38,23 +39,20 @@ ROS 2 package suite of CRANE-X7.
- [製品ページ](https://rt-net.jp/products/crane-x7/)
- [ウェブショップ](https://www.rt-shop.jp/index.php?main_page=product_info&products_id=3660)
- Linux OS
- Ubuntu 22.04
- Ubuntu 24.04
- ROS
- [Humble Hawksbill](https://docs.ros.org/en/humble/Installation.html)
- [Jazzy](https://docs.ros.org/en/jazzy/Installation.html)

## Installation

### Build from source

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

# Download crane_x7 repositories
$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src
$ git clone -b ros2 https://github.com/rt-net/crane_x7_ros.git
$ git clone -b ros2 https://github.com/rt-net/crane_x7_description.git
$ git clone -b $ROS_DISTRO https://github.com/rt-net/crane_x7_ros.git
$ git clone -b $ROS_DISTRO https://github.com/rt-net/crane_x7_description.git

# Install dependencies
$ rosdep install -r -y -i --from-paths .
Expand Down
4 changes: 2 additions & 2 deletions crane_x7_examples/launch/camera_example.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import SetParameter
from launch_ros.actions import Node
from launch_ros.actions import SetParameter
import yaml


Expand Down Expand Up @@ -67,7 +67,7 @@ def generate_launch_description():
description=('Set true when using the gazebo simulator.')
)

picking_node = Node(name="pick_and_place_tf",
picking_node = Node(name='pick_and_place_tf',
package='crane_x7_examples',
executable='pick_and_place_tf',
output='screen',
Expand Down
36 changes: 21 additions & 15 deletions crane_x7_examples/launch/demo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,24 @@ def generate_launch_description():
'manipulator_links.csv'
)

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

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

description_loader = RobotDescriptionLoader()
description_loader.port_name = LaunchConfiguration('port_name')
description_loader.baudrate = LaunchConfiguration('baudrate')
Expand All @@ -70,22 +88,9 @@ def generate_launch_description():
PythonLaunchDescriptionSource([
get_package_share_directory('crane_x7_moveit_config'),
'/launch/run_move_group.launch.py']),
condition=UnlessCondition(LaunchConfiguration('use_d435')),
launch_arguments={
'loaded_description': description
}.items()
)

rviz_config_file = get_package_share_directory(
'crane_x7_examples') + '/launch/camera_example.rviz'
move_group_camera = IncludeLaunchDescription(
PythonLaunchDescriptionSource([
get_package_share_directory('crane_x7_moveit_config'),
'/launch/run_move_group.launch.py']),
condition=IfCondition(LaunchConfiguration('use_d435')),
launch_arguments={
'loaded_description': description,
'rviz_config_file': rviz_config_file
'rviz_config': LaunchConfiguration('rviz_config')
}.items()
)

Expand Down Expand Up @@ -113,8 +118,9 @@ def generate_launch_description():
declare_port_name,
declare_baudrate,
declare_use_d435,
declare_rviz_config,
declare_rviz_config_camera,
move_group,
move_group_camera,
control_node,
realsense_node
])
2 changes: 1 addition & 1 deletion crane_x7_examples/launch/example.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
from crane_x7_description.robot_description_loader import RobotDescriptionLoader
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch_ros.actions import SetParameter
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from launch_ros.actions import SetParameter
import yaml


Expand Down
2 changes: 1 addition & 1 deletion crane_x7_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
7 changes: 2 additions & 5 deletions crane_x7_examples/src/cartesian_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "angles/angles.h"
#include "geometry_msgs/msg/pose.hpp"
#include "geometry_msgs/msg/quaternion.hpp"
#include "moveit/move_group_interface/move_group_interface.h"
#include "moveit/move_group_interface/move_group_interface.hpp"
#include "rclcpp/rclcpp.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"

Expand Down Expand Up @@ -90,11 +90,8 @@ int main(int argc, char ** argv)
}

moveit_msgs::msg::RobotTrajectory trajectory;
const double jump_threshold = 0.0;
const double eef_step = 0.01;
move_group_arm.computeCartesianPath(
waypoints, eef_step, jump_threshold,
trajectory);
move_group_arm.computeCartesianPath(waypoints, eef_step, trajectory);
move_group_arm.execute(trajectory);

// SRDFに定義されている"home"の姿勢にする
Expand Down
4 changes: 2 additions & 2 deletions crane_x7_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
2 changes: 1 addition & 1 deletion crane_x7_examples/src/gripper_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cmath>

#include "angles/angles.h"
#include "moveit/move_group_interface/move_group_interface.h"
#include "moveit/move_group_interface/move_group_interface.hpp"
#include "rclcpp/rclcpp.hpp"

using MoveGroupInterface = moveit::planning_interface::MoveGroupInterface;
Expand Down
2 changes: 1 addition & 1 deletion crane_x7_examples/src/joint_values.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// /src/move_group_interface_tutorial.cpp

#include "angles/angles.h"
#include "moveit/move_group_interface/move_group_interface.h"
#include "moveit/move_group_interface/move_group_interface.hpp"
#include "rclcpp/rclcpp.hpp"

using MoveGroupInterface = moveit::planning_interface::MoveGroupInterface;
Expand Down
2 changes: 1 addition & 1 deletion crane_x7_examples/src/pick_and_place.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "angles/angles.h"
#include "geometry_msgs/msg/pose.hpp"
#include "geometry_msgs/msg/quaternion.hpp"
#include "moveit/move_group_interface/move_group_interface.h"
#include "moveit/move_group_interface/move_group_interface.hpp"
#include "rclcpp/rclcpp.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"

Expand Down
2 changes: 1 addition & 1 deletion crane_x7_examples/src/pick_and_place_tf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "geometry_msgs/msg/quaternion.hpp"
#include "geometry_msgs/msg/transform_stamped.hpp"
#include "geometry_msgs/msg/twist.hpp"
#include "moveit/move_group_interface/move_group_interface.h"
#include "moveit/move_group_interface/move_group_interface.hpp"
#include "rclcpp/rclcpp.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
#include "tf2/convert.h"
Expand Down
2 changes: 1 addition & 1 deletion crane_x7_examples/src/pose_groupstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// /5c15da709e9ea8529b54b313dc570f164f9a713e/doc/examples/subframes
// /src/subframes_tutorial.cpp

#include "moveit/move_group_interface/move_group_interface.h"
#include "moveit/move_group_interface/move_group_interface.hpp"
#include "rclcpp/rclcpp.hpp"

using MoveGroupInterface = moveit::planning_interface::MoveGroupInterface;
Expand Down
Loading

0 comments on commit d82509b

Please sign in to comment.