Closed KuraZuzu closed 1 week ago
Raspberry Pi Mouse V3実機で動作確認をしてみました。
実行した内容はこちら(lidar
をlds
にして実施してます)
# Raspberry Pi Mouse V3側で実行
ros2 launch raspimouse_slam robot_bringup.launch.py lidar:=rplidar joyconfig:=f710
# リモートPC側で以下のコマンドを実行
ros2 launch raspimouse_slam pc_slam.launch.py
RaspBerry Pi Mouse V3側ではLiDARやモータ・ジョイコンが動作するものの、リモートPC側のRvizで失敗しました。シミュレーションのみのときと同様に/map
が無いと言われるようです。
ros2 launch raspimouse_slam pc_slam.launch.py
のコマンドでRvizの表示が失敗
$ ros2 node list
/hlds_laser_publisher
/joint_state_publisher
/joy_node
/joystick_control
/launch_ros_2931
/raspimouse
/robot_state_publisher
$ ros2 topic list
/buzzer
/cmd_vel
/diagnostics
/joint_states
/joy
/joy/set_feedback
/leds
/light_sensors
/map
/map_metadata
/odom
/parameter_events
/pose
/raspimouse/transition_event
/robot_description
/rosout
/scan
/slam_toolbox/feedback
/slam_toolbox/graph_visualization
/slam_toolbox/scan_visualization
/slam_toolbox/update
/switches
/tf
/tf_static
rqt_graph
ではこのようになっています。シミュレーションのみのときとの違いとして/slam_toolbox
の有無があります。先程のNodeリストからもわかるように、/slam_toolbox
が存在しません。こちらはシミュレーションのみのときは合ったはずです。
Topic:/map
はこのようになっていました。
$ ros2 topic info /map
Type: nav_msgs/msg/OccupancyGrid
Publisher count: 1
Subscription count: 1
$ ros2 topic echo /map
A message was lost!!!
total count change:1
total count: 1---
header:
stamp:
sec: 1727775415
nanosec: 909966583
frame_id: map
info:
map_load_time:
sec: 0
nanosec: 0
resolution: 0.009999999776482582
width: 585
height: 481
origin:
position:
x: -2.1770256830467316
y: -1.4195476215536593
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
data:
- -1
- -1
- -1
- -1
- -1
- -1
(以下同じ...)
slam_toolboxはJazzyからLifecycleNodeを使っているようです。 https://github.com/SteveMacenski/slam_toolbox/blob/jazzy/launch/online_sync_launch.py#L40
参考:Humbleのとき↓ https://github.com/SteveMacenski/slam_toolbox/blob/humble/launch/online_sync_launch.py#L24
LifeCycleNodeに変更し、無事動作しました。
不具合の概要
ROS 2 Jazzy上でGazebo上でのSLAMが動作しません(Raspberry Pi Mouse実機を用いないシミュレーション上)。 また、実機でのSLAMの動作確認は未実施です。
ros2 launch raspimouse_slam pc_slam.launch.py
で生成されるGazebo上ではロボットが動かず、マップも生成されません。また、LiDARからの情報である距離情報のパーティクルも表示されません。実行環境
feature/support-jazzy
(Jazzy対応中のブランチ)/usr/bin/python3.12.3
)再現方法
ros2_ws
にインストールします。~/ros2_ws/src
から~/ros2_ws
に移動してビルドします。lakehouse
でRaspberry Pi MouseのLiDARにurg
を設定してRvizとGazeboシミュレータを起動します。5.
で立ち上げたRviz上でSLAMが動作しません。期待する動作
ログ・画像
コマンドを実行すると、queueがいっぱいになるというエラーが出力されます。
4.
で立ち上げたターミナルからキーボードで操作したとき、3.
で立ち上げたRvizとGazeboでは操作したとおりに動きます。 しかし、5.
で立ち上げたRviz上では動作せず、SLAMの実行画面上ではLiDARのセンサ情報である赤いパーティクルも表示されません。また、ロボットのモデルも白色になってしまいます。その他
わかっていることを記述します。
slam_toolbox
がうまく動作していないNode:
/slam_toolbox
は起動できているものの、Topic:/map
に正しくpublish/subscribeが出来ていないようです。/map
と/odom
の関係を一時的に固定してみるとqueueがいっぱいになるというエラーは消え、SLAM上でモデルが正しく表示されます。また、LiDARから得たセンサ情報の赤いパーティクルも表示されます。キーボードで操作したとおりに動きますが、しかし、マッピングはされません。Humbleでも重複してSLAMを起動するとJazzyでも動作する
同じネットワーク上で
Humble
(rosdistro経由のaptでインストールできるもの)のSLAMを起動すると、Jazzy上のSLAMのRvizで想定した動作をし、マッピングもされます。lakehouse
でRaspberry Pi MouseのLiDARにurg
を設定してRvizとGazeboシミュレータを起動します。JazzyのSLAMのRvizが正常に動作し、Humbleと同期した動きをします。このことから、raspimouse_descriptionのURDFではなく、Jazzy上での
slam_toolbox
の扱いに間違いがあると考えています。