0
$\begingroup$

I have a package with 2 python library dependencies: serial, and utm, but I am running into issues with installing these packages automatically. If I do rosdep install --from-paths src it works just fine

I have added their rosdep names (found here) to my packages.xml (see the end of this post), but even after running catkin-make and trying to run the module, the script throws a ModuleNotFound exception at the UTM package meaning that the package was never installed.

These are the tutorials/instructions I am following but I think I am missing something; do I need to change something in the CMakeLists file?

My package.xml file:

<?xml version="1.0"?>
<package format="2">
  <name>gps_driver</name>
  <version>0.0.0</version>
  <description>The gps_driver package</description>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>message_generation</build_depend>
  <build_export_depend>roscpp</build_export_depend>
  <build_export_depend>rospy</build_export_depend>
  <build_export_depend>std_msgs</build_export_depend>
  <exec_depend>roscpp</exec_depend>
  <exec_depend>rospy</exec_depend>
  <exec_depend>std_msgs</exec_depend>
  <exec_depend>python-utm-pip</exec_depend>
  <exec_depend>python3-serial</exec_depend>
  <exec_depend>message_runtime</exec_depend>

  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- Other tools can request additional information be placed here -->

  </export>
</package>
$\endgroup$
1
  • $\begingroup$ Please edit your question to show what you are doing to setup your environment before you run. And before your get into seeing if your code is right you should make sure that the packages did actually install with something like pip freeze. Adding those details to your question would be helpful. $\endgroup$
    – Tully
    Sep 23, 2023 at 18:54

1 Answer 1

1
$\begingroup$

If you are building from source code, there is no mechanism to "automatically" install dependencies onto your computer. Most people will use rosdep install ..., as you have already figured out.

Of course, if you install a ros package from a binary apt repository, the run-time dependencies are handled by that tool.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.