Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 98

Why can I import from a package which is not part of my dependencies?

$
0
0
I created a ROS package, `my_package`, with dependencies `rospy` and `geometry_msgs`. Then I created a Python script, `my_script.py`, (which is located under `src`) for `my_package`. To my surprise, in `my_script.py`, I can import from the package `turtlesim`, like `from turtlesim.msg import Pose`, without getting errors. So, `turtlesim` seems to be part of my dependencies. Why is that? If execute the following command on the terminal `rospack depends my_package`, the output is the following: cpp_common rostime roscpp_traits roscpp_serialization catkin genmsg genpy message_runtime std_msgs geometry_msgs gencpp geneus gennodejs genlisp message_generation rosbuild rosconsole rosgraph_msgs xmlrpcpp roscpp rosgraph ros_environment rospack roslib rospy which does not include `turtlesim`.

Viewing all articles
Browse latest Browse all 98

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>