Closed shmpwk closed 1 year ago
camerainfoは、real pr2の場合は、/kinect_head/depth_registered/throttled/camera_infoや/kinect_head/depth_registered/camera_infoや/kinect_head/rgb/half/camera_infoなど試してみましたが、いづれもunorganizedなpointcloudが出力されてしまいます。
入力しているpointcloudは、boundingbox内の点群である/segmentation_decomposer/debug_output です。
$ rostopic echo /segmentation_decomposer/debug_output --noarr
header:
seq: 1971
stamp:
secs: 1600765097
nsecs: 970909147
frame_id: "head_mount_kinect_rgb_optical_frame"
height: 1
width: 30651
fields: "<array type: sensor_msgs/PointField, length: 4>"
is_bigendian: False
point_step: 32
row_step: 980832
data: "<array type: uint8, length: 980832>"
is_dense: False
そもそもなのですが、最初は同じコードでorganizedに変換できていたようなのですが、PCのソフトウェアの更新をしたところ、organizedに変換されなくなりました。workスペースを新しく作り直してもう一度buildをしたものの、復帰できていない状態です。
解決の助けにならないかもしれないんですが、以下の情報を教えて下さい:
/segmentation_decomposer/debug_output
がどのlaunchから出ているか(ほぼ、ただの確認)@pazeshun ありがとうございます。
/segmentation_decomposer/debug_outputがどのlaunchから出ているか
https://github.com/shmpwk/jsk_2020_04_carry_dish/blob/feature/develop/launch/tabletop_thin_object_detector.launch#L85 で呼ばれた ClusterPointIndicesDecomposerから出ています。 tabletop_thin_object_detector.launchは、tabletop_object_detector.launchをもとにパラメータを少しいじっています。
Input CloudはこれでInput Camera Infoはこれで生成されるものはこれです、という写真
写真は、シミュレーションのpr2カメラから、boundingbox内の皿の縁を抽出させています。
PCLのversionはいくつか
1.8.1でした。
$ apt show libpcl-dev
Package: libpcl-dev
Version: 1.8.1+dfsg1-2ubuntu2.18.04.1
Priority: extra
Section: universe/libdevel
Source: pcl
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 11.3 MB
Depends: libboost-all-dev, libeigen3-dev, libflann-dev, libvtk6-dev, libqhull-dev, libvtk6-qt-dev, libopenni-dev, libopenni2-dev, libpcl-apps1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-common1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-features1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-filters1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-io1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-kdtree1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-keypoints1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-ml1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-octree1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-outofcore1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-people1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-recognition1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-registration1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-sample-consensus1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-search1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-segmentation1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-stereo1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-surface1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-tracking1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1), libpcl-visualization1.8 (= 1.8.1+dfsg1-2ubuntu2.18.04.1)
Suggests: libpcl-doc
Homepage: http://www.pointclouds.org/
Download-Size: 1,077 kB
APT-Manual-Installed: no
APT-Sources: http://jp.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
Description: Point Cloud Library - development files
The Point Cloud Library (PCL) is a standalone, large scale, open
project for 2D/3D image and point cloud processing.
.
The PCL framework contains numerous state-of-the art algorithms
including filtering, feature estimation, surface reconstruction,
registration, model fitting and segmentation.
.
This package contains development files (headers and shared library
symbolic link).
rosbagは今から取ります。
ごめん、
PCのソフトウェアの更新をしたところ
は、「ソフトフェアの更新」GUIでOKを押したり、sudo apt update && sudo apt dist-upgrade
をして、その後再起動したということでしょうか。
ただの念のためなんですが、sudo apt update && sudo apt dist-upgrade
をすると、どのような表示が出てくるでしょうか。
「ソフトフェアの更新」GUIでOKを押してその後再起動しました。
sudo apt update && sudo apt dist-upgrade
は
$ sudo apt update && sudo apt dist-upgrade
取得:1 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01 InRelease
無視:1 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01 InRelease
取得:2 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01 Release [574 B]
取得:2 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01 Release [574 B]
ヒット:3 http://archive.ubuntulinux.jp/ubuntu bionic InRelease
ヒット:4 http://jp.archive.ubuntu.com/ubuntu bionic InRelease
ヒット:5 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 InRelease
ヒット:6 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64 InRelease
ヒット:7 http://archive.ubuntulinux.jp/ubuntu-ja-non-free bionic InRelease
取得:8 http://jp.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
ヒット:9 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease
ヒット:10 https://download.docker.com/linux/ubuntu bionic InRelease
ヒット:11 https://desktop-download.mendeley.com/download/apt stable InRelease
取得:12 http://jp.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
ヒット:14 https://storage.googleapis.com/bazel-apt stable InRelease
無視:15 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease
ヒット:16 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Release
ヒット:17 http://dl.google.com/linux/chrome/deb stable InRelease
ヒット:18 http://packages.ros.org/ros-testing/ubuntu bionic InRelease
取得:19 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
252 kB を 1秒 で取得しました (202 kB/s)
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
パッケージはすべて最新です。
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
アップグレードパッケージを検出しています... 完了
以下のパッケージが自動でインストールされましたが、もう必要とされていません:
bridge-utils cython3 gir1.2-geocodeglib-1.0 libblosc1 libcublas-dev libcublas10 libcublas9.1 libcurand9.1 libfwup1
libllvm9 linux-image-4.15.0-117-generic linux-modules-4.15.0-117-generic linux-modules-extra-4.15.0-117-generic
python-tables-data python3-bs4 python3-cycler python3-decorator python3-gflags python3-h5py python3-html5lib
python3-ipython python3-ipython-genutils python3-leveldb python3-lxml python3-matplotlib python3-networkx
python3-numexpr python3-pandas python3-pandas-lib python3-pickleshare python3-prompt-toolkit python3-pygments
python3-pyparsing python3-pywt python3-scipy python3-simplegeneric python3-skimage python3-skimage-lib
python3-tables python3-tables-lib python3-traitlets python3-wcwidth python3-webencodings ubuntu-fan
ubuntu-web-launchers
これを削除するには 'sudo apt autoremove' を利用してください。
アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。
と成功しているようにみえます。 (rosbag今つくります)
compressedなrosbagを取りました。(https://github.com/shmpwk/grasp_recognition#record-rosbag) こちらのグーグルドライブにrosbagを置きました。 (リンクを最初貼り間違えていましたので修正しました。)
長谷川さんに見ていただきましたが、パッと見原因がわかりませんでした。 ただ、これを回避して自分のプログラムを書くことができたので、デバグは一旦放置します。 jsk recognitionにもissueを立てる予定です。
対象物体のbounding box内のpointcloudを受け取って、DepthImageCreatorでorganizedなpointcloudに変換しようとしました。
real pr2を使ったコードがこちらで gazeboのpr2を使ったコードがこちらです。(realとsimulationの違いはcamerainfoぐらいです。)
realのpr2でDepthImageCreatorから出力されるpointcloudを見てみると、以下のようになっています。 1つめが色なしで2つめが色ありのpointcloudです。。
いずれもorganizedなpointcloudが出てくるかと思いましたが、 heightが1になっているので、出力のpointcloudがunorganizedだということがわかります。(参考) gazeboのsimulationも同様です。
DepthImageCreatorを見ると、 ~input (sensor_msgs/PointCloud2):のunorganizedなpointcloudを ~info (sensor_msgs/CameraInfo):の情報を頼りにorganizedに変換しており、 depth_image_creator_nodelet.cpp でその変換が行われているものの、そのコードが間違っているとは考えにくいかなと思います。