Closed sktometometo closed 5 years ago
please try this command sudo apt install python3-catkin-pkg-modules
https://stackoverflow.com/questions/49221565/unable-to-use-cv-bridge-with-ros-kinetic-and-python3
I have successfully build this package, thank you!
I have created a pull request about python3-
And I have got another error with sample launch.
sktometometo@Sherman ~ [gitbranch:] [workspace:/home/sktometometo/ros/ws_tpu_development] ->
09:51 午後 日 9月 15$ roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/image_publisher/output
... logging to /home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/roslaunch-Sherman-16564.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://Sherman:38553/
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.14
NODES
/
edgetpu_object_detector (coral_usb/edgetpu_object_detector.py)
ROS_MASTER_URI=http://localhost:11311
process[edgetpu_object_detector-1]: started with pid [16582]
Traceback (most recent call last):
File "/home/sktometometo/ros/ws_tpu_development/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 17, in <module>
from chainercv.visualizations import vis_bbox
ImportError: No module named 'chainercv'
[edgetpu_object_detector-1] process has died [pid 16582, exit code 1, cmd /home/sktometometo/ros/ws_tpu_development/devel/lib/coral_usb/edgetpu_object_detector.py ~input:=/image_publisher/output __name:=edgetpu_object_detector __log:=/home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1.log].
log file: /home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1*.log
[edgetpu_object_detector-1] restarting process
process[edgetpu_object_detector-1]: started with pid [16588]
Traceback (most recent call last):
File "/home/sktometometo/ros/ws_tpu_development/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 17, in <module>
from chainercv.visualizations import vis_bbox
ImportError: No module named 'chainercv'
[edgetpu_object_detector-1] process has died [pid 16588, exit code 1, cmd /home/sktometometo/ros/ws_tpu_development/devel/lib/coral_usb/edgetpu_object_detector.py ~input:=/image_publisher/output __name:=edgetpu_object_detector __log:=/home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1.log].
log file: /home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1*.log
[edgetpu_object_detector-1] restarting process
process[edgetpu_object_detector-1]: started with pid [16594]
^C[edgetpu_object_detector-1] killing on exit
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "/home/sktometometo/ros/ws_tpu_development/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 14, in <module>
import cv2 # NOQA
ImportError: numpy.core.multiarray failed to import
shutting down processing monitor...
... shutting down processing monitor complete
done
This seemed because python3 environment did not have chainercv modules. and this error did not appear after instaling chainercv to python3 environment with pip3 command. Is there any way to mark python3 library dependencies in catkin package.xml?
In addition, I have still got an error while executing the launch after chainercv installation to python3.
sktometometo@Sherman ~ [gitbranch:] [workspace:/home/sktometometo/ros/ws_tpu_development] ->
09:54 午後 日 9月 15$ roslaunch coral_usb edgetpu_object_detector.launch INPUT_IMAGE:=/image_publisher/output
... logging to /home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/roslaunch-Sherman-17864.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://Sherman:41065/
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.14
NODES
/
edgetpu_object_detector (coral_usb/edgetpu_object_detector.py)
ROS_MASTER_URI=http://localhost:11311
process[edgetpu_object_detector-1]: started with pid [17881]
Traceback (most recent call last):
File "/home/sktometometo/ros/ws_tpu_development/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 28, in <module>
from jsk_topic_tools import ConnectionBasedTransport
File "/opt/ros/kinetic/lib/python2.7/dist-packages/jsk_topic_tools/__init__.py", line 5, in <module>
from .log_utils import *
File "/opt/ros/kinetic/lib/python2.7/dist-packages/jsk_topic_tools/log_utils.py", line 4, in <module>
import cPickle as pickle
ImportError: No module named 'cPickle'
[edgetpu_object_detector-1] process has died [pid 17881, exit code 1, cmd /home/sktometometo/ros/ws_tpu_development/devel/lib/coral_usb/edgetpu_object_detector.py ~input:=/image_publisher/output __name:=edgetpu_object_detector __log:=/home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1.log].
log file: /home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1*.log
[edgetpu_object_detector-1] restarting process
process[edgetpu_object_detector-1]: started with pid [17892]
Traceback (most recent call last):
File "/home/sktometometo/ros/ws_tpu_development/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 28, in <module>
from jsk_topic_tools import ConnectionBasedTransport
File "/opt/ros/kinetic/lib/python2.7/dist-packages/jsk_topic_tools/__init__.py", line 5, in <module>
from .log_utils import *
File "/opt/ros/kinetic/lib/python2.7/dist-packages/jsk_topic_tools/log_utils.py", line 4, in <module>
import cPickle as pickle
ImportError: No module named 'cPickle'
[edgetpu_object_detector-1] process has died [pid 17892, exit code 1, cmd /home/sktometometo/ros/ws_tpu_development/devel/lib/coral_usb/edgetpu_object_detector.py ~input:=/image_publisher/output __name:=edgetpu_object_detector __log:=/home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1.log].
log file: /home/sktometometo/.ros/log/e2b568ee-d7b6-11e9-9339-507b9daced47/edgetpu_object_detector-1*.log
[edgetpu_object_detector-1] restarting process
process[edgetpu_object_detector-1]: started with pid [17904]
Traceback (most recent call last):
File "/home/sktometometo/ros/ws_tpu_development/src/coral_usb_ros/node_scripts/edgetpu_object_detector.py", line 28, in <module>
from jsk_topic_tools import ConnectionBasedTransport
File "/opt/ros/kinetic/lib/python2.7/dist-packages/jsk_topic_tools/__init__.py", line 5, in <module>
from .log_utils import *
File "/opt/ros/kinetic/lib/python2.7/dist-packages/jsk_topic_tools/log_utils.py", line 4, in <module>
import cPickle as pickle
ImportError: No module named 'cPickle'
^C[edgetpu_object_detector-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done**
This seems to be related to this pull request. I am trying to build the version of jsk_topic_tools.
Did you do source ~/ros/coral_ws/devel/setup.bash
before launching?
I have succecfuly run the exapmle by building jsk_topic_tools and source the workspace.
I had tried to build the package following the instruction in README.md, but "catkin build" command had failed because "catkin_pkg" was not found during "catkin_tools_prebuild" process.
I suspect that this is because python3-catkin-pkg package is not installed in my computer and python3 environment in my pc cannot use catkin_pkg python module, but the python3-catkin-pkg debian package for ubuntu conflicts with python-catkin-pkg, and if I install python3-catkin-pkg package to my pc, my ROS environment will break.
Is there any way to build this package? Should I build python3-catkin-pkg from source?