Git Product home page Git Product logo

Comments (10)

shmpwk avatar shmpwk commented on May 29, 2024 1

了解しました.以後気をつけます.

自分の環境ubuntu18.04, melodicでの
launchの出力全体は以下のようになっていました.

$ roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/camera/rgb/image_raw
... logging to /home/shumpeiwakabayashi/.ros/log/4aaa27a2-a0e1-11ea-a66d-287fcf9948c3/roslaunch-shumpeiwakabayashi-ThinkPad-T495s-29977.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://shumpeiwakabayashi-ThinkPad-T495s:45251/

SUMMARY
========

PARAMETERS
 * /edgetpu_object_detector/label_file: /home/shumpeiwaka...
 * /edgetpu_object_detector/model_file: /home/shumpeiwaka...
 * /rosdistro: melodic
 * /rosversion: 1.14.5

NODES
  /
    edgetpu_object_detector (coral_usb/edgetpu_object_detector.py)

ROS_MASTER_URI=http://localhost:11311

process[edgetpu_object_detector-1]: started with pid [30985]
Traceback (most recent call last):
  File "/home/shumpeiwakabayashi/coral_ws/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 14, in <module>
    import cv2  # NOQA
ModuleNotFoundError: No module named 'cv2'
[edgetpu_object_detector-1] process has died [pid 30985, exit code 1, cmd /home/shumpeiwakabayashi/coral_ws/devel/lib/coral_usb/edgetpu_object_detector.py ~input:=/camera/rgb/image_raw __name:=edgetpu_object_detector __log:=/home/shumpeiwakabayashi/.ros/log/4aaa27a2-a0e1-11ea-a66d-287fcf9948c3/edgetpu_object_detector-1.log].
log file: /home/shumpeiwakabayashi/.ros/log/4aaa27a2-a0e1-11ea-a66d-287fcf9948c3/edgetpu_object_detector-1*.log
[edgetpu_object_detector-1] restarting process

ここから,cv2が見つからないと判断しました.

from coral_usb_ros.

knorth55 avatar knorth55 commented on May 29, 2024
source /opt/ros/melodic/setup.bash
source ~/coral_ws/devel/setup.bash
ipython
>> import cv2

これを試してエラーがでるかみてみてください

from coral_usb_ros.

shmpwk avatar shmpwk commented on May 29, 2024

エラー出ませんでした.
In [2]: print(cv2) <module 'cv2.cv2' from '/home/shumpeiwakabayashi/.local/lib/python2.7/site-packages/cv2/cv2.so'>

from coral_usb_ros.

knorth55 avatar knorth55 commented on May 29, 2024

先のlaunchをするときにもう一度sourceをし直してやってみてください。
あとterminalの出力を全部はってもらえると助かります。

from coral_usb_ros.

knorth55 avatar knorth55 commented on May 29, 2024

これはやりましたか?
sudo apt-get install python3-opencv

from coral_usb_ros.

shmpwk avatar shmpwk commented on May 29, 2024

すみません,opencvをアンインストールしていました.
インストールして無事動きました.お騒がせしました.

from coral_usb_ros.

knorth55 avatar knorth55 commented on May 29, 2024

@shmpwk
あとの人のためにterminalの出力と何コマンドを実行したかをここに書いておいてください。

from coral_usb_ros.

shmpwk avatar shmpwk commented on May 29, 2024

はい,
これを見て,セットアップしていました.
その手順におけるcoralの認識で

roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/camera/rgb/image_raw

とした際に,terminal に No module named 'cv2'と出力されました.

参照した説明ではopencvのインストールについて書いてなかったので,

sudo apt-get install python3-opencv

をする必要がありました.(もともと自分でopencvを入れたつもりでいたが,入っていなかった.)

from coral_usb_ros.

knorth55 avatar knorth55 commented on May 29, 2024

roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/camera/rgb/image_raw
とした際に,terminal に No module named 'cv2'と出力されました.

問題が発生したときには、問題が再現できるlaunchを共有する、他の環境で再現しない場合にはterminalの出力結果を全て共有する、ことが重要です。
なかなか忘れがちですが、できるだけ多くの情報を共有することが基本なので。
terminalの出力結果で、他のエラーを何かしら見逃している可能性があるので、issueやメールをする場合はterminalの全ての出力結果をコピーペーストしてくれると、デバグがしやすくてありがたいです。

from coral_usb_ros.

knorth55 avatar knorth55 commented on May 29, 2024

ありがとうございます。

from coral_usb_ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.