srothh / ppmrob

ROS drone control
0 stars 0 forks source link

cv - node does not start #28

Closed lazafi closed 6 months ago

lazafi commented 6 months ago
$ docker compose  -f "docker-compose.yml" up -d --build ros_master cockpit cv drone

....

Downloading: "https://github.com/ultralytics/yolov5/zipball/master" to /root/.cache/torch/hub/master.zip
YOLOv5 🚀 2024-3-12 Python-3.8.10 torch-2.2.0+cu118 CPU

Fusing layers... 
yolocustom summary: 157 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs
Adding AutoShape... 
[ WARN:0@4.776] global loadsave.cpp:248 findDecoder imread_('/catkin_ws/src/cv/src/or0001.jpg'): can't open/read file: check file path/integrity
Traceback (most recent call last):
  File "/catkin_ws/src/cv/src/cv_node.py", line 83, in <module>
    cv_node()
  File "/catkin_ws/src/cv/src/cv_node.py", line 72, in cv_node
    detected, lines = img_processing(frame, window_name)
  File "/catkin_ws/src/cv/src/image_processing/process_image.py", line 12, in img_processing
    pil_image = Image.fromarray(frame)
  File "/usr/local/lib/python3.8/dist-packages/PIL/Image.py", line 3087, in fromarray
    arr = obj.__array_interface__
AttributeError: 'NoneType' object has no attribute '__array_interface__'
[cv-1] process has died [pid 57, exit code 1, cmd /catkin_ws/src/cv/src/cv_node.py __name:=cv __log:=/root/.ros/log/e3f4cf38-e0b7-11ee-adbd-0242c0a8d002/cv-1.log].
log file: /root/.ros/log/e3f4cf38-e0b7-11ee-adbd-0242c0a8d002/cv-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
srothh commented 6 months ago

Looks like I forgot to remove a reference to a local file used for testing in the code. Sorry about that, I will remove it.

srothh commented 6 months ago

It should be fixed. Please verify that it does indeed work for you now and if so close the issue, if not just write here again (or ping me on discord, I will likely see it more quickly).