ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How do I make catkin_make check for required python modules?

asked 2016-08-17 15:53:44 -0500

travisariggs gravatar image

I would like for catkin_make to fail if a fellow developer does not have all of the required python modules installed. I thought that I could do this using the package.xml manifest, but I may just be doing something wrong.

I would like to make sure that another developer has the python "requests" module installed on their system, but it could be any other non-standard python module from apt-get or pip.

Am I on the right track? Should I try to add something to CMakeLists.txt to get this behavior?

Here's a snippet of my package.xml file:

<?xml version="1.0"?>
<package>
  <name>awesome</name>
  <buildtool_depend>catkin</buildtool_depend>

  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>actionlib</build_depend>

  <run_depend>rospy</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>actionlib</run_depend>
  <run_depend>roslib</run_depend>

  <run_depend>os</run_depend>
  <run_depend>sys</run_depend>
  <run_depend>json</run_depend>
  <run_depend>yaml</run_depend>
  <run_depend>uuid</run_depend>
  <run_depend>boto3</run_depend>
  <run_depend>zipfile</run_depend>
  <run_depend>threading</run_depend>
  <run_depend>requests</run_depend>
</package>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-08-18 03:48:56 -0500

mgruhler gravatar image

AFAIK, you cannot do this via catkin_make. You can however check with rosdep check <PACKAGE_NAME> if all packages are installed, or install them via rosdep install <PACKAGE_NAME>. The -v flag turns on verbose output.

Note, however, that in the package.xml you need to have the respective rosdep keys, which are defined (here)[https://github.com/ros/rosdistro/blob/master/rosdep/python.yaml]. Many of the modules you specified are available in the python standard library, thus you probably would not need to specify those.

For the requests module, you have to specify python-requests which gets resolved via rosdep for the different distributions.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-08-17 15:53:44 -0500

Seen: 303 times

Last updated: Aug 18 '16