Closed yani-rl-ai closed 4 years ago
Can you tell me what was the problem? Maybe there is some code in dodo_detector that is only compatible with Python 3?
my problem is i got some error when i launched the project. i changed the config setting based on my camera topic and launch file. but the issues come out such as my above command. which version of ROS did u use for this project? can you give me some short tutorial how to run this code in ROS.
Here is your error: https://answers.ros.org/question/326226/importerror-dynamic-module-does-not-define-module-export-function-pyinit__tf2/
Your computer is running my package using Python 3, when it should be using Python 2.
Here is the line in my code that tells ROS how to run my Python module:
I use env
[1] to find the Python executable in the user's machine. IIRC, python
should point to Python 2 in Ubuntu 16.04 (more specifically, the python2
executable). In your case, python
is calling Python 3 instead of Python 2.
Try to change that shebang to point directly to your preferred version of Python 2 and see if it fixes your problem.
Thank you for your rapid answer. maybe i have some misunderstanding with your packages. First of all, i used python 3 because i thought your dodo detector original package can only run in python 3, so i assumed the ROS package should use some python 3 environments setting. i will try again soon sorry for my bad english
It's been quite a while since I've last used dodo_detector_ros
. Looking at the recent changes, I think you're actually right. I updated this package to work with dodo_detector
0.7, but dodo_detector
0.7 only works with Python 3 mostly because of TensorFlow 2, which has been updated to only work on Python 3.
I'll have to sit down and take a look at this, but maybe I'll have to make this package use a an older version of dodo_detector
(probably 0.6.1), since ROS only works with Python 2.
Until then, use commit https://github.com/douglasrizzo/dodo_detector_ros/commit/017266438f3fd7fc20a9b074fe568ef80f900188 of dodo_detector_ros and version 0.6.1 of dodo_detector
.
I'm really sorry for the mix up. I'll sort this out as soon as I can.
Hi @douglasrizzo thank you for your reply. i tried to follow your recommendation file. i installed the version 0.6.1 (which is python 2), then i tried to install tensorflow (1.15) object detection API. i got an error when i installed it into python 2.7 environment, due to it is only compatible with python 3.6>. Do you have any suggestion?
FYI, i used anaconda to install all the requirement.
You'd need to find the latest commit in the TensorFlow Object Detection API that works with Python 2.7. I went to their releases and singled out a few commits you can test:
If any of these commits work for you, I'd appreciate if you warn me, because then I could point other ROS/Python 2.7 users to the correct commit.
Edit: please note that the TensorFlow versions I mentioned above are not the ones you'll have to install. Find the latest TensorFlow version that can be installed under Python 2.7, then try to install the Object Detection API using the commits above and see if it works.
hey @douglasrizzo , thank you for your answer.
actually i already tests all the link that you shared to me, i tested it on tensorflow-gpu. i found some error and difficulty. FYI, I used CUDA 10.1. when i tested version 1 in tensorflow cpu i did not find any error. but when i tested it on tensorflow gpu. the cuda version is not compatible with my version, i need to change my cuda version(too complicated)
in addition, this below commits TensorFlow 2.1 (Oct 9, 2019) TensorFlow 2.2 (Nov 13, 2019) is not compatible with tensorflow 2 gpu and cpu, these files use library in tensorflow 1, which is not compatible if i run it in tensorflow 2, i need to convert the models script with the provided tools from tensorflow.
Can you tell me what you did to successfully execute the package?
hi @douglasrizzo , i tried to use your code, i found some errors due to the python version between ros and Dodo detector. Could you give me some tutorial in detail to run this code?
thank you in advance
error message :