diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 7d7abc3bb0..23068dd847 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -14,11 +14,11 @@ jobs: matrix: include: - ROS_DISTRO: indigo - USE_DEB: true + USE_DEB: false NOT_TEST_INSTALL : true USE_JENKINS: true DOCKER_IMAGE_JENKINS: ros-ubuntu:14.04-pcl - BEFORE_SCRIPT : "sudo pip install numpy==1.16.6; sudo pip install scikit-learn==0.19.1 scipy==1.2.3; sudo pip install fcn chainercv chainer-mask-rcnn==0.3.0 decorator==4.4.2 chainer==6.7.0 protobuf==3.18.0 cupy-cuda91; sudo pip install requests[socks]==2.25.1" + BEFORE_SCRIPT : "sudo pip install packaging==17.1; sudo pip install numpy==1.16.6; sudo pip install scikit-learn==0.19.1 scipy==1.2.3; sudo pip install fcn chainercv chainer-mask-rcnn==0.3.0 decorator==4.4.2 chainer==6.7.0 protobuf==3.18.0 cupy-cuda91; sudo pip install requests[socks]==2.25.1 gdown==3.4.3" experimental : false - ROS_DISTRO: kinetic USE_DEB: true diff --git a/.travis.rosinstall.indigo b/.travis.rosinstall.indigo new file mode 100644 index 0000000000..2d49cc3b27 --- /dev/null +++ b/.travis.rosinstall.indigo @@ -0,0 +1,8 @@ +# we need to install catkin_virtualenv 0.2.2 +# https://github.com/locusrobotics/catkin_virtualenv/pull/32 +# we need to avoid pip upgrade +# see https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/419 for more info +- git: + local-name: locusrobotics/catkin_virtualenv + uri: https://github.com/locusrobotics/catkin_virtualenv + version: 0.2.2 diff --git a/jsk_perception/.gitignore b/jsk_perception/.gitignore index 8b7dd14ac2..80b6943bf3 100644 --- a/jsk_perception/.gitignore +++ b/jsk_perception/.gitignore @@ -3,4 +3,5 @@ launch/eusmodel_detection_elevator-panels-eng8.launch template/*png template/*xml sample/milktea-box.launch -sample/rimokon-pose.launch \ No newline at end of file +sample/rimokon-pose.launch +requirements.txt diff --git a/jsk_perception/CMakeLists.txt b/jsk_perception/CMakeLists.txt index 0caed5f566..44e6f3a8f8 100644 --- a/jsk_perception/CMakeLists.txt +++ b/jsk_perception/CMakeLists.txt @@ -16,6 +16,7 @@ endif() find_package(catkin REQUIRED COMPONENTS angles + catkin_virtualenv cmake_modules cv_bridge dynamic_reconfigure @@ -183,6 +184,24 @@ catkin_package( LIBRARIES ${PROJECT_NAME} oriented_gradient ) +if("$ENV{ROS_DISTRO}" STREQUAL "indigo") + message(WARNING "following requirements.txt syntax is not support on 14.04") + message(WARNING "pytesseract==0.3.6 # via -r requirements.in") + message(WARNING "so we intentionally use requirements.txt") + message(WARNING "To use this program, we need to run") + message(WARNING "sed -i 's/upgrade_pip=True/upgrade_pip=False/' /opt/ros/indigo/share/catkin_virtualenv/cmake/build_venv.py") + message(WARNING "to prevent upgrading to latest pip, which is not Python2 compatible") + file(COPY requirements.txt.indigo DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/requirements.txt.indigo requirements.txt) + catkin_generate_virtualenv(PYTHON_INTERPRETER python2) +else() + catkin_generate_virtualenv( + INPUT_REQUIREMENTS requirements.in + PYTHON_INTERPRETER "python$ENV{ROS_PYTHON_VERSION}" + USE_SYSTEM_PACKAGES TRUE + ISOLATE_REQUIREMENTS FALSE + CHECK_VENV FALSE) +endif() # ------------------------------------------------------------------------------------ # Build @@ -424,12 +443,10 @@ install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} ) -if($ENV{ROS_DISTRO} STREQUAL "indigo") # on noetic it needs catkin_install_python to support Python3 and it does not work on indigo for some reason... -install(DIRECTORY scripts node_scripts - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} - USE_SOURCE_PERMISSIONS - ) -else() +install(PROGRAMS scripts/setup_opencv_learning_data.sh + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/scripts/ +) + install(DIRECTORY scripts node_scripts DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS @@ -444,9 +461,12 @@ catkin_install_python( ) file(GLOB NODE_SCRIPT_PROGRAMS node_scripts/*.py) catkin_install_python( - PROGRAMS ${NODE_SCRIPT_PROGRAMS} + PROGRAMS ${NODE_SCRIPT_PROGRAMS} node_scripts/apply_context_to_label_probability DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/node_scripts ) +install(FILES requirements.txt + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) if(CATKIN_DEVEL_PREFIX) add_custom_target(link_dir_mkdir COMMAND ${CMAKE_COMMAND} -E make_directory ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/node_scripts) @@ -456,7 +476,6 @@ if(CATKIN_DEVEL_PREFIX) add_dependencies(link_dir_${SUB_DIR} link_dir_mkdir) endforeach() endif(CATKIN_DEVEL_PREFIX) -endif() # ------------------------------------------------------------------------------------ # Test diff --git a/jsk_perception/node_scripts/alexnet_object_recognition.py b/jsk_perception/node_scripts/alexnet_object_recognition.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/apply_context_to_label_probability b/jsk_perception/node_scripts/apply_context_to_label_probability old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/aws_auto_checkin_app.py b/jsk_perception/node_scripts/aws_auto_checkin_app.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/aws_detect_faces.py b/jsk_perception/node_scripts/aws_detect_faces.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/binpack_rect_array.py b/jsk_perception/node_scripts/binpack_rect_array.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/bof_histogram_extractor.py b/jsk_perception/node_scripts/bof_histogram_extractor.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/craft_node.py b/jsk_perception/node_scripts/craft_node.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/deep_sort_tracker_node.py b/jsk_perception/node_scripts/deep_sort_tracker_node.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/depth_image_filter.py b/jsk_perception/node_scripts/depth_image_filter.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/draw_classification_result.py b/jsk_perception/node_scripts/draw_classification_result.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/draw_rects.py b/jsk_perception/node_scripts/draw_rects.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/extract_image_channel.py b/jsk_perception/node_scripts/extract_image_channel.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/face_pose_estimation.py b/jsk_perception/node_scripts/face_pose_estimation.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/fast_rcnn.py b/jsk_perception/node_scripts/fast_rcnn.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/fcn_depth_prediction.py b/jsk_perception/node_scripts/fcn_depth_prediction.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/fcn_object_segmentation.py b/jsk_perception/node_scripts/fcn_object_segmentation.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/fisheye_ray.py b/jsk_perception/node_scripts/fisheye_ray.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/hand_pose_estimation_2d.py b/jsk_perception/node_scripts/hand_pose_estimation_2d.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/human_mesh_recovery.py b/jsk_perception/node_scripts/human_mesh_recovery.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/image_cluster_indices_decomposer.py b/jsk_perception/node_scripts/image_cluster_indices_decomposer.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/image_publisher.py b/jsk_perception/node_scripts/image_publisher.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/image_time_diff.py b/jsk_perception/node_scripts/image_time_diff.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/image_to_label.py b/jsk_perception/node_scripts/image_to_label.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/label_image_classifier.py b/jsk_perception/node_scripts/label_image_classifier.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/label_image_decomposer.py b/jsk_perception/node_scripts/label_image_decomposer.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/mask_image_to_label.py b/jsk_perception/node_scripts/mask_image_to_label.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/mask_rcnn_instance_segmentation.py b/jsk_perception/node_scripts/mask_rcnn_instance_segmentation.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/matchtemplate.py b/jsk_perception/node_scripts/matchtemplate.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/non_maximum_suppression.py b/jsk_perception/node_scripts/non_maximum_suppression.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/ocr_node.py b/jsk_perception/node_scripts/ocr_node.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/paper_finder.py b/jsk_perception/node_scripts/paper_finder.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/people_mask_publisher.py b/jsk_perception/node_scripts/people_mask_publisher.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/people_pose_estimation_2d.py b/jsk_perception/node_scripts/people_pose_estimation_2d.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/pointit.py b/jsk_perception/node_scripts/pointit.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/probability_image_classifier.py b/jsk_perception/node_scripts/probability_image_classifier.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/random_forest_server.py b/jsk_perception/node_scripts/random_forest_server.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/rect_array_in_panorama_to_bounding_box_array.py b/jsk_perception/node_scripts/rect_array_in_panorama_to_bounding_box_array.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/rect_array_to_image_marker.py b/jsk_perception/node_scripts/rect_array_to_image_marker.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/regional_feature_based_object_recognition.py b/jsk_perception/node_scripts/regional_feature_based_object_recognition.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/selective_search.py b/jsk_perception/node_scripts/selective_search.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/sklearn_classifier.py b/jsk_perception/node_scripts/sklearn_classifier.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/solidity_rag_merge.py b/jsk_perception/node_scripts/solidity_rag_merge.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/speak_when_label_found.py b/jsk_perception/node_scripts/speak_when_label_found.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/split_fore_background.py b/jsk_perception/node_scripts/split_fore_background.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/split_image.py b/jsk_perception/node_scripts/split_image.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/ssd_object_detector.py b/jsk_perception/node_scripts/ssd_object_detector.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/tile_image.py b/jsk_perception/node_scripts/tile_image.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/unwrap_histogram_with_range_array.py b/jsk_perception/node_scripts/unwrap_histogram_with_range_array.py old mode 100755 new mode 100644 diff --git a/jsk_perception/node_scripts/vgg16_object_recognition.py b/jsk_perception/node_scripts/vgg16_object_recognition.py old mode 100755 new mode 100644 diff --git a/jsk_perception/package.xml b/jsk_perception/package.xml index 45fba3d647..accc2283f2 100644 --- a/jsk_perception/package.xml +++ b/jsk_perception/package.xml @@ -18,6 +18,7 @@ angles + catkin_virtualenv cmake_modules cv_bridge dynamic_reconfigure @@ -131,5 +132,6 @@ + requirements.txt diff --git a/jsk_perception/requirements.in b/jsk_perception/requirements.in new file mode 100644 index 0000000000..52e225a8a8 --- /dev/null +++ b/jsk_perception/requirements.in @@ -0,0 +1 @@ +pytesseract==0.3.6 diff --git a/jsk_perception/requirements.txt.indigo b/jsk_perception/requirements.txt.indigo new file mode 100644 index 0000000000..ce4ecd1030 --- /dev/null +++ b/jsk_perception/requirements.txt.indigo @@ -0,0 +1,6 @@ +# +# this is only used for indigo (pr2) +# +# kinetic+ users will use requirements.in +# +pytesseract==0.3.6 # via -r requirements.in diff --git a/jsk_perception/scripts/check_cascadeclassifier.py b/jsk_perception/scripts/check_cascadeclassifier.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/create_bof_dataset.py b/jsk_perception/scripts/create_bof_dataset.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/create_db_for_feature_based_object_recognition.py b/jsk_perception/scripts/create_db_for_feature_based_object_recognition.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/create_mls_correspondence.py b/jsk_perception/scripts/create_mls_correspondence.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/create_sift_dataset.py b/jsk_perception/scripts/create_sift_dataset.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/install_learning_datasets.py b/jsk_perception/scripts/install_learning_datasets.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/install_sample_data.py b/jsk_perception/scripts/install_sample_data.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/install_test_data.py b/jsk_perception/scripts/install_test_data.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/install_trained_data.py b/jsk_perception/scripts/install_trained_data.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/mls_matlab2opencv.py b/jsk_perception/scripts/mls_matlab2opencv.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/opencv_traindata_rejector.py b/jsk_perception/scripts/opencv_traindata_rejector.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/sklearn_classifier_trainer.py b/jsk_perception/scripts/sklearn_classifier_trainer.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/ssd_train_dataset.py b/jsk_perception/scripts/ssd_train_dataset.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/train_fcn.py b/jsk_perception/scripts/train_fcn.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/train_fcn_depth_prediction.py b/jsk_perception/scripts/train_fcn_depth_prediction.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/train_mask_rcnn.py b/jsk_perception/scripts/train_mask_rcnn.py old mode 100755 new mode 100644 diff --git a/jsk_perception/scripts/train_ssd.py b/jsk_perception/scripts/train_ssd.py old mode 100755 new mode 100644