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

bear234's profile - activity

2022-04-18 05:36:25 -0500 received badge  Famous Question (source)
2021-05-21 15:10:30 -0500 received badge  Popular Question (source)
2021-05-21 15:10:30 -0500 received badge  Notable Question (source)
2021-02-20 05:05:48 -0500 marked best answer How do package.xml and CMakeLists.txt work

As we know, each ROS package contains these two files: package.xml and CMakeLists.txt.

I don't understand exactly how they works together.

For example, the package.xml of the package actionlib shows us that it depends on python-wxtools because it conains such a line:

<exec_depend>python-wxtools</exec_depend>

However, after reading the file CMakeLists.txt of the package actionlib, I don't see that it depends on python-wxtools. Here is the CMakeLists.txt of actionlib:

find_package(catkin REQUIRED COMPONENTS actionlib_msgs message_generation roscpp rosunit std_msgs)
find_package(Boost REQUIRED COMPONENTS thread)

include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})

catkin_python_setup()

add_action_files(DIRECTORY action FILES Test.action TestRequest.action TwoInts.action)
generate_messages(DEPENDENCIES actionlib_msgs std_msgs)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES actionlib
  CATKIN_DEPENDS actionlib_msgs message_runtime roscpp std_msgs
  DEPENDS Boost
)

add_library(actionlib src/connection_monitor.cpp src/goal_id_generator.cpp)
target_link_libraries(actionlib ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(actionlib actionlib_gencpp)

catkin_install_python(PROGRAMS tools/axclient.py tools/axserver.py tools/dynamic_action.py tools/library.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS ${PROJECT_NAME}
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  FILES_MATCHING PATTERN "*.h")

if(CATKIN_ENABLE_TESTING)
  find_package(rostest)
  add_subdirectory(test)
endif()
2020-12-03 10:54:56 -0500 received badge  Famous Question (source)
2020-07-14 14:41:42 -0500 received badge  Famous Question (source)
2020-06-10 15:17:17 -0500 received badge  Nice Question (source)
2020-05-05 05:08:44 -0500 received badge  Famous Question (source)
2020-05-03 05:08:54 -0500 received badge  Famous Question (source)
2020-04-23 11:32:13 -0500 received badge  Notable Question (source)
2020-04-23 11:32:13 -0500 received badge  Popular Question (source)
2019-11-06 05:47:18 -0500 received badge  Famous Question (source)
2019-10-25 07:59:41 -0500 received badge  Notable Question (source)
2019-08-29 22:39:42 -0500 received badge  Favorite Question (source)
2019-05-24 17:34:43 -0500 received badge  Famous Question (source)
2019-05-20 01:02:57 -0500 marked best answer How can I list the dependencies of a package

I've downloaded the ROS Base and some other ROS packages.

Also, I've followed the doc http://wiki.ros.org/kinetic/Installat... to install them.

Now I need to check which dependencies (so file) are used for each ROS package.

Is it possible?

2019-03-29 03:31:56 -0500 marked best answer How to specify my own OpenCV3 for cv_bridge

The ROS1 package cv_bridge can be downloaded here: https://github.com/ros-perception/vis... and be found at vision_opencv/cv_bridge.

I just checked its CMakeLists.txt and I found OpenCV3:

find_package(OpenCV 3 REQUIRED
  COMPONENTS
    opencv_core
    opencv_imgproc
    opencv_imgcodecs
  CONFIG
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES ${PROJECT_NAME}
  CATKIN_DEPENDS rosconsole sensor_msgs
  DEPENDS OpenCV
  CFG_EXTRAS cv_bridge-extras.cmake
)
catkin_python_setup()
include_directories(include ${Boost_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

The OpenCV3 by default is very huge so I want to use a custom one, which is smaller.

I put my own OpenCV3 at /opt/opencv3/ and there are only two directories: include and lib in it.

Now I want to tell the package cv_bridge to look for my own specific OpenCV3 so that I can remove the original OpenCV3 from the source of ROS.

Is it possible? How can I modify the CMakeLists.txt of cv_bridge?

2019-03-29 03:31:54 -0500 received badge  Nice Question (source)
2019-03-16 10:43:17 -0500 received badge  Famous Question (source)
2019-02-13 08:39:34 -0500 received badge  Famous Question (source)
2019-01-29 16:49:46 -0500 received badge  Notable Question (source)
2018-11-12 00:53:12 -0500 received badge  Famous Question (source)
2018-11-06 08:42:36 -0500 received badge  Famous Question (source)
2018-10-31 05:06:46 -0500 received badge  Famous Question (source)
2018-10-22 08:30:48 -0500 received badge  Notable Question (source)
2018-10-18 16:05:47 -0500 received badge  Notable Question (source)
2018-10-14 22:10:55 -0500 received badge  Popular Question (source)
2018-09-29 00:42:39 -0500 received badge  Famous Question (source)
2018-09-05 16:07:35 -0500 received badge  Notable Question (source)
2018-08-18 06:28:01 -0500 marked best answer How to catkin_make one package

I'm trying to install my custom ROS workspace from source.

What I've done is to download the source code of version of ros-kinetic-ros-base, then I add some additional packages into ros-base.

When I add one package, I always execute ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release to catkin_make all packages. This gonna take much time.

So I'm thinking if I can catkin_make only one package that I added because others have been installed before.

For example, here is the structure of my ros-base:

/home/ros/ |-----------src |-----------build_isolated |-----------devel_isolated |-----------install_isolated

As you see, all have been done correctly after executing ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release. Now I add a package named newPkg into ./src. To rebuild, I have to execute the command again, which will rebuild all packages.

So is it possible to catkin_make the only one package?

2018-08-18 06:28:00 -0500 received badge  Student (source)
2018-08-17 08:05:32 -0500 received badge  Notable Question (source)
2018-08-06 06:58:14 -0500 received badge  Notable Question (source)
2018-07-30 10:52:47 -0500 received badge  Notable Question (source)
2018-07-17 12:19:54 -0500 received badge  Famous Question (source)
2018-07-09 07:17:46 -0500 received badge  Famous Question (source)
2018-07-06 14:55:27 -0500 received badge  Notable Question (source)