Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed build no ddynamic_reconfigure #906

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ddynamic_reconfigure/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*~
*user
140 changes: 140 additions & 0 deletions ddynamic_reconfigure/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package ddynamic_reconfigure
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.2.1 (2019-08-28)
------------------
* Merge branch 'fix-double-comparison' into 'erbium-devel'
Fix double comparison
See merge request control/ddynamic_reconfigure!14
* Fix double comparison
* Add BSD License text
* Contributors: Victor Lopez

0.2.0 (2019-03-21)
------------------
* Merge branch 'refactor-functions' into 'erbium-devel'
Accept functions callback per individual variable
See merge request control/ddynamic_reconfigure!12
* Extend readme
* Add string and cleanup implementation
* Add enums and callbacks
* Accept functions callback per individual variable
* Contributors: Victor Lopez

0.1.7 (2019-03-20)
------------------
* Merge branch 'fix-gmock-dependency' into 'erbium-devel'
Rename gmock dependency for public release
See merge request control/ddynamic_reconfigure!11
* Rename gmock dependency for public release
* Contributors: Victor Lopez

0.1.6 (2018-12-11)
------------------
* Merge branch 'ddr_debug_msg' into 'erbium-devel'
changed info msg to debug
See merge request control/ddynamic_reconfigure!10
* changed info msg to debug
* Change license to BSD
* Remove internal build system link
* Contributors: Hilario Tome, Victor Lopez

0.1.5 (2018-10-09)
------------------
* Merge branch 'fix-test' into 'erbium-devel'
Fix test
See merge request control/ddynamic_reconfigure!9
* Fix comment regarding spin_thread
* Fix failing test due to removal of spin_thread
* Contributors: Victor Lopez

0.1.4 (2018-09-17)
------------------
* Merge branch 'fix-spammy' into 'erbium-devel'
Only publish when variables has changed
See merge request control/ddynamic_reconfigure!8
* Only publish when variables has changed
* Contributors: Hilario Tome, Victor Lopez

0.1.3 (2018-09-14)
------------------
* Reduce update frequency to 10second
* Contributors: Victor Lopez

0.1.2 (2018-09-12)
------------------
* Merge branch 'add-auto-publish' into 'erbium-devel'
Add auto publish of updates values to ddynamic_reconfigure
See merge request control/ddynamic_reconfigure!7
* Add auto publish of updates values to ddynamic_reconfigure
* Contributors: Hilario Tome, Victor Lopez

0.1.1 (2018-07-26)
------------------
* Merge branch 'fix-test-crash' into 'erbium-devel'
Fix test crash
See merge request control/ddynamic_reconfigure!6
* Fix uninitialized variables
* Use gmock properly
* fixed merge request
* fixed merge
* Fix service response
* Contributors: Hilario Tome, Victor Lopez

0.1.0 (2018-01-15)
------------------
* formating
* made private unnecesary functions
* Merge branch 'dubnium-devel' of gitlab:control/ddynamic_reconfigure into dubnium-devel
* Formating
* Add new file
* Contributors: Hilario Tome

0.0.5 (2016-04-14)
------------------
* Merge branch 'user-callback' into 'dubnium-devel'
User callback
Remember that we have to re release everyone who depends on this since it breaks API.
See merge request !1
* Add test for double param
* Add hack to have namespaced DdynamicReconfigure, for easier migration
* Add user callback and unit tests
* Migrate package to format 2
* Contributors: Hilario Tome, Victor Lopez

0.0.4 (2016-03-07)
------------------
* Added destructor, fixed bug
* Added to dynamic reconfigure to parse from param server the initial value if it is availlable
* Contributors: Hilario Tome

0.0.3 (2015-06-10)
------------------
* Added license and documentation
* Contributors: Hilario Tome

0.0.2 (2015-05-25)
------------------
* Added min and max value specification when registering a variable
* Contributors: Hilario Tome

0.0.1 (2015-01-26)
------------------
* fix author, mantainer
* move ddynamic reconfigure to standalone repo
* Prepare ddynamic_reconfigure for standalone package
* Added safe header
* Added test folder
* Fixed a bug when generating the config description, the int vector was being used in the bool part
* Added typedef for ddreconfigure
* Bug fix, now the parameters can be seen in dynamic reconfigure even if they have changed from c++
* Updated DDynamic reconfigure to published updated values persistently
* Added working momentum task
* Fixed bug, wrong return statement
* Fixed export
* Fixed bug in ddynamic reconfigure and its CmakeFile
* Minor changes to add the abstract reference to the goto dynamic tasks
* Dynamics wbc is working again (Really slowly with uquadprog) visualization of torques and partially of forces (also partial force integration)
* Added DDyanmic_reconfigure package, a way to have dynamic reconfigure functionality without a cfg
* Contributors: Hilario Tome, Luca Marchionni
45 changes: 45 additions & 0 deletions ddynamic_reconfigure/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cmake_minimum_required(VERSION 2.8.3)
project(ddynamic_reconfigure)

