Skip to content

Commit

Permalink
[jsk_perception] Enable catkin_virtualenv to fix pytesseract version
Browse files Browse the repository at this point in the history
  • Loading branch information
iory committed Sep 20, 2022
1 parent 9332300 commit d43870f
Show file tree
Hide file tree
Showing 71 changed files with 38 additions and 12 deletions.
3 changes: 2 additions & 1 deletion jsk_perception/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ launch/eusmodel_detection_elevator-panels-eng8.launch
template/*png
template/*xml
sample/milktea-box.launch
sample/rimokon-pose.launch
sample/rimokon-pose.launch
requirements.txt
38 changes: 27 additions & 11 deletions jsk_perception/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ endif()

find_package(catkin REQUIRED COMPONENTS
angles
catkin_virtualenv
cmake_modules
cv_bridge
dynamic_reconfigure
Expand All @@ -41,9 +42,7 @@ find_package(catkin REQUIRED COMPONENTS

find_package(roseus)

if(NOT $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...
catkin_python_setup()
endif()
catkin_python_setup()

find_package(Boost REQUIRED COMPONENTS filesystem system)

Expand Down Expand Up @@ -182,6 +181,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
Expand Down Expand Up @@ -421,22 +438,21 @@ 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
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)
else()
install(PROGRAMS scripts/setup_opencv_learning_data.sh
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/scripts/
)

file(GLOB SCRIPT_PROGRAMS scripts/*.py)
catkin_install_python(
PROGRAMS ${SCRIPT_PROGRAMS}
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/scripts/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/scripts/)
file(GLOB NODE_SCRIPTS_FILES node_scripts/*.py)
catkin_install_python(
PROGRAMS ${NODE_SCRIPTS_FILES} node_scripts/apply_context_to_label_probability
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/node_scripts/)
install(FILES requirements.txt
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
endif()


# ------------------------------------------------------------------------------------
Expand Down
Empty file modified jsk_perception/node_scripts/alexnet_object_recognition.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/apply_context_to_label_probability
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/aws_auto_checkin_app.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/aws_detect_faces.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/binpack_rect_array.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/bof_histogram_extractor.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/craft_node.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/deep_sort_tracker_node.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/depth_image_filter.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/draw_classification_result.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/draw_rects.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/extract_image_channel.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/face_pose_estimation.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/fast_rcnn.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/fcn_depth_prediction.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/fcn_object_segmentation.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/fisheye_ray.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/hand_pose_estimation_2d.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/human_mesh_recovery.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/image_cluster_indices_decomposer.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/image_publisher.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/image_time_diff.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/image_to_label.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/label_image_classifier.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/label_image_decomposer.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/mask_image_to_label.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/mask_rcnn_instance_segmentation.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/matchtemplate.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/non_maximum_suppression.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/ocr_node.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/paper_finder.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/people_mask_publisher.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/people_pose_estimation_2d.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/pointit.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/probability_image_classifier.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/random_forest_server.py
100755 → 100644
Empty file.
Empty file.
Empty file modified jsk_perception/node_scripts/rect_array_to_image_marker.py
100755 → 100644
Empty file.
Empty file.
Empty file modified jsk_perception/node_scripts/selective_search.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/sklearn_classifier.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/solidity_rag_merge.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/speak_when_label_found.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/split_fore_background.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/split_image.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/ssd_object_detector.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/node_scripts/tile_image.py
100755 → 100644
Empty file.
Empty file.
Empty file modified jsk_perception/node_scripts/vgg16_object_recognition.py
100755 → 100644
Empty file.
2 changes: 2 additions & 0 deletions jsk_perception/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<!-- ALPHABETICAL ORDER -->
<build_depend>angles</build_depend>
<build_depend>catkin_virtualenv</build_depend>
<build_depend>cmake_modules</build_depend>
<build_depend>cv_bridge</build_depend>
<build_depend>dynamic_reconfigure</build_depend>
Expand Down Expand Up @@ -127,5 +128,6 @@
<export>
<nodelet plugin="${prefix}/plugins/nodelet/libjsk_perception.xml"/>
<nodelet plugin="${prefix}/plugins/nodelet/libopencv_apps.xml"/>
<pip_requirements>requirements.txt</pip_requirements>
</export>
</package>
1 change: 1 addition & 0 deletions jsk_perception/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytesseract==0.3.6
6 changes: 6 additions & 0 deletions jsk_perception/requirements.txt.indigo
Original file line number Diff line number Diff line change
@@ -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
Empty file modified jsk_perception/scripts/check_cascadeclassifier.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/create_bof_dataset.py
100755 → 100644
Empty file.
Empty file.
Empty file modified jsk_perception/scripts/create_mls_correspondence.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/create_sift_dataset.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/install_learning_datasets.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/install_sample_data.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/install_test_data.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/install_trained_data.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/mls_matlab2opencv.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/opencv_traindata_rejector.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/sklearn_classifier_trainer.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/ssd_train_dataset.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/train_fcn.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/train_fcn_depth_prediction.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/train_mask_rcnn.py
100755 → 100644
Empty file.
Empty file modified jsk_perception/scripts/train_ssd.py
100755 → 100644
Empty file.

0 comments on commit d43870f

Please sign in to comment.