Skip to content

Commit 833a5e2

Browse files
YusukeKatoTiryohShota Aoki
authored
1.1.0リリースのためにros2ブランチの変更差分をhumble-develブランチへマージ (#49)
Co-authored-by: Daisuke Sato <daisuke.sato@rt-net.jp> Co-authored-by: Shota Aoki <s.aoki@rt-net.jp>
1 parent bdd3e2a commit 833a5e2

17 files changed

+399
-67
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: industrial_ci
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '**.md'
8+
pull_request:
9+
paths-ignore:
10+
- 'docs/**'
11+
- '**.md'
12+
schedule:
13+
- cron: "0 2 * * 0" # Weekly on Sundays at 02:00
14+
15+
jobs:
16+
industrial_ci:
17+
strategy:
18+
matrix:
19+
env:
20+
- { ROS_DISTRO: humble, ROS_REPO: ros }
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: "ros-industrial/industrial_ci@master"
25+
env: ${{ matrix.env }}

CHANGELOG.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
Changelog for package raspimouse_description
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.1.0 (2023-11-07)
6+
------------------
7+
* READMEにRGBカメラを表示するコマンドを追記 (`#47 <https://github.com/rt-net/raspimouse_description/issues/47>`_)
8+
* Gazebo上で画像トピックを配信できるように変更 (`#46 <https://github.com/rt-net/raspimouse_description/issues/46>`_)
9+
* RGBカメラのモデルを表示できるように変更 (`#45 <https://github.com/rt-net/raspimouse_description/issues/45>`_)
10+
Co-authored-by: Shota Aoki <s.aoki@rt-net.jp>
11+
* cmd_velとodomのトピック名をremapping (`#44 <https://github.com/rt-net/raspimouse_description/issues/44>`_)
12+
* controller managerが起動するように変更 (`#43 <https://github.com/rt-net/raspimouse_description/issues/43>`_)
13+
Co-authored-by: Shota Aoki <s.aoki@rt-net.jp>
14+
* robot_description_loaderを実装 (`#42 <https://github.com/rt-net/raspimouse_description/issues/42>`_)
15+
Co-authored-by: Daisuke Sato <daisuke.sato@rt-net.jp>
16+
* Contributors: YusukeKato
17+
518
1.0.1 (2023-01-31)
619
------------------
720
* Updates README

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,17 @@ install(DIRECTORY
2424
DESTINATION share/${PROJECT_NAME}/
2525
)
2626

27+
ament_python_install_package(${PROJECT_NAME})
28+
install(PROGRAMS
29+
${PROJECT_NAME}/robot_description_loader.py
30+
DESTINATION lib/${PROJECT_NAME})
31+
2732
if(BUILD_TESTING)
2833
find_package(ament_lint_auto REQUIRED)
2934
ament_lint_auto_find_test_dependencies()
35+
36+
find_package(ament_cmake_pytest REQUIRED)
37+
ament_add_pytest_test(test_robot_description_loader test/test_robot_description_loader.py)
3038
endif()
3139

3240
ament_package()

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contribution Guide
2+
3+
本リポジトリへのコントリビュート方法について記載しています。
4+
5+
## Issues
6+
7+
リポジトリの品質向上にご協力頂きありがとうございます。
8+
9+
Issueの作成を簡単にするテンプレートを用意しているので活用してください。
10+
11+
## Pull Requests
12+
13+
Pull Requestの作成ありがとうございます。
14+
提出したPull Request(PR)には次のルールが適用されます。
15+
16+
- PRの内容には本リポジトリのライセンス([LICENSE](./LICENSE)[README.md](./README.md)に記載されています)が適用されます
17+
- PRは`rt-net`のメンバーによるレビューを経てからマージされます
18+
- すべてのPRがマージされるわけではなく、希望に添えない場合もありますのでご容赦ください
19+
- リポジトリにテストが設定されている場合はできるだけテストを通してください
20+
- 何かしらの理由(テストに間違いがある場合など)でテストを通さずPRを出す場合はその旨をPRに記載してください
21+
- マージする際にはPR内の全コミットが1つのコミットに`squash`されます
22+
- [コミットをスカッシュしてマージする | GitHub Docs](https://docs.github.com/ja/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits)
23+
- 1つのPRでリクエストする変更はできるだけシンプルにしてください
24+
- 異なる内容の変更を含む場合はPRを分割してください
25+
- 例えば、複数の機能追加したり、機能追加とリファクタリングを同時にする場合はそれぞれ別々のPRとしてください
26+
- squashマージしても履歴を辿りやすくするためです
27+
28+
## LICENSE
29+
30+
Any contribution that you make to this repository will
31+
be under the MIT license, as dictated by that
32+
[license](https://opensource.org/licenses/MIT).

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ ros2 launch raspimouse_description display.launch.py lidar:=rplidar
4646

4747
The `lidar` option supports `urg`, `lds`, and `rplidar`.
4848

49+
Similarly, display a RGB Camera mounted robot model with the following command:
50+
51+
```sh
52+
ros2 launch raspimouse_description display.launch.py use_rgb_camera:=true
53+
```
54+
4955
## LICENSE
5056

5157
(C) 2016-2022 RT Corporation

launch/display.launch.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import os
1615

1716
from ament_index_python.packages import get_package_share_directory
17+
from raspimouse_description.robot_description_loader import RobotDescriptionLoader
1818
from launch import LaunchDescription
1919
from launch.actions import DeclareLaunchArgument
2020
from launch.conditions import IfCondition
2121
from launch_ros.actions import Node
2222
from launch_ros.actions import PushRosNamespace
23-
from launch.substitutions import Command
2423
from launch.substitutions import LaunchConfiguration
2524

2625

@@ -41,23 +40,22 @@ def generate_launch_description():
4140
'use_rviz',
4241
default_value='true',
4342
description='Set "true" to launch rviz.')
43+
declare_arg_use_rgb_camera = DeclareLaunchArgument(
44+
'use_rgb_camera',
45+
default_value='false',
46+
description='Set "true" to mount rgb camera.')
4447

45-
xacro_file = os.path.join(
46-
get_package_share_directory('raspimouse_description'),
47-
'urdf',
48-
'raspimouse.urdf.xacro')
49-
params = {'robot_description': Command(['xacro ', xacro_file,
50-
' lidar:=', LaunchConfiguration('lidar'),
51-
' lidar_frame:=', LaunchConfiguration('lidar_frame'),
52-
]),
53-
'frame_prefix': [LaunchConfiguration('namespace'), '/']}
48+
description_loader = RobotDescriptionLoader()
49+
description_loader.lidar = LaunchConfiguration('lidar')
50+
description_loader.lidar_frame = LaunchConfiguration('lidar_frame')
51+
description_loader.use_rgb_camera = LaunchConfiguration('use_rgb_camera')
5452

5553
push_ns = PushRosNamespace([LaunchConfiguration('namespace')])
5654

5755
rsp = Node(package='robot_state_publisher',
5856
executable='robot_state_publisher',
5957
output='both',
60-
parameters=[params])
58+
parameters=[{'robot_description': description_loader.load()}])
6159

6260
jsp = Node(
6361
package='joint_state_publisher_gui',
@@ -79,8 +77,9 @@ def generate_launch_description():
7977
declare_arg_lidar_frame,
8078
declare_arg_namespace,
8179
declare_arg_use_rviz,
80+
declare_arg_use_rgb_camera,
8281
push_ns,
8382
rsp,
8483
jsp,
8584
rviz_node,
86-
])
85+
])

