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

Problems of migration from dry package to wet package

asked 2014-06-10 07:23:00 -0500

loulou0219 gravatar image

updated 2014-06-12 00:15:09 -0500

Hi,

I met a problem of migration from dry package (rosbuild) to wet package(catkin)..I'd like to know 2 things..

1 - The problems are about the .h files come from msg files.

I did:

add_message_files(
  FILES
    Message1.msg
    Message2.msg
)
generate_messages(
   DEPENDENCIES
     std_msgs
 )
catkin_package(
  CATKIN_DEPENDS
    message_runtime
)

and in package.xml add dependency too..need i add some things like Include_library(xx)? the .h files is in a directory named "msg_gen" some thing like a generation directory...

2 - How to use pcl package in dry package: Because i want use pcl in a ROS dry package, but i found only the indice of configuration for wet packages. So i tied to migration dry package to wet package.

Thank you for help....

New :

I adjust most of my problems with your help, but there is always a problem rest..this is part of my CMakeList.txt

     find_package(catkin REQUIRED COMPONENTS
    message_generation
      pcl_ros
      roscpp
      rospy
       std_msgs 
       tf 
       sensor_msgs 
      geometry_msgs 
       nav_msgs 
       std_srvs 
    )
    find_package(PCL REQUIRED)

    add_message_files(FILES 
    aaa.msg
    bbb.msg
    ccc.msg
ddd.msg
    )
     add_service_files(FILES
     Test.srv
    BaseStop.srv
    ttt.srv
     )
     generate_messages(
       DEPENDENCIES
       std_msgs
    sensor_msgs  
     )
    catkin_package(
      CATKIN_DEPENDS
    message_runtime
     pcl_ros
     roscpp
      rospy
       std_msgs 
       tf 
       sensor_msgs 
      geometry_msgs 
       nav_msgs 
       std_srvs 
      DEPENDS system_lib 
    )

    include_directories(
      ${catkin_INCLUDE_DIRS}${PCL_INCLUDE_DIRS} include
    )

    add_library(libdxl src/dynamixel_sdk/src/dxl_hal.c)
    add_library(dynamixel src/dynamixel_sdk/src/dynamixel.c)
    target_link_libraries(dynamixel libdxl)


    add_library(ardu_instructions_lib src/driver/ardu_instructions.cpp)
    add_library(duino_driver_lib src/driver/duino_driver.cpp)
    target_link_libraries(duino_driver_lib ardu_instructions_lib)

    add_library(servos_lib src/servos.cpp)
    target_link_libraries(servos_lib dynamixel libdxl)

    add_library(base_controller_lib src/controllers/base_controller.cpp)
    add_library(aaa_controller_lib src/controllers/battery_controller.cpp)
    add_library(bbb_controller_lib src/controllers/joint_controller.cpp)
    target_link_libraries(bbb_controller_lib servos_lib)
    add_library(ccc_controller_lib src/controllers/ccc_controller.cpp)
    add_library(ddd_controller_lib src/controllers/ddd_controller.cpp)

    add_executable(ardu  src/ardu.cpp)
    target_link_libraries(ardu  duino_driver_lib base_controller_lib aaa_controller_lib bbb_controller_lib ccc_controller_lib ddd_controller_lib  pthread dynamixel libdxl ${catkin_LIBRARIES}${PCL_LIBRARIES})

    add_dependencies(libdxl ${catkin_EXPORTED_TARGETS})
    add_dependencies(dynamixel ${catkin_EXPORTED_TARGETS})
    add_dependencies(ardu_instructions_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(duino_driver_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(servos_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(base_controller_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(aaa_controller_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(bbb_controller_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(ccc_controller_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(ddd_controller_lib ${catkin_EXPORTED_TARGETS})
    add_dependencies(ardu ${catkin_EXPORTED_TARGETS})

and part of my package.xml:

.....................
  <build_depend>pcl_ros</build_depend>
  <build_depend>pcl_msg</build_depend>
      <build_depend>message_generation</build_depend>
      <build_depend>roscpp</build_depend>
    <build_depend>rospy</build_depend>
    <build_depend>std_msgs</build_depend>
    <build_depend>tf</build_depend>
    <build_depend>sensor_msgs</build_depend>
    <build_depend>geometry_msgs</build_depend>
    <build_depend>nav_msgs</build_depend>
    <build_depend>std_srvs</build_depend>
     <build_depend>libpcl-all-dev</build_depend>
      <!-- <build_depend version_gte="1.7.0">pcl</build_depend>-->

      <!--<run_depend version_gte="1.7.0">pcl</run_depend>-->
     <run_depend>libpcl-all</run_depend>
      <run_depend>std_srvs</run_depend>
      <run_depend>nav_msgs</run_depend>
      <run_depend>geometry_msgs</run_depend>
      <run_depend>sensor_msgs</run_depend>
      <run_depend>tf</run_depend>
      <run_depend>std_msgs</run_depend>
      <run_depend>rospy</run_depend>
    <run_depend>pcl_ros</run_depend>
 <run_depend>pcl_msg</run_depend>
      <run_depend>roscpp</run_depend>
    <run_depend>message_runtime</run_depend>

The system can't find always the BaseStop.h..but it can find the aaa.h or ddd.h in the same condition.. I'm so confused..

edit retag flag offensive close merge delete

Comments

For question 2, you should be able to use PCL from a dry package. If you want to do that, please open a new question, providing information about what you did and what went wrong.

joq gravatar image joq  ( 2014-06-10 16:32:19 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2014-06-10 16:37:07 -0500

joq gravatar image

I agree with @gvdhoom that pending a better description of your exact error, the likely problem is one or more missing add_dependencies() commands for various build targets.

Additional documentation related to this question:

edit flag offensive delete link more
1

answered 2014-06-10 07:43:01 -0500

gvdhoorn gravatar image

updated 2014-06-11 01:39:44 -0500

need i add some things like Include_library(xx)? the .h files is in a directory named "msg_gen" some thing like a generation directory...

Regarding issue 1: you don't give any specific errors you are encountering, but no, the message headers are header only, so no linking is required.

I suspect you are getting errors telling you that your generated headers cannot be found when compiling the nodes that include them: if that is the case, then you are missing a add_dependencies(TARGET dep), where dep is the message generation target for a specific language (or all of them). Example (with the messages in the same package as the node that uses them):

add_dependencies(foo foo_generate_messages_cpp)

See also:

edit flag offensive delete link more
0

answered 2014-06-11 00:52:17 -0500

loulou0219 gravatar image

Thanks all for your help!!..I just tried to use add_dependencies(), it was exactely my problem...it worked for most of the problems..but i think i can do it....

so back to the 2nd issus:

I don't even know what met i use in the manifest.xml files.. <depend package="pcl_conversions"/>? or <depend package="pcl"/>? if i use pcl, the system can't find the pcl path..

edit flag offensive delete link more

Comments

@loulou0219: a bit pendantic, but could you please not use answers as if it were a forum? Please update your original question with new details, or open a new one.

gvdhoorn gravatar image gvdhoorn  ( 2014-06-11 01:39:13 -0500 )edit

In this case, better to open a new one. Also, if your original question was answered, please press the check mark icon.

joq gravatar image joq  ( 2014-06-11 09:54:46 -0500 )edit

hi joq and gvdhoorn, I opened a new question about that..i have not problem specific, just i found the indice to follow...thanks.. http://answers.ros.org/question/173337/how-to-use-pcl-package-in-dry-package/

loulou0219 gravatar image loulou0219  ( 2014-06-11 22:31:31 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-06-10 07:23:00 -0500

Seen: 373 times

Last updated: Jun 12 '14