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

Additional Arguments to dynamic reconfigure callback.

$
0
0
(also posted as issue on dynamic reconfigure git, possibly not appropriate for there) I am trying to use dynamic configure to set some camera parameters. I would like to pass a pointer to the camera object into the callback, so that I can use it's methods for setting the camera values. Is it possible to pass additional arguments to the dynamic reconfigure callback? Callback: ``` void dr_callback(camera_node::dynamic_reconfig &parameters, uint32_t levels){ // set global object of parameters } ``` Binding: ``` dr_callback = boost::bind(dr_callback, _1, _2); dr_server.setCallback(dr_callback); ``` ideal callback: ``` void dr_callback_function(jai_camera_node::dynamic_reconfigConfig &parameters, uint32_t levels, cam_type *cam){ // use camera member functions to change values } ```

ros2.crystal Is there a rqt_configure like GUI in ROS2?

$
0
0
From what I have been reading, rqt_configure is no longer used as the dynamic reconfigure has been integrated to the parameter subsystem of ROS2. [Question:](https://answers.ros.org/question/301923/is-there-any-ros2-rep-like-rqt_configure-in-ros1/) I also read other [discussions](https://discourse.ros.org/t/rqt-in-ros2/6428) but I wanted to make sure that my understanding is correct. The dynamic reconfigure GUI is not currently supported in ROS2? The GUI is something that is being worked on and it will possibly be released at a later date? Is my understanding correct?

What is the /move_group/sense_for_plan/max_look_attempts param?

$
0
0
System: Ubuntu 16.04 / ROS Kinetic / Nuvo-5095GC-022 / Universal Robots UR10 Packages: freenect_stack, geometry2, libfreenect, perception_pcl, trac_ik, universal_robot, ur_modern_driver, rqt I've been looking at rqt in more depth and today stumbled across the dynamic reconfigure functionality. Under the move_group tab, it's possible to dynamically change a parameter called max_look_attempts that i haven't seen before. The gui looks like the below: ![image description](/upfiles/15512144145887722.png) What is the function of max_look_attempts? Changing the value whilst running a node to move the robot doesn't result in any obvious difference that i can see, despite me having an octomap running and the robot traversing obstacles every now and again. Is it a kind of pseudo-continuous collision checking?

Access dynamic_reconfigure levels from C++ code

$
0
0
Hello, I am playing with `dynamic_reconfigure` and I was wandering how to properly get the level associated to a specific parameter. Say my configuration is something like: ... gen = ParameterGenerator() gen.add("foo", int_t, 1, "Param 1", 0, 0, 10) gen.add("bar", int_t, 2, "Param 2", 0, -10, 10) ... Then, in my reconfigure callback, I would like to do something only if a specific parameter changed, eg: void callback(pkg::ExampleConfig& conf, uint32_t level) { // if foo has be updated, do something terrible if(level & 1) startArmageddon(); } My concern is that the level of `foo` might be changed later, and therefore the code above is not quite robust since I manually wrote the `1` in the condition `if(level & 1)`. I tried to inspect a little the code generated for the Config class, and the only solution I came up with is to manually build a dictionary { param_name : level } at startup, eg: int main() { ... map lvls; auto p = pkg::ExampleConfig::__getParamDescriptions__(); for(const auto& param : p) lvls[p->name] = p->level; ... } void callback(...) { // if foo has be updated, do something terrible if(level & lvl.at("foo")) startArmageddon(); } It seems better in my opinion, but I have to generate the dictionary and rely on the name of the parameter... So after this long explanation: does anyone know a better way to use get the levels declared in the Config file? Thanks in advance!

Dynamically reconfigure the inflation radius

$
0
0
Hi y'all, I've been dealing with this issue for a while now and I just can't quite seem to get anywhere with it. I'd like to dynamically reconfigure the robot's inflation radius without using the rqt_reconfigure gui. I'd like to be able to send the robot a message if it's velocity drops below a certain limit, and lower the inflation radius. I understand that this will also make the robot more likely to bump into objects, so this is just in case the robot gets trapped. I'm using ROS Indigo, Thanks for reading!!

CMake Error: File /cmake/setup_custom_pythonpath.sh.in does not exist.

$
0
0
I have the following lines in my CMakeLists.txt and I am not able to use `catkin_make`. generate_dynamic_reconfigure_options( config/dyn_reconf.cfg ) The full error message: CMake Error: File /cmake/setup_custom_pythonpath.sh.in does not exist. CMake Error at /opt/ros/melodic/share/dynamic_reconfigure/cmake/dynamic_reconfigure-macros.cmake:42 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): ../project/CMakeLists.txt:94 (generate_dynamic_reconfigure_options) Here is my `dyn_reconf.cfg`: #!/usr/bin/env python PACKAGE = "project" from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() gen.add("Resizing Factor", double_t, 0, "A float parameter to make the original image's resolution", 0.3) gen.add("Hough Circle Upper Threshold", int_t, 0, "One of the Hough parameters", 100) gen.add("Hough Circle Lower Threshold", int_t, 0, "One of the Hough parameters", 30) gen.add("Hough Circle Min Radius", int_t, 0, "One of the Hough parameters", 10) gen.add("Hough Circle Max Radius", int_t, 0, "One of the Hough parameters", 30) exit(gen.generate(PACKAGE, "project", "dyn_reconf")) and this is how I imported it: from dynamic_reconfigure.server import Server from dyn_reconf.cfg import dyn_reconf **EDIT:** Adding the rest of `CMakeLists.txt`: **EDIT2:** Updated `CMakeLists.txt`: cmake_minimum_required(VERSION 2.8.3) project(project) find_package(catkin REQUIRED COMPONENTS image_geometry rospy sensor_msgs std_msgs dynamic_reconfigure ) generate_dynamic_reconfigure_options( config/dyn_reconf.cfg ) catkin_package( CATKIN_DEPENDS image_geometry rospy sensor_msgs std_msgs dynamic_reconfigure ) include_directories( ${catkin_INCLUDE_DIRS} ) add_dependencies(project ${${PROJECT_NAME}_EXPORTED_TARGETS})
Viewing all 126 articles
Browse latest View live


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