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

3dsensor.launch causes "No devices connected" error. #427

Open
sktometometo opened this issue Jun 2, 2022 · 5 comments
Open

3dsensor.launch causes "No devices connected" error. #427

sktometometo opened this issue Jun 2, 2022 · 5 comments

Comments

@sktometometo
Copy link

Describe the bug
turtlebot_bringup パッケージの 3dsensor.launch を研究室のturtlebot付属のラップトップ(hostname: KI00070) で立ち上げると以下のように "No devices connected.." というエラーが表示され、画像のトピックが出力されません。

~ $ roslaunch turtlebot_bringup 3dsensor.launch
... logging to /home/sktometometo/.ros/log/76cbde5e-e22d-11ec-8685-2079185f8b3d/roslaunch-KI00070-15086.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://KI00070:40915/

SUMMARY
========

PARAMETERS
 * /camera/camera_nodelet_manager/num_worker_threads: 4
 * /camera/depth_rectify_depth/interpolation: 0
 * /camera/depth_registered_rectify_depth/interpolation: 0
 * /camera/disparity_depth/max_range: 4.0
 * /camera/disparity_depth/min_range: 0.5
 * /camera/disparity_registered_hw/max_range: 4.0
 * /camera/disparity_registered_hw/min_range: 0.5
 * /camera/disparity_registered_sw/max_range: 4.0
 * /camera/disparity_registered_sw/min_range: 0.5
 * /camera/driver/depth_camera_info_url:
 * /camera/driver/depth_frame_id: camera_depth_opti...
 * /camera/driver/depth_registration: True
 * /camera/driver/device_id: #1
 * /camera/driver/rgb_camera_info_url:
 * /camera/driver/rgb_frame_id: camera_rgb_optica...
 * /depthimage_to_laserscan/output_frame_id: camera_depth_frame
 * /depthimage_to_laserscan/range_min: 0.45
 * /depthimage_to_laserscan/scan_height: 10
 * /rosdistro: melodic
 * /rosversion: 1.14.13

