Python 3 was not well supported by ROS Melodic.
stretch_deep_perception required Python 3, which could
cause issues and confusion. To help clarify when code
used Python 3, the filenames had the pattern *_python3.py.
I've changed the filenames to remove this pattern,
since all of the ROS Noetic code will be using Python 3
by default, and ROS Noetic supports Python 3.
The following demo appears to work now.
roslaunch stretch_deep_perception stretch_detect_faces.launch
One key change was to make sure to use a Python 3 version of
OpenCV (import cv2) with the Inference Engine. Otherwise, you
get errors like the following:
self.head_pose_model = cv2.dnn.readNet(head_pose_weights_filename, head_pose_config_filename)
cv2.error: OpenCV(4.2.0) ../modules/dnn/src/dnn.cpp:3298: error: (-2:Unspecified error) Build OpenCV with Inference Engine to enable loading models from Model Optimizer. in function 'readFromModelOptimizer'
My installation had two different pip versions of OpenCV and
an apt version of OpenCV, which created problems.
The last change I made was to fix frame_id by remove the
initial slash.
Used grep to find from_dcm and as_dcm methods in stretch_ros code.
scipy.spatial.Rotation changed the method names, so I attempted
to correct them throughout the code with the following conversions:
as_dcm => as_matrix
from_dcm => from_matrix