diff --git a/sound_classification/CMakeLists.txt b/sound_classification/CMakeLists.txt index 3dafdddebd..19b346fe1f 100644 --- a/sound_classification/CMakeLists.txt +++ b/sound_classification/CMakeLists.txt @@ -29,10 +29,19 @@ catkin_package( message_runtime ) +if("$ENV{ROS_DISTRO}" STREQUAL "indigo" OR "$ENV{ROS_DISTRO}" STREQUAL "kinetic" OR + "$ENV{ROS_DISTRO}" STREQUAL "melodic" OR "$ENV{ROS_DISTRO}" STREQUAL "noetic") catkin_generate_virtualenv( PYTHON_INTERPRETER python2 INPUT_REQUIREMENTS requirements.in ) +else() +file(REMOVE requirements.txt) +catkin_generate_virtualenv( + PYTHON_INTERPRETER python3 + INPUT_REQUIREMENTS requirements.in.obase + ) +endif() file(GLOB SCRIPTS_FILES scripts/*.py) catkin_install_python( diff --git a/sound_classification/requirements.in.obase b/sound_classification/requirements.in.obase new file mode 100644 index 0000000000..6aab3c2c1a --- /dev/null +++ b/sound_classification/requirements.in.obase @@ -0,0 +1,3 @@ +chainer # For Python 2.x, chainer 5.x.x is needed, 7.0.0 will not work on Python2 +numpy<2.0 +cv_bridge