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

dynamic reconfigure specific directory

$
0
0
Using generate_dynamic_reconfigure_options(ros/config/params.cfg) in my `CMakeLists.txt` of a package, some strange directories within the package are created and I don't know why. Here is my structure before a build (top level is the catkin workspace with the toplevel CMakeLists.txt). ├── CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake └── src └── pack_template ├── CMakeLists.txt ├── library │   ├── include │   │   └── lib.hpp │   └── src │   └── lib.cpp ├── package.xml └── ros ├── config │   └── params.cfg ├── include │   └── template │   └── template.hpp └── src └── template.cpp I then use `catkin build` with this CMakeLists.txt cmake_minimum_required(VERSION 2.8.3) project(pack_template) add_compile_options(-std=c++11) find_package(catkin REQUIRED roscpp rospy std_msgs dynamic_reconfigure ) generate_dynamic_reconfigure_options( ros/config/params.cfg ) catkin_package( LIBRARIES ${PROJECT_NAME} CATKIN_DEPENDS std_msgs ) include_directories( include ros/include library/include ${catkin_INCLUDE_DIRS} cfg/cpp ${Boost_INCLUDE_DIRS} ) add_library(${PROJECT_NAME} STATIC library/src/lib.cpp ) add_executable(${PROJECT_NAME}_node ros/src/template.cpp ) set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME "example_node" PREFIX "") add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ) target_link_libraries(${PROJECT_NAME}_node ${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARY_DIR} ) and my folder structure after a build looks (deleted some hopefully uninteresting things) ├── build │   ├── (...) ├── CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake ├── devel │   ├── env.sh -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/env.sh │   ├── etc │   │   └── (...) │   ├── include │   ├── lib │   │   ├── libpack_template.a -> ~/catkin/dynamic_reconfigure_test/devel/.private/pack_template/lib/libpack_template.a │   │   ├── pack_template │   │   │   └── example_node -> ~/catkin/dynamic_reconfigure_test/devel/.private/pack_template/lib/pack_template/example_node │   │   ├── pkgconfig │   │   │   ├── catkin_tools_prebuild.pc -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/lib/pkgconfig/catkin_tools_prebuild.pc │   │   │   └── pack_template.pc -> ~/catkin/dynamic_reconfigure_test/devel/.private/pack_template/lib/pkgconfig/pack_template.pc │   │   └── python2.7 │   │   └── dist-packages │   │   └── pack_template │   │   ├── cfg │   │   │   └── __init__.py -> ~/catkin/dynamic_reconfigure_test/devel/.private/pack_template/lib/python2.7/dist-packages/pack_template/cfg/__init__.py │   │   └── __init__.py -> ~/catkin/dynamic_reconfigure_test/devel/.private/pack_template/lib/python2.7/dist-packages/pack_template/__init__.py │   ├── setup.bash -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/setup.bash │   ├── setup.sh -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/setup.sh │   ├── _setup_util.py -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/_setup_util.py │   ├── setup.zsh -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/setup.zsh │   └── share │   ├── catkin_tools_prebuild │   │   └── cmake │   │   ├── catkin_tools_prebuildConfig.cmake -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/share/catkin_tools_prebuild/cmake/catkin_tools_prebuildConfig.cmake │   │   └── catkin_tools_prebuildConfig-version.cmake -> ~/catkin/dynamic_reconfigure_test/devel/.private/catkin_tools_prebuild/share/catkin_tools_prebuild/cmake/catkin_tools_prebuildConfig-version.cmake │   └── pack_template │   └── cmake │   ├── pack_templateConfig.cmake -> ~/catkin/dynamic_reconfigure_test/devel/.private/pack_template/share/pack_template/cmake/pack_templateConfig.cmake │   └── pack_templateConfig-version.cmake -> ~/catkin/dynamic_reconfigure_test/devel/.private/pack_template/share/pack_template/cmake/pack_templateConfig-version.cmake ├── logs │   ├── (...) └── src └── pack_template ├── cfg │   └── cpp │   └── pack_template │   └── templateConfig.h ├── CMakeLists.txt ├── docs │   ├── templateConfig.dox │   ├── templateConfig-usage.dox │   └── templateConfig.wikidoc ├── library │   ├── include │   │   └── lib.hpp │   └── src │   └── lib.cpp ├── package.xml ├── ros │   ├── config │   │   └── params.cfg │   ├── include │   │   └── template │   │   └── template.hpp │   └── src │   └── template.cpp └── src └── pack_template ├── cfg │   ├── __init__.py │   └── templateConfig.py └── __init__.py Is there a way to define a target location to create these directories? I want them 1. to be created in the subfolder `ros`, where all my ros dependent things are. 2. the paramsConfig.h should go to `ros/include` not in `src` Edit: There was a mistake in my original post, I edited the package structure. My plan was to put all ros-dependent stuff in `package_main/ros/`, hence there are an include and src directory. Second my ros-independent code should go to `package_main/library` src and include. Unfortunately by using the dynamic_reconfigure command ros creates the two directories `package_main/cfg` and `package_main/src`. Both is a bit awkward to me, since one may expect the `*.cfg` file in the `cfg` directory and the sources in the `src` directory. Edit 2: Output of tree for better readability Edit 3: Since it seems to be more complex, I created a minimal example, and edited respectively.

Viewing all articles
Browse latest Browse all 126

Trending Articles



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