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

FileNotFoundError: [Errno 2] No such file or directory: '/home/robot/catkin_ws/src/point_cloud_segmentation-master/pcs_detection/scripts/example_data/trained_hist.npy' #25

Open
dbdxnuliba opened this issue Sep 19, 2022 · 4 comments

Comments

@dbdxnuliba
Copy link

dbdxnuliba commented Sep 19, 2022

after catkin build sucess ,
I roslaunch pcs_ros demo.launch
`

`

the teriminal shows
Traceback (most recent call last):
File "/home/robot/catkin_ws/src/point_cloud_segmentation-master/pcs_ros/src/histogram_backprojection_node", line 53, in
server = HistogramBackprojectionServer(filepath)
File "/home/robot/catkin_ws/src/point_cloud_segmentation-master/pcs_ros/src/histogram_backprojection_node", line 23, in init
self.histogram_backprojection = HistogramBackprojection(filepath)
File "/home/robot/catkin_ws/devel/lib/python3/dist-packages/pcs_detection/models/histogram_backprojection.py", line 19, in init
self.histogram = np.load(hist_filepath)
File "/home/robot/.local/lib/python3.8/site-packages/numpy/lib/npyio.py", line 417, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '/home/robot/catkin_ws/src/point_cloud_segmentation-master/pcs_detection/scripts/example_data/trained_hist.npy'
[histogram_backprojection_node-2] process has died [pid 275489, exit code 1, cmd /home/robot/catkin_ws/src/point_cloud_segmentation-master/pcs_ros/src/histogram_backprojection_node __name:=histogram_backprojection_node __log:=/home/robot/.ros/log/1a756414-37fe-11ed-b265-b1452c6111fe/histogram_backprojection_node-2.log].
log file: /home/robot/.ros/log/1a756414-37fe-11ed-b265-b1452c6111fe/histogram_backprojection_node-2*.log

@dbdxnuliba dbdxnuliba changed the title Traceback (most recent call last): File "/home/taimi/ws_tesseract_new/src/point_cloud_segmentation-master/pcs_ros/src/histogram_backprojection_node", line 8, in <module> from pcs_detection.models.histogram_backprojection import HistogramBackprojection ModuleNotFoundError: No module named 'pcs_detection' FileNotFoundError: [Errno 2] No such file or directory: '/home/robot/catkin_ws/src/point_cloud_segmentation-master/pcs_detection/scripts/example_data/trained_hist.npy' Sep 19, 2022
@mpowelson
Copy link
Contributor

The python modules are supposed to be getting installed when you catkin build. Did you source your setup.bash after you built?

@dbdxnuliba
Copy link
Author

yes , i did , and it shows FileNotFoundError: [Errno 2] No such file or directory: '/home/robot/catkin_ws/src/point_cloud_segmentation-master/pcs_detection/scripts/example_data/trained_hist.npy'

but i can't find the file in the pcs_detection package :
image

I download the pkg in the master branch

The python modules are supposed to be getting installed when you catkin build. Did you source your setup.bash after you built?

@dbdxnuliba
Copy link
Author

more details, after I catkin build the workspace , pcs_detection install into /home/robot/ws_tesseract_new/devel/lib/python3/dist-packages
image

it there has also not trained_hist.npy

@mpowelson
Copy link
Contributor

Oh I see. It looks like that is the histogram that is "trained" from the dataset and used for histogram backprojection. This repo was set up to either use that or fcn8. It looks like I didn't include any of the trained models here. I'm not immediately seeing the code to generate the histogram, but you can see this example. Basically I think you want the output of roihist = cv.calcHist([hsv],[0, 1], None, [180, 256], [0, 180, 0, 256] ) saved to a pickle.

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

2 participants