diff --git a/clover/CMakeLists.txt b/clover/CMakeLists.txt
index d779e5f7..eb1b39a7 100644
--- a/clover/CMakeLists.txt
+++ b/clover/CMakeLists.txt
@@ -24,6 +24,7 @@ find_package(catkin REQUIRED COMPONENTS
tf2_ros
image_transport
cv_bridge
+ catkin_virtualenv
)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
@@ -132,6 +133,16 @@ generate_messages(
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
+
+# Generate the virtualenv
+catkin_generate_virtualenv(INPUT_REQUIREMENTS requirements.in)
+
+# Make sure your python executables are installed using `catkin_install_python`:
+catkin_install_python(
+ PROGRAMS
+ src/selfcheck.py
+ DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
+
catkin_package(
# INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
@@ -248,11 +259,8 @@ target_link_libraries(${PROJECT_NAME}
# )
## Mark other files for installation (e.g. launch and bag files, etc.)
-# install(FILES
-# # myfile1
-# # myfile2
-# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
-# )
+ install(FILES requirements.in
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
# Only install udev rules when building a Debian package
# FIXME: Other operating systems may have other prefixes
diff --git a/clover/package.xml b/clover/package.xml
index cc4e720e..70374480 100644
--- a/clover/package.xml
+++ b/clover/package.xml
@@ -15,6 +15,7 @@
+ catkin_virtualenv
message_generation
roscpp
rospy
@@ -38,6 +39,7 @@
web_video_server
tf2_web_republisher
python-lxml
+ ros_pytest
@@ -46,5 +48,6 @@
+ requirements.in
diff --git a/clover/requirements.in b/clover/requirements.in
new file mode 100644
index 00000000..5a19b343
--- /dev/null
+++ b/clover/requirements.in
@@ -0,0 +1,13 @@
+click>=7.1.2
+docopt>=0.6.2
+flask>=1.1.1
+future>=0.18.2
+geopy>=1.11.0
+itsdangerous>=1.1.0
+jinja2>=2.11.3
+lxml>=4.6.3
+markupsafe>=1.1.1
+pymavlink>=2.4.14
+smbus2>=0.3.0
+vl53l1x>=0.0.5
+werkzeug>=1.0.1
diff --git a/clover/requirements.txt b/clover/requirements.txt
deleted file mode 100644
index 81d0fda6..00000000
--- a/clover/requirements.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-flask==1.1.1
-docopt==0.6.2
-geopy==1.11.0
-smbus2==0.3.0
-VL53L1X==0.0.5