swri-robotics / point_cloud_segmentation

Apache License 2.0
11 stars 9 forks source link

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 2 years ago

dbdxnuliba commented 2 years ago

after catkin build sucess , I roslaunch pcs_ros demo.launch ` <?xml version="1.0" ?>

` 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
mpowelson commented 2 years ago

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

dbdxnuliba commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.