NODES
  /
    depthimage_to_laserscan (nodelet/nodelet)
  /camera/
    camera_nodelet_manager (nodelet/nodelet)
    depth_metric (nodelet/nodelet)
    depth_metric_rect (nodelet/nodelet)
    depth_points (nodelet/nodelet)
    depth_rectify_depth (nodelet/nodelet)
    depth_registered_hw_metric_rect (nodelet/nodelet)
    depth_registered_metric (nodelet/nodelet)
    depth_registered_rectify_depth (nodelet/nodelet)
    depth_registered_sw_metric_rect (nodelet/nodelet)
    disparity_depth (nodelet/nodelet)
    disparity_registered_hw (nodelet/nodelet)
    disparity_registered_sw (nodelet/nodelet)
    driver (nodelet/nodelet)
    ir_rectify_ir (nodelet/nodelet)
    points_xyzrgb_hw_registered (nodelet/nodelet)
    points_xyzrgb_sw_registered (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
    rgb_debayer (nodelet/nodelet)
    rgb_rectify_color (nodelet/nodelet)
    rgb_rectify_mono (nodelet/nodelet)

ROS_MASTER_URI=http://localhost:11311

process[camera/camera_nodelet_manager-1]: started with pid [15103]
process[camera/driver-2]: started with pid [15104]
process[camera/rgb_debayer-3]: started with pid [15105]
process[camera/rgb_rectify_mono-4]: started with pid [15106]
process[camera/rgb_rectify_color-5]: started with pid [15122]
process[camera/ir_rectify_ir-6]: started with pid [15136]
process[camera/depth_rectify_depth-7]: started with pid [15145]
process[camera/depth_metric_rect-8]: started with pid [15157]
process[camera/depth_metric-9]: started with pid [15179]
process[camera/depth_points-10]: started with pid [15187]
process[camera/register_depth_rgb-11]: started with pid [15199]
process[camera/points_xyzrgb_sw_registered-12]: started with pid [15210]
process[camera/depth_registered_sw_metric_rect-13]: started with pid [15223]
process[camera/depth_registered_rectify_depth-14]: started with pid [15229]
process[camera/points_xyzrgb_hw_registered-15]: started with pid [15248]
process[camera/depth_registered_hw_metric_rect-16]: started with pid [15254]
process[camera/depth_registered_metric-17]: started with pid [15264]
[ INFO] [WallTime: 1654150478.829639824] [node:/camera/camera_nodelet_manager] [func:Loader::Impl::advertiseRosApi]: Initializing nodelet with 4 worker threads.
process[camera/disparity_depth-18]: started with pid [15279]
process[camera/disparity_registered_sw-19]: started with pid [15295]
process[camera/disparity_registered_hw-20]: started with pid [15318]
process[depthimage_to_laserscan-21]: started with pid [15335]
[ INFO] [WallTime: 1654150479.166859103] [node:/camera/camera_nodelet_manager] [func:DriverNodelet::setupDevice]: No devices connected.... waiting for devices to be connected
~ $ rostopic list
/camera/depth_registered/camera_info
/camera/depth_registered/image
/camera/rgb/image_raw
/clicked_point
/initialpose
/map
/map_updates
/move_base/NavfnROS/plan
/move_base_simple/goal
/particlecloud
/rosout
/rosout_agg
/scan
/tf
/tf_static
~ $ rostopic hz /camera/depth_registered/image
subscribed to [/camera/depth_registered/image]
no new messages
no new messages
no new messages
no new messages

To Reproduce
Steps to reproduce the behavior:

  1. 研究室のturtlebot付属のlaptopにKinectを接続
  2. mech-userでログイン
  3. roslaunch turtlebot_bringup 3dsensor.launch を実行

Expected behavior

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@kindsenior
Copy link
Collaborator

kindsenior commented Nov 13, 2022

自分も学科PCだと同じ症状でした.

kindsenior/turtlebot@8a268da
で,デバイスの読み込みに成功して概ね同じトピックが出てそうなところまで確認しました.(演習の全ての課題が動くかどうかは未検証)
が,turtebotにPRする必要があるので,演習までにマージされるか(or 間に合うか)微妙...

どう対処すべきでしょうか? > @k-okada

  1. 本家のturtlebotにPRする
  2. kindsenior/use-freenectを使う
  3. freenectは何らかの理由で良くない?ので他の解決法を探る?

その他の確認メモ

  1. [Melodic 情報理工PC] openniの代わりにlibfreenectをソースから入れて使う #305 で同様のことに触れていてるが,turtlebot_bringup/launch/3dsensor.launchを変更してなそうなので,当時はドライバをインストールするだけで動いた?
  2. update .rosinstall.meldoic to use Oct/2019 version of source #321 でfreenect のインストールを削除しているのはmelodicのaptがリリースされたからと思われるが,それ以外の理由でfreenectを使わない理由があるか?
  3. なぜ本家のturtebotが未だにOpenNIを使っているのか...

メモ
当初,カーネル依存を疑いlinux-image4.15.0-196-genericとlinux-image-5.4.0-125-genericを試したが,解決できなかった.
(仮に解決できても学科PCでカーネルアップデートはしない?)

@k-okada
Copy link
Member

k-okada commented Nov 14, 2022 via email

@kindsenior kindsenior mentioned this issue Nov 20, 2022
@kindsenior
Copy link
Collaborator

kindsenior commented Nov 20, 2022

  1. 本家へのPR:Support switching between freenect and OpenNI turtlebot/turtlebot#294
  2. 下記で対応しています
    - git:
    local-name: turtlebot
    uri: https://github.com/kindsenior/turtlebot.git
    version: use-freenect-feb176b # fix for launching 3dsensor.launch in students' PC until https://github.com/turtlebot/turtlebot/pull/294 will be merged

ワークスペースの作成方法について
下記で修正しました
https://sourceforge.net/p/jsk-enshu/code/587/tree//trunk/doc/2022/robot-programming-1-2022.tex?diff=50c99eba34309d09e53b849c:586

→下記の対応になったので,この修正は不要になりました

@kindsenior
Copy link
Collaborator

kindsenior commented Nov 28, 2022

@k-okada

ARVRの演習で学科PC+OpenNI+kinect v1を動かせるのは,openni-dev周りのライブラリを上書きor追加しているようです.

動かし方
avin2/SensorKinectのv0.93-5.1.2.1を使ってhttps://github.com/avin2/SensorKinect/blob/v0.93-5.1.2.1/README#L173-L190 に従います.

git clone [email protected]:avin2/SensorKinect.git -b v0.93-5.1.2.1
cd <clone directory>/Platform/Linux/CreateRedist
./RedistMaker
cd <clone directory>/Platform/Linux/Redist/Sensor-Bin-Linux-x64-v5.1.2.1 # READMEだとSensor-Bin-Linux-x64-v5.1.2.1ではなくResdistで実行することになっているが,Redistにはinstall.shはない
sudo ./install.sh

ARVRの演習では,./RedistMakerでビルドしてあるSensor-Bin-Linux-x64-v5.1.2.1を配布しているようです.
演習ページからDLしたビルド済みものと上記の方法でビルドしたものにdiffはなくどちらもkinect v1を使えました.

昨年は学科PCではなく自前のPC(おそらく過去にNITEを使ったことがある)で動作確認したため,気づきませんでしたが,ARVRの演習の後にロボットプログラミングの演習を受けると自然とkinectを使えるようになるというからくりな気がします.

確認事項
A) ARVRの担当の先生に手順が同じか確認する?
B) ARVRの担当の先生と毎年どうしているか,今後どうするのか確認して,ロボットプログラミングの演習の資料に反映する.
C) 本家のPrimeSense/Sensorでない理由(今の所,動かせるリビジョンは未発見)

@kindsenior kindsenior mentioned this issue Feb 2, 2023
19 tasks
@kindsenior kindsenior mentioned this issue Nov 5, 2023
21 tasks
@iory
Copy link
Contributor

iory commented Nov 10, 2023

#427 (comment)
学科PCでこちらの方法で正常にkinectが動作することを確認しました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants