Robotics StackExchange | Archived questions

ROS msg depends

I have two packages: inpub and insub

in inpub CmakeList.txt

find_package(catkin REQUIRED COMPONENTS
  insub
  roscpp
  rospy
  std_msgs)

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES inpub
# CATKIN_DEPENDS message_runtime
#  DEPENDS system_lib
)

include_directories(
  ${catkin_INCLUDE_DIRS}
)

in .xml

<buildtool_depend>catkin</buildtool_depend>
<build_depend>rospy</build_depend>
<build_depend>insub</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_generation</build_depend>
<run_depend>rospy</run_depend>
<run_depend>insub</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>message_runtime</run_depend>

1) When I in inpub.py

import insub

A take error

File "/home/slavaglaps/two/src/test/scripts/inpub.py", line 6, in <module>
    import insub
ImportError: No module named insub

How can I import it correctly?

2) In the insub package I have inpub/msg/TwoInts.msg

How do I transfer this class? I also read in the documentation about a separate package for .msg. Can you talk more about this?

Asked by slavaglaps on 2017-04-19 07:09:35 UTC

Comments

Answers