Skip to content

Commit 77ff34c

Browse files
authored
ROS 2 Jazzy への対応 (#55)
1 parent 6db4f04 commit 77ff34c

11 files changed

+36
-30
lines changed

.github/workflows/industrial_ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ jobs:
1616
industrial_ci:
1717
strategy:
1818
matrix:
19-
env:
20-
- { ROS_DISTRO: humble, ROS_REPO: ros }
19+
ROS_DISTRO: [jazzy]
20+
ROS_REPO: [ros]
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: "ros-industrial/industrial_ci@master"
25-
env: ${{ matrix.env }}
25+
env:
26+
ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
27+
ROS_REPO: ${{ matrix.ROS_REPO }}

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# raspimouse_description
22

3+
[![industrial_ci](https://github.com/rt-net/raspimouse_description/actions/workflows/industrial_ci.yml/badge.svg?branch=ros2)](https://github.com/rt-net/raspimouse_description/actions/workflows/industrial_ci.yml)
4+
35
ROS package with URDF description macro for [Raspberry Pi Mouse](https://rt-net.jp/products/raspberrypimousev3/)
46

57
![display_launch](https://rt-net.github.io/images/raspberry-pi-mouse/display_launch.png)
68

7-
This ROS package was separated from [rt-net/raspimouse_sim](https://github.com/rt-net/raspimouse_sim).
9+
This ROS package was separated from [rt-net/raspimouse_sim](https://github.com/rt-net/raspimouse_sim).
810
See details from [rt-net/raspimouse_sim#42](https://github.com/rt-net/raspimouse_sim/pull/42).
911

10-
The main development branch for ROS 1 is [`master`](https://github.com/rt-net/raspimouse_description/tree/master).
12+
The main development branch for ROS 1 is [`master`](https://github.com/rt-net/raspimouse_description/tree/master).
1113
The main development branch for ROS 2 is [`ros2`](https://github.com/rt-net/raspimouse_description/tree/ros2).
1214

1315
## Supported ROS distributions
1416

15-
- Melodic ([`melodic-devel`](https://github.com/rt-net/raspimouse_description/tree/melodic-devel))
16-
- Foxy ([`foxy-devel`](https://github.com/rt-net/raspimouse_description/tree/foxy-devel))
17-
- Humble ([`humble-devel`](https://github.com/rt-net/raspimouse_description/tree/humble-devel))
17+
- Humble ([`humble`](https://github.com/rt-net/raspimouse_description/tree/humble))
18+
- Jazzy ([`jazzy`](https://github.com/rt-net/raspimouse_description/tree/jazzy))
1819

1920
## Installation
2021

2122
```sh
2223
# Clone raspimouse_description and install dependencies
2324
cd ~/ros2_ws/src
24-
git clone -b $ROS_DISTRO-devel https://github.com/rt-net/raspimouse_description
25+
git clone -b $ROS_DISTRO https://github.com/rt-net/raspimouse_description
2526
rosdep install -r -y -i --from-paths .
2627

2728
# Build the package
@@ -66,7 +67,7 @@ ros2 launch raspimouse_description display.launch.py use_rgb_camera:=true camera
6667

6768
(C) 2016-2022 RT Corporation
6869

69-
This repository is licensed under the MIT license, see [LICENSE](./LICENSE).
70+
This repository is licensed under the MIT license, see [LICENSE](./LICENSE).
7071
Unless attributed otherwise, everything in this repository is under the MIT license.
7172

7273
### Acknowledgements

launch/display.launch.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414

1515

1616
from ament_index_python.packages import get_package_share_directory
17-
from raspimouse_description.robot_description_loader import RobotDescriptionLoader
1817
from launch import LaunchDescription
1918
from launch.actions import DeclareLaunchArgument
2019
from launch.conditions import IfCondition
21-
from launch_ros.actions import Node
22-
from launch_ros.actions import PushRosNamespace
2320
from launch.substitutions import LaunchConfiguration
21+
from launch_ros.actions import Node, PushRosNamespace
22+
from raspimouse_description.robot_description_loader import RobotDescriptionLoader
2423

2524

2625
def generate_launch_description():

package.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
<maintainer email="shop@rt-net.jp">RT Corporation</maintainer>
88

99
<license>MIT</license>
10-
10+
1111
<author email="daisuke.sato@rt-net.jp">Daisuke Sato</author>
1212
<author email="s.aoki@rt-net.jp">Shota Aoki</author>
1313
<author email="yusuke.kato@rt-net.jp">Yusuke Kato</author>
14+
<author email="kurasawa@rt-net.jp">Kazushi Kurasawa</author>
1415

1516
<buildtool_depend>ament_cmake</buildtool_depend>
1617

@@ -21,7 +22,7 @@
2122
<depend>urdf</depend>
2223
<depend>xacro</depend>
2324
<depend>launch</depend>
24-
<depend>ign_ros2_control</depend>
25+
<depend>gz_ros2_control</depend>
2526
<depend>realsense2_description</depend>
2627

2728
<test_depend>ament_lint_auto</test_depend>

test/test_robot_description_loader.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@
1919
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2020
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
from raspimouse_description.robot_description_loader import RobotDescriptionLoader
22+
import math
23+
2324
from launch.launch_context import LaunchContext
2425
import pytest
25-
import math
26+
27+
from raspimouse_description.robot_description_loader import \
28+
RobotDescriptionLoader
2629

2730

2831
def exec_load(loader):
@@ -89,7 +92,7 @@ def test_use_gazebo():
8992
rdl.use_gazebo = 'true'
9093
rdl.gz_control_config_package = 'raspimouse_description'
9194
rdl.gz_control_config_file_path = 'test/dummy_controllers.yaml'
92-
assert 'ign_ros2_control/IgnitionSystem' in exec_load(rdl)
95+
assert 'gz_ros2_control/GazeboSimSystem' in exec_load(rdl)
9396

9497

9598
def test_use_rgb_camera():

urdf/raspimouse.urdf.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<xacro:arg name="camera_downward" default="false" />
1818
<xacro:arg name="gz_control_config_package" default="" />
1919
<xacro:arg name="gz_control_config_file_path" default="" />
20-
20+
2121
<material name="black">
2222
<color rgba="0.2 0.2 0.2 1.0"/>
2323
</material>
@@ -109,7 +109,7 @@
109109
<xacro:if value="$(arg use_gazebo)">
110110
<xacro:gazebo_diffdrive_settings
111111
use_gazebo="$(arg use_gazebo)"
112-
config_file_package="$(arg gz_control_config_package)"
112+
config_file_package="$(arg gz_control_config_package)"
113113
config_file_path="$(arg gz_control_config_file_path)" />
114114

115115
<xacro:diffdrive_gazebo_ros2_control_settings

urdf/sensors/lidar.gazebo.xacro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<gazebo reference="${sensor_link_name}">
66
<sensor type="gpu_lidar" name="${sensor_link_name}_sensor">
77
<pose relative_to='${sensor_link_name}'>0 0 0 0 0 0</pose>
8-
<ignition_frame_id>${sensor_link_name}</ignition_frame_id>
8+
<gz_frame_id>${sensor_link_name}</gz_frame_id>
99
<frame_id>${sensor_link_name}</frame_id>
1010
<topic>scan</topic>
1111
<always_on>1</always_on>

urdf/sensors/lightsens.urdf.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<geometry>
1717
<box size="0.01 0.005 0.007" />
1818
</geometry>
19-
<material name="Gray">
20-
<color rgba="0.2 0.2 0.2 1" />
19+
<material name="Red">
20+
<color rgba="1.0 0.0 0.0 1" />
2121
</material>
2222
</visual>
2323
<inertial>

urdf/sensors/rgb_camera.xacro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232
<origin xyz="0.08 0.0 0.055" rpy="0 0 0"/>
3333
</xacro:sensor_d435>
3434
</xacro:unless>
35-
35+
3636
<xacro:if value="${use_gazebo}">
3737
<gazebo>
38-
<plugin filename="ignition-gazebo-sensors-system" name="ignition::gazebo::systems::Sensors">
38+
<plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
3939
<render_engine>ogre2</render_engine>
4040
</plugin>
4141
</gazebo>
42-
42+
4343
<gazebo reference="camera_link">
4444
<sensor name="camera_link" type="camera">
4545
<update_rate>30.0</update_rate>
4646
<always_on>true</always_on>
47-
<ignition_frame_id>camera_link</ignition_frame_id>
47+
<gz_frame_id>camera_link</gz_frame_id>
4848
<xacro:if value="${camera_downward}">
4949
<pose>0 0 0 0 ${DOWNWARD_CAMERA_ANGLE} 0</pose>
5050
</xacro:if>

urdf/wheel/diffdrive.gazebo.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
<gazebo>
1313
<xacro:if value="${use_gazebo}">
14-
<plugin filename="libign_ros2_control-system.so" name="ign_ros2_control::IgnitionROS2ControlPlugin">
14+
<plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
1515
<ros>
16-
<remapping>diff_drive_controller/cmd_vel_unstamped:=cmd_vel</remapping>
16+
<remapping>diff_drive_controller/cmd_vel:=cmd_vel</remapping>
1717
<remapping>diff_drive_controller/odom:=odom</remapping>
1818
</ros>
1919
<parameters>$(find ${config_file_package})/${config_file_path}</parameters>

urdf/wheel/diffdrive.gazebo_ros2_control.xacro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<ros2_control name="${name_hardware}" type="system">
1212
<hardware>
13-
<plugin>ign_ros2_control/IgnitionSystem</plugin>
13+
<plugin>gz_ros2_control/GazeboSimSystem</plugin>
1414
</hardware>
1515

1616
<joint name="${name_right_wheel_joint}">

0 commit comments

Comments
 (0)