find_package(catkin REQUIRED COMPONENTS
dynamic_reconfigure
roscpp
)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")

catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS roscpp dynamic_reconfigure
)

include_directories(
include
${catkin_INCLUDE_DIRS}
)

add_library(${PROJECT_NAME} src/ddynamic_reconfigure.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
#add_executable(dynamic_reconfigure_node src/dynamic_reconfigure_node.cpp)
#target_link_libraries(dynamic_reconfigure_node ${catkin_LIBRARIES})

#make sure configure headers are built before any node using them
#add_dependencies(dynamic_reconfigure_node ${PROJECT_NAME}_gencfg)

############# Test #################
add_executable(fake_dynamic_reconfigure_server test/fake_dynamic_reconfigure_server.cpp)
target_link_libraries(fake_dynamic_reconfigure_server ${PROJECT_NAME} ${catkin_LIBRARIES})

add_executable(test_bool_dynamic_reconfigure_server test/test_bool_dynamic_reconfigure_server.cpp)
target_link_libraries(test_bool_dynamic_reconfigure_server ${PROJECT_NAME} ${catkin_LIBRARIES})

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
85 changes: 85 additions & 0 deletions ddynamic_reconfigure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#ddynamic_reconfigure

The ddynamic_reconfigure package is a C++ extension of [dynamic_reconfigure](https://github.com/ros/dynamic_reconfigure) that allows modifying parameters of a ROS node using the dynamic_reconfigure framework without having to write cfg files.

## Usage

Modifying in place a variable:
```cpp
#include <ros/ros.h>
#include <ddynamic_reconfigure/ddynamic_reconfigure.h>

int main(int argc, char **argv) {
// ROS init stage
ros::init(argc, argv, "ddynamic_tutorials");
ros::NodeHandle nh;
ddynamic_reconfigure::DDynamicReconfigure ddr;
int int_param = 0;
ddr.registerVariable<int>("int_param", &int_param, "param description");
ddr.publishServicesTopics();
// Now parameter can be modified from the dynamic_reconfigure GUI or other tools and the variable int_param is updated automatically

int_param = 10; //This will also update the dynamic_reconfigure tools with the new value 10
ros::spin();
return 0;
}
```

Modifying a variable via a callback:
```cpp
#include <ros/ros.h>
#include <ddynamic_reconfigure/ddynamic_reconfigure.h>

int global_int;

void paramCb(int new_value)
{
global_int = new_value;
ROS_INFO("Param modified");
}

int main(int argc, char **argv) {
// ROS init stage
ros::init(argc, argv, "ddynamic_tutorials");
ros::NodeHandle nh;
ddynamic_reconfigure::DDynamicReconfigure ddr;

ddr.registerVariable<int>("int_param", 10 /* initial value */, boost::bind(paramCb, _1), "param description");
ddr.publishServicesTopics();
// Now parameter can be modified from the dynamic_reconfigure GUI or other tools and the callback is called on each update
ros::spin();
return 0;
}
```

Registering an enum:

```cpp

#include <ros/ros.h>
#include <ddynamic_reconfigure/ddynamic_reconfigure.h>

int main(int argc, char **argv) {
// ROS init stage
ros::init(argc, argv, "ddynamic_tutorials");
ros::NodeHandle nh;
ddynamic_reconfigure::DDynamicReconfigure ddr;

std::map<std::string, std::string> enum_map = {{"Key 1", "Value 1"}, {"Key 2", "Value 2"}};
std::string enum_value = enum_map["Key 1"];
ddr.registerEnumVariable<std::string>("string_enum", &enum_value,"param description", enum_map);
ddr.publishServicesTopics();
ros::spin();
return 0;
}
```

## Issues
### Undefined reference to registerVariable or registerEnumVariable

These methods are templated, but the implementation is hidden, and there are explicit template instantiations for `int`, `bool`, `double` and `std::string`. If you are getting an undefined reference to one of these methods, make sure that you are passing parameters of this type.





Loading