package.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>raspimouse_description</name>
5-
<version>1.0.1</version>
5+
<version>1.1.0</version>
66
<description>The raspimouse_description package</description>
77
<maintainer email="shop@rt-net.jp">RT Corporation</maintainer>
8-
<author email="daisuke.sato@rt-net.jp">Daisuke Sato</author>
9-
<author email="s.aoki@rt-net.jp">Daisuke Sato</author>
108

119
<license>MIT</license>
10+
11+
<author email="daisuke.sato@rt-net.jp">Daisuke Sato</author>
12+
<author email="s.aoki@rt-net.jp">Shota Aoki</author>
13+
<author email="yusuke.kato@rt-net.jp">Yusuke Kato</author>
1214

1315
<buildtool_depend>ament_cmake</buildtool_depend>
1416

@@ -18,6 +20,9 @@
1820
<depend>rviz2</depend>
1921
<depend>urdf</depend>
2022
<depend>xacro</depend>
23+
<depend>launch</depend>
24+
<depend>ign_ros2_control</depend>
25+
<depend>realsense2_description</depend>
2126

2227
<test_depend>ament_lint_auto</test_depend>
2328
<test_depend>ament_lint_common</test_depend>

raspimouse_description/__init__.py

Whitespace-only changes.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# The MIT License (MIT)
2+
#
3+
# Copyright 2023 RT Corporation <support@rt-net.jp>
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
# this software and associated documentation files (the "Software"), to deal in
7+
# the Software without restriction, including without limitation the rights to
8+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
# the Software, and to permit persons to whom the Software is furnished to do so,
10+
# subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+
import os
23+
24+
from ament_index_python.packages import get_package_share_directory
25+
from launch.substitutions import Command
26+
27+
28+
class RobotDescriptionLoader():
29+
30+
def __init__(self):
31+
self.robot_description_path = os.path.join(
32+
get_package_share_directory('raspimouse_description'),
33+
'urdf',
34+
'raspimouse.urdf.xacro')
35+
self.lidar = 'none'
36+
self.lidar_frame = 'laser'
37+
self.use_gazebo = 'false'
38+
self.use_rgb_camera = 'false'
39+
self.gz_control_config_package = ''
40+
self.gz_control_config_file_path = ''
41+
42+
def load(self):
43+
return Command([
44+
'xacro ',
45+
self.robot_description_path,
46+
' lidar:=', self.lidar,
47+
' lidar_frame:=', self.lidar_frame,
48+
' use_gazebo:=', self.use_gazebo,
49+
' use_rgb_camera:=', self.use_rgb_camera,
50+
' gz_control_config_package:=', self.gz_control_config_package,
51+
' gz_control_config_file_path:=', self.gz_control_config_file_path
52+
])

test/dummy_controllers.yaml

Whitespace-only changes.

0 commit comments

Comments
 (0)