ROSConJP 2019の1日目のROS2の講習会にて使用されたRaspberry Pi Mouse ROSConJP2019講習会キットを入手したのでROS2でいろいろ試しています。
RViz2でtf(正確にはtf2だけれどもここではtfと表記)ツリーのtransformに失敗して、LaserScanがほとんど表示されない(まれにtransformに成功して表示される)問題に遭遇しています。
以下がそのRViz2のスクリーンレコード(1.0倍速)です。

[rviz2-1] [ERROR] [rviz2]: Lookup would require extrapolation into the future. Requested time 1570305527.54524 but the latest data is at time 1570305527.44573, when looking up transform from frame [laser_frame] to frame [odom]使用してる各種ソフトウェアのバージョンは以下のとおりです。
$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 18.04.3 LTSRelease: 18.04Codename: bionic
$ uname -aLinux T480s 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ dpkg -l | grep ros-dashing-tfii ros-dashing-tf2 0.11.5-1bionic.20190918.174949 amd64 tf2 is the second generation of the transform library, which lets the user keep track of multiple coordinate frames over time.ii ros-dashing-tf2-eigen 0.11.5-1bionic.20190923.212026 amd64 tf2_eigenii ros-dashing-tf2-geometry-msgs 0.11.5-1bionic.20190923.212044 amd64 tf2_geometry_msgsii ros-dashing-tf2-kdl 0.11.5-1bionic.20190923.210640 amd64 KDL binding for tf2ii ros-dashing-tf2-msgs 0.11.5-1bionic.20190918.173948 amd64 tf2_msgsii ros-dashing-tf2-ros 0.11.5-1bionic.20190923.210012 amd64 tf2_rosii ros-dashing-tf2-sensor-msgs 0.11.5-1bionic.20190923.212139 amd64 tf2_sensor_msgs
$ dpkg -l | grep ros-dashing-rvizii ros-dashing-rviz-assimp-vendor 6.1.4-1bionic.20190918.162719 amd64 Wrapper around assimp, providing nothing but a dependency on assimp, on some systems.ii ros-dashing-rviz-common 6.1.4-1bionic.20190923.212322 amd64 Common rviz API, used by rviz plugins and applications.ii ros-dashing-rviz-default-plugins 6.1.4-1bionic.20190923.213837 amd64 Several default plugins for rviz to cover the basic functionality.ii ros-dashing-rviz-ogre-vendor 6.1.4-1bionic.20190918.162726 amd64 Wrapper around ogre3d, it provides a fixed CMake module and an ExternalProject build of ogre.ii ros-dashing-rviz-rendering 6.1.4-1bionic.20190918.164248 amd64 Library which provides the 3D rendering functionality in rviz.ii ros-dashing-rviz2 6.1.4-1bionic.20190923.214525 amd64 3D visualization tool for ROS.chronyを使ってPCとロボットの時刻同期をしていたのでtf2_monitorの結果はこんな感じで特に問題はなさそうに見えます。
$ ros2 run tf2_ros tf2_monitor
RESULTS: for all Frames
Frames:Frame: /base_link, published by <no authority available>, Average Delay: 0.00958436, Max Delay: 0.0214376Frame: /laser_frame, published by <no authority available>, Average Delay: 0.00956981, Max Delay: 0.0214226Frame: base_footprint, published by <no authority available>, Average Delay: 0.0214976, Max Delay: 0.213811
All Broadcasters:Node: <no authority available> 11.3634 Hz, Average Delay: 0.020404 Max Delay: 0.213811GitHub上でいくつか調べてみると、どうやらRViz2の問題の可能性が高いらしく、以下のissueにて議論が行われているようです。
laser scans not showing when fixed frame is not equal to the laser scans frame id · Issue #332 · ros2/rviz
I see this on Ubuntu 18.04 with the bouncy deb binaries. Steps to reproduce: ros2 launch dummy_robot_bringup dummy_robot_bringup.launch.py rviz2 Add a display by topic and use /scan Add the tf disp...
関連しそうなissueがいくつかありました。
High latency in TF propagation · Issue #359 · ros2/rviz
I'm porting the Stereolabs ZED 3D camera package to ROS2 and I cannot work with TF because of the high latency. I'm sure that the TF messages propagates because I can see them using the ros2 topic ...
[dummy_robot] rviz intermmittently displays lidar data: Lookup would require extrapolation into the future · Issue #295 · ros2/demos
Bug report Required Info: Operating System: ubuntu bionic Installation type: debs Version or commit hash: crystal prerelease DDS implementation: Fast-RTPS Client library (if applicable): N/A Steps ...
関連記事
- Mini Pupperを動かすまで(ソフトウェア準備編)前回はMini Pupperを組み立てました。今回は起動してジョイスティック操作するまでをメモします。
- (Updated )Mini Pupperを動かすまで(組み立て編)KickstarterでbackしていたMini Pupper(#minipupper / #ミニぷぱ)が届き始めているようです。私のところにも届いたので組み立てました。その過程をメモします。今回は組み立て編です。
- 3DプリンタKINGROON KP3Sを購入しました2021年9月末に新しい3Dプリンタを購入しました。KINGROONのKP3Sという機種です。
- Raspberry Pi OSのミラーサーバRaspberry Pi OS(旧Raspbian)のミラーサーバ一覧のメモ。日本国内のdebianパッケージミラーとOSイメージのJAISTミラーURLをまとめた。
- Raspberry Piで動くVSCodeの選択肢Raspberry PiでVSCodeを動かすための選択肢として、VSCodium、headmelted/codebuilds、stevedesmond-ca/vscode-armの3つをメモ。