Skip to content

Commit

Permalink
Support ROS Noetic (#119)
Browse files Browse the repository at this point in the history
* Fix xacro file to load on Noetic environments.

* Add collision model to armarker link

* 首pitch軸サーボの可動範囲に収まるように、サンプルを修正

* Remove deprecated param 'use_gui'

* KDLはbase_linkのInertiaをサポートしていないため、実機動作時にもダミーリンク(world)を追加

* xacroファイルの首ピッチ軸可動範囲を実機に合わせて修正

* kinematicsプラグインのオプションからattemptsを削除。Melodicから廃止されているため。

* KinematicsプラグインをKDLに統一

* gripper_action_exampleをPython3に対応させる

* sciurus17.srdfのtable virtual jointはスキップされているためコメントアウトする

* effort_controlellersのdependを追加

* cameraサンプルをPython3に対応

* trac_ikを依存関係から削除

* examplesのREADMEからopencvのインストール手順を削除。
python-opencvはcv_bridgeの依存関係としてインストールされる

* CIのテスト環境にnoeticを追加
  • Loading branch information
Shota Aoki authored Oct 28, 2021
1 parent 16828f7 commit bca7d05
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 48 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/industrial_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ jobs:
env:
- { ROS_DISTRO: kinetic, ROS_REPO: main }
- { ROS_DISTRO: melodic, ROS_REPO: main }
- { ROS_DISTRO: noetic, ROS_REPO: main }
experimental: [false]
include:
- env: { ROS_DISTRO: kinetic, ROS_REPO: testing }
experimental: true
- env: { ROS_DISTRO: melodic, ROS_REPO: testing }
experimental: true
- env: { ROS_DISTRO: noetic, ROS_REPO: testing }
experimental: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions sciurus17_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<build_depend>sciurus17_msgs</build_depend>
<build_depend>joint_limits_interface</build_depend>
<run_depend>controller_manager</run_depend>
<run_depend>effort_controllers</run_depend>
<run_depend>hardware_interface</run_depend>
<run_depend>transmission_interface</run_depend>
<run_depend>dynamixel_sdk</run_depend>
Expand Down
24 changes: 3 additions & 21 deletions sciurus17_examples/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,7 @@ rosrun sciurus17_examples hand_position_publisher_example.py

This is an example to use the head camera images and OpenCV library for ball tracking and face tracking.

Firstly, install the OpenCV library of Python with the following command:

```sh
pip2 install opencv-python
```

Then, run a node with the following command:
Run a node with the following command:

```sh
rosrun sciurus17_examples head_camera_tracking.py
Expand Down Expand Up @@ -284,13 +278,7 @@ in RT ROBOT SHOP.

This is an example to use the chest camera images and OpenCV library for ball tracking.

Firstly, install the OpenCV library of Python with the following command:

```sh
pip2 install opencv-python
```

Then, run a node with the following command:
Run a node with the following command:

```sh
rosrun sciurus17_examples chest_camera_tracking.py
Expand Down Expand Up @@ -324,13 +312,7 @@ rosrun sciurus17_examples chest_camera_tracking.py

This is an example to use the depth camera on the head for object tracking.

Firstly, install the OpenCV library of Python with the following command:

```sh
pip2 install opencv-python
```

Then, run a node with the following command:
Run a node with the following command:

```sh
rosrun sciurus17_examples depth_camera_tracking.py
Expand Down
15 changes: 0 additions & 15 deletions sciurus17_examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@ rosrun sciurus17_examples hand_position_publisher_example.py
頭のカメラを使うコード例です。
OpenCVを使ってボール追跡と顔追跡をします。

次のコマンドでOpenCVのPythonライブラリをインストールしてください。
```sh
pip2 install opencv-python
```

次のコマンドでノードを起動します。
```sh
rosrun sciurus17_examples head_camera_tracking.py
Expand Down Expand Up @@ -273,11 +268,6 @@ def _image_callback(self, ros_image):
胸のカメラを使うコード例です。
OpenCVを使ってボール追跡をします。

次のコマンドでOpenCVのPythonライブラリをインストールしてください。
```sh
pip2 install opencv-python
```

次のコマンドでノードを起動します。
```sh
rosrun sciurus17_examples chest_camera_tracking.py
Expand Down Expand Up @@ -311,11 +301,6 @@ rosrun sciurus17_examples chest_camera_tracking.py
頭の深度カメラを使うコード例です。
指定深度内の物体を追跡します。

次のコマンドでOpenCVのPythonライブラリをインストールしてください。
```sh
pip2 install opencv-python
```

次のコマンドでノードを起動します。
```sh
rosrun sciurus17_examples depth_camera_tracking.py
Expand Down
2 changes: 1 addition & 1 deletion sciurus17_examples/scripts/chest_camera_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self):
def _image_callback(self, ros_image):
try:
input_image = self._bridge.imgmsg_to_cv2(ros_image, "bgr8")
except CvBridgeError, e:
except CvBridgeError as e:
rospy.logerr(e)

# 画像のwidth, heightを取得
Expand Down
4 changes: 2 additions & 2 deletions sciurus17_examples/scripts/depth_camera_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self):
def _image_callback(self, ros_image):
try:
input_image = self._bridge.imgmsg_to_cv2(ros_image, "bgr8")
except CvBridgeError, e:
except CvBridgeError as e:
rospy.logerr(e)
return

Expand All @@ -58,7 +58,7 @@ def _image_callback(self, ros_image):
def _depth_callback(self, ros_image):
try:
input_image = self._bridge.imgmsg_to_cv2(ros_image, "passthrough")
except CvBridgeError, e:
except CvBridgeError as e:
rospy.logerr(e)
return

Expand Down
15 changes: 7 additions & 8 deletions sciurus17_examples/scripts/gripper_action_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import rospy
import time
import actionlib
from std_msgs.msg import Float64
from control_msgs.msg import (
GripperCommandAction,
GripperCommandGoal
Expand Down Expand Up @@ -85,30 +84,30 @@ def main():
gc = GripperClient()

# Open grippers
print "Test - Open Grippers"
print("Test - Open Grippers")
gripper = 26.0
gc.command(math.radians(gripper),0.1,CONTROL_R)
gripper = -26.0
gc.command(math.radians(gripper),0.1,CONTROL_L)
result = gc.wait(1.0,CONTROL_R)
print result
print(result)
result = gc.wait(1.0,CONTROL_L)
print result
print(result)
time.sleep(1)

# Close grippers
print "Test - Close Grippers"
print("Test - Close Grippers")
gripper = 0.0
gc.command(math.radians(gripper),0.5,CONTROL_R)
gripper = 0.0
gc.command(math.radians(gripper),0.5,CONTROL_L)
result = gc.wait(CONTROL_R,1.0)
print result
print(result)
result = gc.wait(CONTROL_L,1.0)
print result
print(result)
time.sleep(1)

print "Exiting - Gripper Action Test Example Complete"
print("Exiting - Gripper Action Test Example Complete")

if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion sciurus17_examples/scripts/head_camera_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self):
def _image_callback(self, ros_image):
try:
input_image = self._bridge.imgmsg_to_cv2(ros_image, "bgr8")
except CvBridgeError, e:
except CvBridgeError as e:
rospy.logerr(e)

# 画像のwidth, heightを取得
Expand Down

0 comments on commit bca7d05

Please sign in to comment.