From 78b5a5159770f8304c972a3b0eed93cbd63fff77 Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Fri, 17 Nov 2023 11:11:15 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=82=B9=E7=94=A8=E3=81=AE=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=82=92=E4=BD=9C=E6=88=90=20(#74)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ライントレース用のコースを作成 * コースを地面より0.01浮かせる * 動作周期を修正 Co-authored-by: Shota Aoki * ラズパイマウスの初期位置を指定する引数を追加 * ラズパイマウスの初期位置をlaunchファイルから指定できるように変更 * モデル作成者の名前を変更 * blenderのモデルの作成者を変更 * コースモデルの大きさを修正 * コースモデルのスケールを修正 * コースモデルの作成者名を変更 * パネルの寸法が分かる名称に変更 * ワールド名を柔軟なものに変更 * 線の幅を4cmに変更 * READMEにモデル一覧を追加 --------- Co-authored-by: Shota Aoki --- README.en.md | 23 ++++ README.md | 25 ++++ .../raspimouse_with_emptyworld.launch.py | 18 +++ ...pimouse_with_line_follower_field.launch.py | 51 ++++++++ .../meshes/course_curve.jpg | Bin 0 -> 13806 bytes .../meshes/course_curve_50x50cm.dae | 115 ++++++++++++++++++ .../models/course_curve_50x50cm/model.config | 16 +++ .../models/course_curve_50x50cm/model.sdf | 34 ++++++ .../meshes/course_straight.jpg | Bin 0 -> 5959 bytes .../meshes/course_straight_50x50cm.dae | 115 ++++++++++++++++++ .../course_straight_50x50cm/model.config | 16 +++ .../models/course_straight_50x50cm/model.sdf | 34 ++++++ .../worlds/line_follower_field1.sdf | 76 ++++++++++++ 13 files changed, 523 insertions(+) create mode 100644 raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py create mode 100644 raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve.jpg create mode 100644 raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve_50x50cm.dae create mode 100644 raspimouse_gazebo/models/course_curve_50x50cm/model.config create mode 100644 raspimouse_gazebo/models/course_curve_50x50cm/model.sdf create mode 100644 raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight.jpg create mode 100644 raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight_50x50cm.dae create mode 100644 raspimouse_gazebo/models/course_straight_50x50cm/model.config create mode 100644 raspimouse_gazebo/models/course_straight_50x50cm/model.sdf create mode 100644 raspimouse_gazebo/worlds/line_follower_field1.sdf diff --git a/README.en.md b/README.en.md index 768d839..61bc52e 100644 --- a/README.en.md +++ b/README.en.md @@ -93,6 +93,29 @@ ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_ ![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_object_tracking.gif) +## Model data list + +### course_curve_50x50cm +Curve course panel for line following. +Panel size is 50 cm x 50 cm and line width is 4 cm. + +![](./raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve.jpg) + +### course_straight_50x50cm +Straight course panel for line following. +Panel size is 50 cm x 50 cm and line width is 4 cm. + +![](./raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight.jpg) + +### cube_*cm_color-name +Each cube is 5 cm, 7.5 cm, 10 cm, and 15 cm on a side. +The cube colors are red, yellow, blue, and green. + +![](https://rt-net.github.io/images/raspberry-pi-mouse/color_objects.png) + +### daeファイルについて +The dae file is edited in Blender 4.0. + ## License This repository is licensed under the MIT license, see [LICENSE]( ./LICENSE ). diff --git a/README.md b/README.md index a8a9bc7..740803d 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,31 @@ ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_ ![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_object_tracking.gif) +## モデルデータ一覧 + +### course_curve_50x50cm + +ライントレース用の曲線コースパネルです。 +パネルサイズは50cm x 50cm、線の幅は4cmです。 + +![](./raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve.jpg) + +### course_straight_50x50cm + +ライントレース用の直線コースパネルです。 +パネルサイズは50cm x 50cm、線の幅は4cmです。 + +![](./raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight.jpg) + +### cube_*cm_color-name +それぞれ一辺5cm、7.5cm、10cm、15cmの立方体です。 +色は赤、黄、青、緑です。 + +![](https://rt-net.github.io/images/raspberry-pi-mouse/color_objects.png) + +### daeファイルについて +daeファイルはBlender 4.0で編集しています。 + ## ライセンス このリポジトリはMITライセンスに基づいて公開されています。 diff --git a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py index 3fd7629..f0aa8eb 100644 --- a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py +++ b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py @@ -50,6 +50,18 @@ def generate_launch_description(): 'world_name', default_value=get_package_share_directory('raspimouse_gazebo')+'/worlds/empty_world.sdf', description='Set world name.') + declare_arg_spawn_x = DeclareLaunchArgument( + 'spawn_x', + default_value='0.0', + description='Set initial position x.') + declare_arg_spawn_y = DeclareLaunchArgument( + 'spawn_y', + default_value='0.0', + description='Set initial position y.') + declare_arg_spawn_z = DeclareLaunchArgument( + 'spawn_z', + default_value='0.02', + description='Set initial position z.') env = {'IGN_GAZEBO_SYSTEM_PLUGIN_PATH': os.environ['LD_LIBRARY_PATH'], 'IGN_GAZEBO_RESOURCE_PATH': os.path.dirname( @@ -71,6 +83,9 @@ def generate_launch_description(): output='screen', arguments=['-topic', '/robot_description', '-name', 'raspimouse', + '-x', LaunchConfiguration('spawn_x'), + '-y', LaunchConfiguration('spawn_y'), + '-z', LaunchConfiguration('spawn_z'), '-allow_renaming', 'true'], ) @@ -140,6 +155,9 @@ def generate_launch_description(): declare_arg_lidar_frame, declare_arg_use_rgb_camera, declare_arg_world_name, + declare_arg_spawn_x, + declare_arg_spawn_y, + declare_arg_spawn_z, ign_gazebo, ignition_spawn_entity, robot_state_publisher, diff --git a/raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py b/raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py new file mode 100644 index 0000000..dae194a --- /dev/null +++ b/raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py @@ -0,0 +1,51 @@ +# The MIT License (MIT) +# +# Copyright 2023 RT Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +# the Software, and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription +from launch_ros.actions import SetParameter +from launch.launch_description_sources import PythonLaunchDescriptionSource + + +def generate_launch_description(): + world_file = os.path.join( + get_package_share_directory('raspimouse_gazebo'), + 'worlds', + 'line_follower_field1.sdf') + world_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource([ + get_package_share_directory('raspimouse_gazebo'), + '/launch/raspimouse_with_emptyworld.launch.py']), + launch_arguments={ + 'world_name': world_file, + 'spawn_x': '0.0', + 'spawn_y': '0.0', + 'spawn_z': '0.02' + }.items() + ) + + return LaunchDescription([ + SetParameter(name='use_sim_time', value=True), + world_launch + ]) diff --git a/raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve.jpg b/raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve.jpg new file mode 100644 index 0000000000000000000000000000000000000000..69ded420d9384d75195061086f0919b7971941a2 GIT binary patch literal 13806 zcmeHt`B#(I*8iilTD4UX1S%gfL@YYh^T- zYY`Hr8fqd>Bor}*5JIfXL!cN!ln_wnDIh}#5E9$*7!-2K;=ks~a zu=m+#^X2AiVE?zS-?#$XwgJF4?F-nH0v7A!c=w*Ydv@*mME8@u`}XhG-M{uJC5-+Tt_`ABC{XL8#%U0|~j zFwt7xuCwi31OC%K+O=cn?hkc7*uG8sclds-Z=DaeZT~<=XV;Dobw1RB*{<`!hdXxa zestioU3!qO^v$lELj7>?=;vSmBP#cPmBAO#!07)mw7n42aLDd?%uU*_zi;*fAH6dV z1K3~wKPUhF{I3H4Rp7r0{8xehD)9fc0^70)sqP~ccgg-27l%|aUsV$vS>p`wWfQ$X zjT=Mlmz?dUrkaPuf&9YJU{e{rK$-0n*NhE#UTEhH)qIjxyzuo~(stfG!NTL{Fpd-A zlC=Lp6m%W48j08hl06U({;Pu3w6dlc#^}6Lbm+S4j@$ak0NHBRJ%KPgV6`v41Ca(F zsrTT*R0W4qOs6O(jT}b8p08{Ispje{gfp?-Z+Te6IbbJd3(jkl^bAS~?Xbt)jkblP zbbM>eke}>nRdv(}ICDMK05SdPQ)Wpmy)HR~8%KVWDu$S-yB{B0^k`=M^yC{}R@1;0 zE(fC`nWwk*R`$PG2xF*X5y>;vrVqR(OXuMAF00QHFg&vrXCWhOwg}H6;l_*U&HfnM zG#rl-6D>opi}0nQU$2dx{G#s0SbTeRYqF5XuJap8dg-9>?R|q;ceR5WgpywzOAp(x z4e-S0-^=BkJjmyT{Yqi(qnUNO3579?ayWHr>0}R1NIg1(Axa=f$a*KO@$+K z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EMNlM81b*A)R5#e&ffAr14qXsZ`zS(C3VV9VvsAZZGO~?CdOIo`6cNhLC z^HL01JyGkJo(L<8kRy(}KjmXZ1hrH$FLp|yN64y&ru2Ua0k-$ne`I8p$sD`r+SX7? zL4;CIn7H+ur4nZ|VI2l(KiXXSYx(}&8`H3`OBT=T?i}mdg)X<5cC*u6>!T+h{1Ft_oNX#U4mF2+ssIoOJ| z4o69HPWIWx+J#iM6pJChQHKWER9?jiXk1 zxf|93&$Jy2TiFjflFywDFF7Og?Y0{At^Q?_(qG&@t}P{31@i8~-ni$#26jqJng)0) z3y;utetfL`B;8qoQ0$+Eg@+t+L`O_H1|aC64LxteLsu7IVO|v?IBX2zbbbq`JMJ!_ zFSGB*=XG#7U^;!SyZ7yIu~Dhs%M_PP0H0^UUB>pQ}$+oiIhw>BEU24aNtAD*!CO1 z=eHZmBKl?i_$VADF3_?H4Cv*R$^!!f+87(N4fk(sVSd|3sb8K|oQ2(1K3U^V701Mc z*65mQkJjhh0ycpF!RxZ`fDf8i5tHKS5`09_bm*LIjUTNLnxXGbmiv) z+vB87U>bLsxe4S%z23s+_TN%ZUoOchYkX;}CDzLhlcn{99fqwPv;u(Y(jVrI_zl)o zK2&J$IlI4@Rc-=U>5}&Up1$3}UU@L!&EeQI4fqSNE%coch?j?L ZKxu`3#5Am#xN8$w@M--&rgS!6{V&j>XNdp+ literal 0 HcmV?d00001 diff --git a/raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve_50x50cm.dae b/raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve_50x50cm.dae new file mode 100644 index 0000000..2390079 --- /dev/null +++ b/raspimouse_gazebo/models/course_curve_50x50cm/meshes/course_curve_50x50cm.dae @@ -0,0 +1,115 @@ + + + + + YusukeKato + Blender 4.0.0 commit date:2023-11-13, commit time:17:26, hash:878f71061b8e + + 2023-11-16T14:58:23 + 2023-11-16T14:58:23 + + Z_UP + + + + + + + course_curve_jpg + + + + + course_curve_jpg-surface + + + + + + 0 0 0 1 + + + + + + 1.45 + + + + + + + + + course_curve.jpg + + + + + + + + + + + + -0.5 -0.5 0 0.5 -0.5 0 -0.5 0.5 0 0.5 0.5 0 + + + + + + + + + + 0 0 1 + + + + + + + + + + 1.00069e-4 0.9999001 0.9998998 9.998e-5 0.9998999 0.9998998 1.00069e-4 0.9999001 9.998e-5 1.00131e-4 0.9998998 9.998e-5 + + + + + + + + + + + + + + +

1 0 0 2 0 1 0 0 2 1 0 3 3 0 4 2 0 5

+
+
+
+
+ + + + 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 1 + + + + + + + + + + + + + + + +
diff --git a/raspimouse_gazebo/models/course_curve_50x50cm/model.config b/raspimouse_gazebo/models/course_curve_50x50cm/model.config new file mode 100644 index 0000000..58e33ed --- /dev/null +++ b/raspimouse_gazebo/models/course_curve_50x50cm/model.config @@ -0,0 +1,16 @@ + + + + course_curve_50x50cm + 1.0 + model.sdf + + + YusukeKato + yusuke.kato@rt-net.jp + + + + line follower course + + diff --git a/raspimouse_gazebo/models/course_curve_50x50cm/model.sdf b/raspimouse_gazebo/models/course_curve_50x50cm/model.sdf new file mode 100644 index 0000000..84ba3e6 --- /dev/null +++ b/raspimouse_gazebo/models/course_curve_50x50cm/model.sdf @@ -0,0 +1,34 @@ + + + + true + + + 0 0 0 0 0 0 + + + model://course_curve_50x50cm/meshes/course_curve_50x50cm.dae + 1 1 1 + + + + + + 0.9 + 0.9 + + + + + + 0 0 0 0 0 0 + + + model://course_curve_50x50cm/meshes/course_curve_50x50cm.dae + 1 1 1 + + + + + + diff --git a/raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight.jpg b/raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4bc01c5229cabeef9aea2e3b32778a43ffc64a76 GIT binary patch literal 5959 zcmex=>ukC3pCfH06P@c#eNE$E4ym`W^Iq^cNsNo pG|Wbm#%Ok;ZK<(Ufs!(BRPSgAjE2By2#kinXb23Y5a9oR69D2_Fy#OM literal 0 HcmV?d00001 diff --git a/raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight_50x50cm.dae b/raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight_50x50cm.dae new file mode 100644 index 0000000..a5c1745 --- /dev/null +++ b/raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight_50x50cm.dae @@ -0,0 +1,115 @@ + + + + + YusukeKato + Blender 4.0.0 commit date:2023-11-13, commit time:17:26, hash:878f71061b8e + + 2023-11-16T14:55:03 + 2023-11-16T14:55:03 + + Z_UP + + + + + + + course_straight_jpg + + + + + course_straight_jpg-surface + + + + + + 0 0 0 1 + + + + + + 1.45 + + + + + + + + + course_straight.jpg + + + + + + + + + + + + -0.5 -0.5 0 0.5 -0.5 0 -0.5 0.5 0 0.5 0.5 0 + + + + + + + + + + 0 0 1 + + + + + + + + + + 1.00069e-4 0.9999001 0.9998998 9.998e-5 0.9998999 0.9998998 1.00069e-4 0.9999001 9.998e-5 1.00131e-4 0.9998998 9.998e-5 + + + + + + + + + + + + + + +

1 0 0 2 0 1 0 0 2 1 0 3 3 0 4 2 0 5

+
+
+
+
+ + + + 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 1 + + + + + + + + + + + + + + + +
diff --git a/raspimouse_gazebo/models/course_straight_50x50cm/model.config b/raspimouse_gazebo/models/course_straight_50x50cm/model.config new file mode 100644 index 0000000..6c7928f --- /dev/null +++ b/raspimouse_gazebo/models/course_straight_50x50cm/model.config @@ -0,0 +1,16 @@ + + + + course_straight_50x50cm + 1.0 + model.sdf + + + YusukeKato + yusuke.kato@rt-net.jp + + + + line follower course + + diff --git a/raspimouse_gazebo/models/course_straight_50x50cm/model.sdf b/raspimouse_gazebo/models/course_straight_50x50cm/model.sdf new file mode 100644 index 0000000..17e9f0d --- /dev/null +++ b/raspimouse_gazebo/models/course_straight_50x50cm/model.sdf @@ -0,0 +1,34 @@ + + + + true + + + 0 0 0 0 0 0 + + + model://course_straight_50x50cm/meshes/course_straight_50x50cm.dae + 1 1 1 + + + + + + 0.9 + 0.9 + + + + + + 0 0 0 0 0 0 + + + model://course_straight_50x50cm/meshes/course_straight_50x50cm.dae + 1 1 1 + + + + + + diff --git a/raspimouse_gazebo/worlds/line_follower_field1.sdf b/raspimouse_gazebo/worlds/line_follower_field1.sdf new file mode 100644 index 0000000..275ef4f --- /dev/null +++ b/raspimouse_gazebo/worlds/line_follower_field1.sdf @@ -0,0 +1,76 @@ + + + + + 0.010 + 1.0 + + + + + + + + + + + https://fuel.gazebosim.org/1.0/OpenRobotics/models/Sun + + + + + + https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ground%20Plane + + + + + + model://course_straight_50x50cm + + 0 0 0.01 0 0 0 + + + + + model://course_curve_50x50cm + + 0.5 0 0.01 0 0 0 + + + + + model://course_curve_50x50cm + + 0.5 0.5 0.01 0 0 1.57 + + + + + model://course_straight_50x50cm + + 0 0.5 0.01 0 0 0 + + + + + model://course_curve_50x50cm + + -0.5 0 0.01 0 0 -1.57 + + + + + model://course_curve_50x50cm + + -0.5 0.5 0.01 0 0 3.14 + + + + From 825e683b50fc88c96645e2ede26e95b0336eb0b1 Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Tue, 21 Nov 2023 17:53:28 +0900 Subject: [PATCH 2/5] =?UTF-8?q?camera=5Fdownward=E3=81=8Ctrue=E3=81=AE?= =?UTF-8?q?=E3=81=A8=E3=81=8DRGB=E3=82=AB=E3=83=A1=E3=83=A9=E3=81=8C?= =?UTF-8?q?=E6=96=9C=E3=82=81=E4=B8=8B=E3=82=92=E5=90=91=E3=81=8F=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4=20(#75)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * camera_downwardがtrueのときRGBカメラが斜め下を向くように変更 * camera_downwardの説明を修正 Co-authored-by: Shota Aoki --------- Co-authored-by: Shota Aoki --- .../launch/raspimouse_with_emptyworld.launch.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py index f0aa8eb..f0adc9e 100644 --- a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py +++ b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py @@ -46,6 +46,10 @@ def generate_launch_description(): 'use_rgb_camera', default_value='false', description='Set "true" to mount rgb camera.') + declare_arg_camera_downward = DeclareLaunchArgument( + 'camera_downward', + default_value='false', + description='Set "true" to point the camera downwards.') declare_arg_world_name = DeclareLaunchArgument( 'world_name', default_value=get_package_share_directory('raspimouse_gazebo')+'/worlds/empty_world.sdf', @@ -94,6 +98,7 @@ def generate_launch_description(): description_loader.lidar_frame = LaunchConfiguration('lidar_frame') description_loader.use_gazebo = 'true' description_loader.use_rgb_camera = LaunchConfiguration('use_rgb_camera') + description_loader.camera_downward = LaunchConfiguration('camera_downward') description_loader.gz_control_config_package = 'raspimouse_gazebo' description_loader.gz_control_config_file_path = 'config/raspimouse_controllers.yaml' @@ -154,6 +159,7 @@ def generate_launch_description(): declare_arg_lidar, declare_arg_lidar_frame, declare_arg_use_rgb_camera, + declare_arg_camera_downward, declare_arg_world_name, declare_arg_spawn_x, declare_arg_spawn_y, From ef26922d09ac3433a8b7d0300c451e04f0cb0b3f Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Wed, 6 Dec 2023 18:30:20 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=88=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=A9=E3=81=AE=E3=83=91=E3=83=A9=E3=83=A1=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=82=92=E8=AA=BF=E6=95=B4=E3=81=97=E3=81=A6=E3=82=AA?= =?UTF-8?q?=E3=83=89=E3=83=A1=E3=83=88=E3=83=AA=E3=81=AE=E3=82=BA=E3=83=AC?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20(#76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- raspimouse_gazebo/config/raspimouse_controllers.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raspimouse_gazebo/config/raspimouse_controllers.yaml b/raspimouse_gazebo/config/raspimouse_controllers.yaml index 104880e..88788b9 100644 --- a/raspimouse_gazebo/config/raspimouse_controllers.yaml +++ b/raspimouse_gazebo/config/raspimouse_controllers.yaml @@ -19,9 +19,9 @@ diff_drive_controller: wheel_separation : 0.09 wheels_per_side: 1 wheel_radius : 0.024 - wheel_separation_multiplier : 1.0 - left_wheel_radius_multiplier : 1.0 - right_wheel_radius_multiplier : 1.0 + wheel_separation_multiplier : 0.95 + left_wheel_radius_multiplier : 1.05 + right_wheel_radius_multiplier : 1.05 odom_frame_id: odom base_frame_id: base_footprint From 90fd4309fb67bd82ef03a198e6e9af8429b73adf Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Thu, 22 Feb 2024 18:47:08 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E3=82=B7=E3=83=9F=E3=83=A5=E3=83=AC?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E7=92=B0=E5=A2=83=E3=81=A7SLAM=E3=81=A8Navig?= =?UTF-8?q?ation=E3=82=92=E5=AE=9F=E8=A1=8C=20(#77)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * LakeHouseのモデルをワールドに配置 * bridgeにscanトピックを追加 * センサのプラグインを追加 * READMEにカメラライントレースとSLAM&Navigationの実行方法を追記 * lakehouseワールドに30cmの黒いキューブを複数配置 * READMEに画像を追加 * 不足していた依存関係を追加 * コピペできるようにコマンドを修正 Co-authored-by: Shota Aoki * 引数mapの説明を修正 Co-authored-by: Shota Aoki * Copyrightの文面を修正 Co-authored-by: Shota Aoki * 英語版READMEのコマンドもコピペできるように修正 --------- Co-authored-by: Shota Aoki --- README.en.md | 79 ++++++++++++++++- README.md | 77 +++++++++++++++- .../raspimouse_with_emptyworld.launch.py | 1 + .../raspimouse_with_lakehouse.launch.py | 48 ++++++++++ .../models/cube_30cm_black/model.config | 16 ++++ .../models/cube_30cm_black/model.sdf | 38 ++++++++ raspimouse_gazebo/package.xml | 2 + raspimouse_gazebo/worlds/lakehouse.sdf | 88 +++++++++++++++++++ 8 files changed, 344 insertions(+), 5 deletions(-) create mode 100644 raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py create mode 100644 raspimouse_gazebo/models/cube_30cm_black/model.config create mode 100644 raspimouse_gazebo/models/cube_30cm_black/model.sdf create mode 100644 raspimouse_gazebo/worlds/lakehouse.sdf diff --git a/README.en.md b/README.en.md index 61bc52e..8cedc37 100644 --- a/README.en.md +++ b/README.en.md @@ -93,6 +93,79 @@ ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_ ![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_object_tracking.gif) +### camera_line_follower + +Terminal 1: + +```sh +ros2 launch raspimouse_gazebo raspimouse_with_line_follower_field.launch.py use_rgb_camera:=true camera_downward:=true +``` + +Terminal 2: + +```sh +ros2 launch raspimouse_ros2_examples camera_line_follower.launch.py mouse:=false use_camera_node:=false +``` + +Terminal 3: Start + +```sh +ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: false, switch1: false, switch2: true}" +``` + +Terminal 3: Stop +```sh +ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: true, switch1: false, switch2: false}" +``` + +For information on parameters in camera line follower, click [here](https://github.com/rt-net/raspimouse_ros2_examples/blob/master/README.en.md#parameters). + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_camerafollower_short.gif) + +### SLAM & Navigation + +#### SLAM + +Terminal 1: +```sh +ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg +``` +The lidar option supports `urg`, `lds`, and `rplidar`. + +Terminal 2: +```sh +ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js0" joyconfig:=f710 mouse:=false +``` + +Terminal 3: +```sh +ros2 launch raspimouse_slam pc_slam.launch.py +``` + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_slam.png) + +Terminal 4: +```sh +ros2 run nav2_map_server map_saver_cli -f ~/MAP_NAME +``` + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_slam_short.gif) + +#### Navigation + +Terminal 1: +```sh +ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg +``` +The lidar option supports `urg`, `lds`, and `rplidar`. + +Terminal 2: +```sh +ros2 launch raspimouse_navigation pc_navigation.launch.py map:=$HOME/MAP_NAME.yaml +``` + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_navigation_short.gif) + ## Model data list ### course_curve_50x50cm @@ -108,12 +181,12 @@ Panel size is 50 cm x 50 cm and line width is 4 cm. ![](./raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight.jpg) ### cube_*cm_color-name -Each cube is 5 cm, 7.5 cm, 10 cm, and 15 cm on a side. -The cube colors are red, yellow, blue, and green. +Each cube is 5 cm, 7.5 cm, 10 cm, and 15 cm, 30 cm on a side. +The cube colors are red, yellow, blue, green and black. ![](https://rt-net.github.io/images/raspberry-pi-mouse/color_objects.png) -### daeファイルについて +### about dae files The dae file is edited in Blender 4.0. ## License diff --git a/README.md b/README.md index 740803d..eb8bec5 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ git clone -b ros2 https://github.com/rt-net/raspimouse_sim.git ```sh cd ~/ros2_ws/src git clone https://github.com/rt-net/raspimouse_ros2_examples.git +git clone https://github.com/rt-net/raspimouse_slam_navigation_ros2.git git clone -b ros2 https://github.com/rt-net/raspimouse_description.git rosdep install -r -y -i --from-paths raspimouse* ``` @@ -93,6 +94,78 @@ ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_ ![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_object_tracking.gif) +### RGBカメラを用いたライントレースサンプル + +端末1で次のコマンドを実行すると、ライントレースのサンプルコースが配置されたワールドが表示されます。 +```sh +ros2 launch raspimouse_gazebo raspimouse_with_line_follower_field.launch.py use_rgb_camera:=true camera_downward:=true +``` + +端末2で次のコマンドを実行すると、カメラライントレースのノードが起動します。 +```sh +ros2 launch raspimouse_ros2_examples camera_line_follower.launch.py mouse:=false use_camera_node:=false +``` + +端末3で次のコマンドを実行すると、Raspberry Pi Mouseが走行を開始します。 +```sh +ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: false, switch1: false, switch2: true}" +``` + +次のコマンドを実行すると、Raspberry Pi Mouseが停止します。 +```sh +ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: true, switch1: false, switch2: false}" +``` + +カメラライントレースにおけるパラメータは[こちら](https://github.com/rt-net/raspimouse_ros2_examples?tab=readme-ov-file#parameters)を参照してください。 + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_camerafollower_short.gif) + +### LiDARを用いたSLAMとNavigationのサンプル + +#### SLAM + +端末1で次のコマンドを実行すると、`Lake House`のモデルが配置されたワールドが表示されます。 +```sh +ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg +``` +`lidar`は`urg`、`lds`、`rplidar`のいずれかを指定してください。 + +端末2で次のコマンドを実行すると、Raspberry Pi Mouseをジョイスティックコントローラで操作できます。 +```sh +ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js0" joyconfig:=f710 mouse:=false +``` + +端末3で次のコマンドを実行すると、SLAMが実行されます。 +```sh +ros2 launch raspimouse_slam pc_slam.launch.py +``` + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_slam.png) + +端末4で次のコマンドを実行すると、作成した地図を保存できます。 +```sh +ros2 run nav2_map_server map_saver_cli -f ~/MAP_NAME +``` +`MAP_NAME`は任意の名前を指定できます。 + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_slam_short.gif) + +#### Navigation + +端末1で次のコマンドを実行すると、`Lake House`のモデルが配置されたワールドが表示されます。 +```sh +ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg +``` +`lidar`は`urg`、`lds`、`rplidar`のいずれかを指定してください。 + +端末2で次のコマンドを実行すると、Navigationが実行されます。 +```sh +ros2 launch raspimouse_navigation pc_navigation.launch.py map:=$HOME/MAP_NAME.yaml +``` +引数`map`にはSLAMで作成した地図ファイルのパスを指定してください。 + +![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_navigation_short.gif) + ## モデルデータ一覧 ### course_curve_50x50cm @@ -110,8 +183,8 @@ ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_ ![](./raspimouse_gazebo/models/course_straight_50x50cm/meshes/course_straight.jpg) ### cube_*cm_color-name -それぞれ一辺5cm、7.5cm、10cm、15cmの立方体です。 -色は赤、黄、青、緑です。 +それぞれ一辺5cm、7.5cm、10cm、15cm、30cmの立方体です。 +色は赤、黄、青、緑、黒です。 ![](https://rt-net.github.io/images/raspberry-pi-mouse/color_objects.png) diff --git a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py index f0adc9e..fae5f85 100644 --- a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py +++ b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py @@ -135,6 +135,7 @@ def generate_launch_description(): package='ros_gz_bridge', executable='parameter_bridge', arguments=['/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock', + '/scan@sensor_msgs/msg/LaserScan@ignition.msgs.LaserScan', '/camera/color/image_raw@sensor_msgs/msg/Image@gz.msgs.Image', '/camera_info@sensor_msgs/msg/CameraInfo@gz.msgs.CameraInfo'], output='screen' diff --git a/raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py b/raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py new file mode 100644 index 0000000..5952d12 --- /dev/null +++ b/raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py @@ -0,0 +1,48 @@ +# The MIT License (MIT) +# +# Copyright 2024 RT Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +# the Software, and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription +from launch_ros.actions import SetParameter +from launch.launch_description_sources import PythonLaunchDescriptionSource + + +def generate_launch_description(): + world_file = os.path.join( + get_package_share_directory('raspimouse_gazebo'), + 'worlds', + 'lakehouse.sdf') + world_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource([ + get_package_share_directory('raspimouse_gazebo'), + '/launch/raspimouse_with_emptyworld.launch.py']), + launch_arguments={ + 'world_name': world_file + }.items() + ) + + return LaunchDescription([ + SetParameter(name='use_sim_time', value=True), + world_launch + ]) diff --git a/raspimouse_gazebo/models/cube_30cm_black/model.config b/raspimouse_gazebo/models/cube_30cm_black/model.config new file mode 100644 index 0000000..0c30a0d --- /dev/null +++ b/raspimouse_gazebo/models/cube_30cm_black/model.config @@ -0,0 +1,16 @@ + + + + Black Cube 30cm + 1.0 + model.sdf + + + YusukeKato + yusuke.kato@rt-net.jp + + + + Cube + + diff --git a/raspimouse_gazebo/models/cube_30cm_black/model.sdf b/raspimouse_gazebo/models/cube_30cm_black/model.sdf new file mode 100644 index 0000000..b20f11f --- /dev/null +++ b/raspimouse_gazebo/models/cube_30cm_black/model.sdf @@ -0,0 +1,38 @@ + + + + + + + 1 + 0 + 0 + 1 + 0 + 1 + + 1.0 + + + + + 0.3 0.3 0.3 + + + + + + 0 0 0 1 + 0 0 0 1 + 0 0 0 0 + 0 0 0 1 + + + + 0.3 0.3 0.3 + + + + + + diff --git a/raspimouse_gazebo/package.xml b/raspimouse_gazebo/package.xml index 04f7506..25f4762 100644 --- a/raspimouse_gazebo/package.xml +++ b/raspimouse_gazebo/package.xml @@ -20,6 +20,8 @@ raspimouse_fake raspimouse_description robot_state_publisher + diff_drive_controller + joint_state_broadcaster ament_cmake diff --git a/raspimouse_gazebo/worlds/lakehouse.sdf b/raspimouse_gazebo/worlds/lakehouse.sdf new file mode 100644 index 0000000..b29eb53 --- /dev/null +++ b/raspimouse_gazebo/worlds/lakehouse.sdf @@ -0,0 +1,88 @@ + + + + + 0.001 + 1.0 + + + + + ogre2 + + + + + + + + + https://fuel.gazebosim.org/1.0/OpenRobotics/models/Sun + + + + + + https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ground%20Plane + + + + + 0 0 -7.0 0 0 0 + + https://fuel.gazebosim.org/1.0/OpenRobotics/models/Lake%20House + + + + + + model://cube_30cm_black + + -0.5 0 0.075 0 0 0 + + + + + model://cube_30cm_black + + -0.5 1.0 0.075 0 0 0 + + + + + model://cube_30cm_black + + -0.5 -1.0 0.075 0 0 0 + + + + + model://cube_30cm_black + + 2.0 0 0.075 0 0 0 + + + + + model://cube_30cm_black + + 2.0 1.0 0.075 0 0 0 + + + + + model://cube_30cm_black + + 2.0 -1.0 0.075 0 0 0 + + + + From 73b465e0d8c5248a9af203e24f4b2ecb5b2a9249 Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Tue, 5 Mar 2024 19:09:08 +0900 Subject: [PATCH 5/5] =?UTF-8?q?2.1.0=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=81=AE=E3=81=9F=E3=82=81=E3=81=ABCHANGELOG.rst=E3=81=A8packa?= =?UTF-8?q?ge.xml=E3=82=92=E6=9B=B4=E6=96=B0=20(#78)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * リリースのためにCHANGELOG.rstを更新 * 2.1.0 --- raspimouse_fake/CHANGELOG.rst | 3 +++ raspimouse_fake/package.xml | 2 +- raspimouse_gazebo/CHANGELOG.rst | 11 +++++++++++ raspimouse_gazebo/package.xml | 2 +- raspimouse_sim/CHANGELOG.rst | 3 +++ raspimouse_sim/package.xml | 2 +- 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/raspimouse_fake/CHANGELOG.rst b/raspimouse_fake/CHANGELOG.rst index 50bd1c6..119b56b 100644 --- a/raspimouse_fake/CHANGELOG.rst +++ b/raspimouse_fake/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package raspimouse_fake ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2.1.0 (2024-03-05) +------------------ + 2.0.0 (2023-11-07) ------------------ * シミュレータ環境に擬似的なラズパイマウスノードを追加 (`#69 `_) diff --git a/raspimouse_fake/package.xml b/raspimouse_fake/package.xml index 2065be8..6687992 100644 --- a/raspimouse_fake/package.xml +++ b/raspimouse_fake/package.xml @@ -2,7 +2,7 @@ raspimouse_fake - 2.0.0 + 2.1.0 The raspimouse_control package RT Corporation MIT diff --git a/raspimouse_gazebo/CHANGELOG.rst b/raspimouse_gazebo/CHANGELOG.rst index 8321fbf..6886bd8 100644 --- a/raspimouse_gazebo/CHANGELOG.rst +++ b/raspimouse_gazebo/CHANGELOG.rst @@ -2,6 +2,17 @@ Changelog for package raspimouse_gazebo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2.1.0 (2024-03-05) +------------------ +* シミュレータ環境でSLAMとNavigationを実行 (`#77 `_) + Co-authored-by: Shota Aoki +* コントローラのパラメータを調整してオドメトリのズレを修正 (`#76 `_) +* camera_downwardがtrueのときRGBカメラが斜め下を向くように変更 (`#75 `_) + Co-authored-by: Shota Aoki +* ライントレース用のコースを作成 (`#74 `_) + Co-authored-by: Shota Aoki +* Contributors: YusukeKato + 2.0.0 (2023-11-07) ------------------ * Gazebo上で画像トピックを配信できるようにbridgeを設定 (`#71 `_) diff --git a/raspimouse_gazebo/package.xml b/raspimouse_gazebo/package.xml index 25f4762..ea94cdb 100644 --- a/raspimouse_gazebo/package.xml +++ b/raspimouse_gazebo/package.xml @@ -2,7 +2,7 @@ raspimouse_gazebo - 2.0.0 + 2.1.0 The raspimouse_gazebo package RT Corporation MIT diff --git a/raspimouse_sim/CHANGELOG.rst b/raspimouse_sim/CHANGELOG.rst index 85bfaa7..8b275bf 100644 --- a/raspimouse_sim/CHANGELOG.rst +++ b/raspimouse_sim/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package raspimouse_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2.1.0 (2024-03-05) +------------------ + 2.0.0 (2023-11-07) ------------------ * ROS 2 Humble環境のraspimouse_with_emptyworld.launch.pyを実装 (`#66 `_) diff --git a/raspimouse_sim/package.xml b/raspimouse_sim/package.xml index ac6070b..cfe26ce 100644 --- a/raspimouse_sim/package.xml +++ b/raspimouse_sim/package.xml @@ -2,7 +2,7 @@ raspimouse_sim - 2.0.0 + 2.1.0 ROS 2 package suite for Raspberry Pi Mouse Simulator RT Corporation MIT