Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 3B で SLAMサンプル の作業用PC側プログラムが起動しない #24

Closed
ghost opened this issue Apr 15, 2021 · 6 comments
Labels
Type: Bug Bug or Bug fixes

Comments

@ghost
Copy link

ghost commented Apr 15, 2021

不具合の概要

https://rt-net.jp/mobility/archives/14503
にて解説されている

 最後にSLAMノードを起動します。
 このサンプルで使用するのは、Slam Toolboxというパッケージです。
 次のコマンドを作業用PCで実行します。
 実行すると、Slam Toolboxのノードと、RVizが起動します。
 $ ros2 launch raspimouse_ros2_examples slam.launch.py

を実行すると"slam toolbox"が見つからない。とエラーが表示される。
これ以前のラズパイマウスV3側で実行する、
 ros2 launch raspimouse_ros2_examples mouse_with_lidar.launch.py lidar:=lds
 ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js0" joyconfig:=dualshock3 mouse:=true
はエラーなくLiDARが回転した状態でDualShock3で操作できております。

実行環境

OS:Ubuntu18.04
ROS2:Dashing

ログ・画像

[INFO][launch]: All log files can befound below/home/ubuntu/.ros/log/2021-04-15-16-50-41-083958-ubuntu-5346
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: caught exception in launch (see debug for traceback): "package
'slam toolbox' not found, searching: ['/home/ubuntu/ros2_ws/install/raspimouse_
ros2 examples' '/home/ubuntu/ros2 ws/install/raspimouse', '/home/ubuntu/ros2 wร
/install/raspimouse msqs /opt/ros/dashing' ]"

@ghost ghost added the Type: Bug Bug or Bug fixes label Apr 15, 2021
@ghost
Copy link
Author

ghost commented Apr 16, 2021

追加参考情報
SLAMのひとつ前の解説記事

ラズパイマウスとカメラで物体を追跡する
https://rt-net.jp/mobility/archives/14031
を手順通りに実行したところ、

ラズパイマウスV3は正しく対象物を追跡移動するが、
作業用PC側では「rqtは起動するが何も表示されず画像の様なエラーが表示される」
ObjectTracking_rqt_error

ドメイン設定は正しく行わており、pingも互いに通る。
ubuntu@ubuntu:~$ echo $ROS_DOMAIN_ID
22

@ShotaAk
Copy link
Contributor

ShotaAk commented Apr 20, 2021

@koshiba2020 ご報告ありがとうございます。package.xmlにslam_toolboxが含まれていないことが原因でした。
後ほどpackage.xmlを修正します。

ひとまず、$ sudo apt install ros-dashing-slam-toolboxを実行してパッケージをインストールしていただけませんか?

@ghost
Copy link
Author

ghost commented Apr 20, 2021

@koshiba2020 ご報告ありがとうございます。package.xmlにslam_toolboxが含まれていないことが原因でした。
後ほどpackage.xmlを修正します。

ひとまず、$ sudo apt install ros-dashing-slam-toolboxを実行してパッケージをインストールしていただけませんか?

ご報告が遅れて申し訳ございません。

下記URLを参考に
Mapping and Localization in ROS2
http://www.robotandchisel.com/2020/08/19/slam-in-ros2/

下記のコマンドを実行しまして再試行しましたところ、
sudo apt-get install ros-dashing-slam-toolbox

Rivzが起動しまして、画像の様にLiDARからのデータはリアルタイム表示される状態になりました。
しかし地図が生成されないため、 package.xml が修正されました後に再度実行してみます。
SS

@ShotaAk
Copy link
Contributor

ShotaAk commented Apr 20, 2021

しかし地図が生成されないため、 package.xml が修正されました後に再度実行してみます。
package.xmlはrosdepでインストールされるパッケージに影響し、実際の動作には関わりません。

実行するノード、RVizで表示している項目等を再度ご確認ください。

@ShotaAk
Copy link
Contributor

ShotaAk commented Apr 20, 2021

ラズパイマウスV3は正しく対象物を追跡移動するが、
作業用PC側では「rqtは起動するが何も表示されず画像の様なエラーが表示される」

こちらについても確認します。SLAMサンプルとは別の問題ですので、別のIssueとして扱います。

@ShotaAk
Copy link
Contributor

ShotaAk commented Apr 22, 2021

画像については$ ros2 topic hz /result_imageコマンドを実行し、画像トピックが取得できるかご確認ください。

またrqt画面でリロードボタンを押すと、トピックが読み込まれる場合があります。

image

@ShotaAk ShotaAk closed this as completed May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

No branches or pull requests

1 participant