Hello everyone, I am learning about creating a dynamic reconfigure server and I just do not understand what the level value is and how it is useful. Could you please briefly explain it and give a simple example?
Thank you!
↧
level value in dynamic reconfigure
↧
Dynamic reconfigure default to infinity
Hi, I want to have a dynamic reconfigure server in my node, but I would like some of the parameters to default to infinity (instead of just a very large value). Is this possible?
Thanks!
↧
↧
Dynamic reconfigure and parameter namespaces in octomap_server
Hi, I'm improving the reconfigure server of the `octomap_server` package. However, I am facing the problem that some of the parameters have a name space: `sensor_model/max_range` for instance. In the reconfigure callback, this is not a huge problem as I added the following line to the `.cfg` file:
gen.add("max_range", double_t, 0, "Sensor maximum range", -1.0, -1.0, 100)
And in the reconfigure callback:
m_maxRange = config.max_range;
Therefore I can work with the reconfigure server as usual. However, if I load any parameter with rosparam or through a launch file, the loaded value will not match with the dynamic reconfigure value. Is there any way to properly _link_ the `max_range` parameter of the `.cfg` to the corresponding name in the parameter server, `sensor_model/max_range`?
Thank you.
↧
How to set the dynamic reconfigure min, max values programmatically?
Is there a way to change the dynamic reconfigure min max (and even default) values at run time?
The use case I have is that there are a set of cameras that a node can connect to with different min and max exposures, and I would like node to query the camera and get those values then have the server reflect them.
Just looking at http://wiki.ros.org/libuvc_camera it has dynamic reconfigure support but for things like width there is a huge zero to 2 billion range- the slider in the rqt node isn't going to be very useful for that control.
I've taken a cursory look at a header file generated from a cfg, I see __getMin__() and __getMax__() methods but no setters, and I see a FooBarConfigStatics() constructor that has the hard coded values generated from the python file.
↧
catkin_make error invoking j8 -8
when i run catkin_make i get the following error: invoking "make -j8 -l8"failed. can someone help?
This is what i get when i run catkin_make. I am very new to Ros
Generating dynamic reconfigure files from cfg/GeneralIO.cfg: /home/hand/workspace/devel/include/sr_ronex_drivers/GeneralIOConfig.h /home/hand/workspace/devel/lib/python2.7/dist-packages/sr_ronex_drivers/cfg/GeneralIOConfig.py
Generating dynamic reconfigure files from cfg/SPI.cfg: /home/hand/workspace/devel/include/sr_ronex_drivers/SPIConfig.h /home/hand/workspace/devel/lib/python2.7/dist-packages/sr_ronex_drivers/cfg/SPIConfig.py
../../catkin_generated/env_cached.sh: 16: exec: /home/hand/workspace/src/sr-ronex-indigo-devel/sr_ronex_drivers/cfg/GeneralIO.cfg: Permission denied
make[2]: *** [/home/hand/workspace/devel/include/sr_ronex_drivers/GeneralIOConfig.h] Error 126
make[2]: *** Waiting for unfinished jobs....
../../catkin_generated/env_cached.sh: 16: exec: /home/hand/workspace/src/sr-ronex-indigo-devel/sr_ronex_drivers/cfg/SPI.cfg: Permission denied
make[2]: *** [/home/hand/workspace/devel/include/sr_ronex_drivers/SPIConfig.h] Error 126
make[1]: *** [sr-ronex-indigo-devel/sr_ronex_drivers/CMakeFiles/sr_ronex_drivers_gencfg.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 5%] [ 5%] Built target sr_ronex_transmissions
[ 5%] Built target gtest
[ 5%] Built target nav_msgs_generate_messages_cpp
Built target nav_msgs_generate_messages_py
[ 5%] Built target nav_msgs_generate_messages_lisp
[ 5%] Built target _sr_edc_ethercat_drivers_generate_messages_check_deps_ActuatorInfo
[ 5%] Built target _sr_edc_ethercat_drivers_generate_messages_check_deps_MotorTrace
↧
↧
dynamic_reconfigure group defaults
I stumbled upon the not-quite-as-well-documented feature of [dynamic_reconfigure](http://wiki.ros.org/dynamic_reconfigure) [groups](http://wiki.ros.org/dynamic%20reconfigure/Reviews/7/1/11%20Groups%20API%20review%20API%20Review).
[As I understand](http://answers.ros.org/question/28327/dynamic-reconfigure-default-parameters/), whenever you set up a server, it should call the callback and initialize the config parameter with the values found in the cfg file. However, my groups are not being set to defaults, only my "bare" parameters are. If I change one of the group parameters, then the change takes effect.
Is there something I'm missing, or should I file a ticket?
(btw [this ticket](https://github.com/ros/dynamic_reconfigure/issues/47) mentions inconsistent behavior, but it's talking about states rather than defaults, so I'm not sure it's related.)
void dynamic_cb(pkgConfig &config, uint32_t){
a = Duration(config.a);
b1 = config.groups.b.part1;
b2 = config.groups.b.part2;
}
cfg file:
gen.add("a", double_t, 0, "a_description", 1, 0, 10000)
group = gen.add_group("b")
group.add("part1", double_t, 0, "b1", 3.0, 0.0, 10.0)
group.add("part2", double_t, 0, "b2", 3.0, 0.0, 10.0)
↧
Get dynamic reconfigure caller name
Hello,
I have some nodes which are reconfigurable using dynamic reconfigure. Some times some other node changes the parameters (and the behavior of the sensor which is dynamic reconfigurable) when it is not supposed to do so. Since the dynamic reconfigure calls are not saved in the rosbag I have no clue on who called the reconfiguration. Is there any way in the dynamic reconfigure callback that I can get the name of who called with the new parameters so I can print a ROS_INFO and get it in the logs? I know that a first solution would be to do the ROS_INFO where you call the dynamic reconfiguration, but some of this nodes are not programmed by me, so I need this in the dynamic reconfigure callback to be able to control it. For instance if instead of a dynamic reconfigure it is a normal service (the example is for the add two ints of the [service tutorial](http://wiki.ros.org/ROS/Tutorials/WritingServiceClient(c%2B%2B))) I do:
bool SomeClass::service_handle(rospy_tutorials::AddTwoInts::Request &req, rospy_tutorials::AddTwoInts::Response &res) { std::string caller = (*req.__connection_header)["callerid"]; ROS_INFO("%s: service_handle called from %s with req = (%d, %d)", _name.c_str(), caller.c_str(), static_castThank you!(req.a), static_cast (req.b)); // rest of code ....
↧
use dynamic reconfigure with arrays
Hello,
I want to use dynamic reconfiguration to modify an array in a ROS node, but I didn't found any example of how to modify the .cfg file on the web.
I want this line: gen.add("int_param", int_t, 0, "An Integer parameter", 50, 0, 100)
in something kind of: gen.add("int_array", int_t[2], 0, "An Integer array", [50 20], [0 0], [100 100])
Can someone help?
Thanks!
↧
Bi-directional dynamic_reconfigure
I have a few parameters that can be controlled either via dynamic_reconfigure, or via a subscriber, or by updating their value to the state of the hardware they act with.
One direction works well - when I set a value using dynparam or rqt_reconfigure, an action is commanded to the hardware and a parameter update is published automatically.
I want to know if there is a tutorial or at least guideline on how to deal with the other direction - something else (hw event, subscribed message) changes the state and I need the parameters to reflect it.
Obviously, using dynamic_reconfigure.client is not the right way to do it, because it would issue commands instead of just changing parameter values.
So I try publishing directly on `~/parameter_updates` and manually setting the parameter value on the parameter server, which somehow works, but still it seems quite unreliable and cumbersome.
Is there a better way to do it?
↧
↧
Request Update in Dynamic Reconfigure Tutorial
In ["Setting up Dynamic Reconfigure for a Node (Python")](http://wiki.ros.org/dynamic_reconfigure/Tutorials/SettingUpDynamicReconfigureForANode%28python%29) tutorial, on line 14 of server.py, "anonymous = True" should be removed so that the [client in the next tutorial](http://wiki.ros.org/dynamic_reconfigure/Tutorials/UsingTheDynamicReconfigurePythonClient) can find this server node to communicate.
I encountered this problem while going through the tutorial. I am just a beginner so if I make any mistake, feel free to correct me. Thanks!
↧
Multiple configurations from/to file with dynamic_reconfigure
**Background**
I am rather new to ROS and very new to this site. Hope I manage to provide enough info and explain my idea. I might very well be doing things in a wrong manner if this is the case then could you point me to a better path. I am using ROS Indigo on Ubuntu 14.04.3.
**What am I doing**
I am using a tool built on ROS that has tens of parameters I can change using `dynamic_reconfigure`. As I go along using the module I find a configuration that is of interest. I want to explore it in the future or let others see the same settings. So I write it in my project notes. When I return I will explore some of the configurations I have found - find them in my notes and apply them via `dynamic_reconfigure`.
**What I want to do**
I want to simplify my life in storing/loading the configurations from files. I know that I could change the package defaults and use rosmake/catkin but this does not seam feasible solution. I would imagine it to be something like a button that writes out the configuration at that particular moment and a command line option for loading custom default values. But I am not sure if that is the most ROS way to do it.
**What have I found**
I have done some googling but have not found a tool for doing this. I did find [this topic](http://answers.ros.org/question/217369/bi-directional-dynamic_reconfigure/) from answers.ros this indicates that there are at least some (undocumented) functions for handling similar info.
↧
Possible to shut off obstacle avoidance (husky)?
Hello ROS-community,
I have a problem you might help me figure out. I am using a husky to pick up certain objects, let's say these objects are boxes. I have a breadcrumb following navigation node that communicates with move_base to maneuver the environment and approach the box. The problem is that if i want to approach the box the husky will treat the box as an obstacle, thus trying to avoid it. Is it possible to "shut off" the obstacle avoidance, pickup the box, and power it on? I was reading this thread:
http://answers.ros.org/question/12276/is-there-a-c-api-for-a-dynamic-reconfigure-client/
And thinking there might be a parameter i could reconfigure during runtime. Another problem i have is that i want to be able to take the fastest path if in order to align the husky to the box properly. If i give a goal point to move_base that's behind the husky, i want it to go backwards. But at the same time if the goal point is in front of the husky, it should move forward. Is this a possible behavior using dynamic reconfigure?
Another think with dynamic reconfigure as the thread above: Is there a need to call some sort of update, in order for the new parameters to take place? I made a simple node like the thread above to reconfigure some move_base parameters but when i read them from the terminal they hadn't changed.
TLDR:
1) Is it possible to "shut off" and "power on" obstacle avoidance during runtime?
2) Is it possible to have a behaviour that takes fastest path possible, which goes backwards if needed, and switch to "normal" maneuvering behaviour during runtime?
3) Do I need to call some sort of update for my dynamically reconfigured parameters to take place?
Thanks in advance!
Wbr
Mattias
↧
dynamic_reconfigure with programatically filled enum?
Hey ROS gurus. I want to ask you for your opinions to a topic I recently thought about.
I'm writing a ROS&Python driver for a series of web cameras. There is a lot of variability in the specific models, including supported image resolutions.
Now I want to offer a dynamic_recofigure interface for setting (not only) video resolution. My basic thought was to filter a list of possible resolutions somehow to only publish the supported resolutions on `parameter_descriptions` (thus displaying only them in `rqt_reconfigure`).
But then I found out that even the set of possible resolutions is not bound and new resolutions may emerge with new camera models.
I have 2 ideas on what to do with that:
- alter `dynamic_reconfigure` and create another `edit_method` (that's lot of work, though)
- create my own implementation of `dynamic_reconfigure.Server`, which would read the allowed resolutions from somewhere and would publish the corresponding `parameter_descriptions`. In the `cfg` file I would probably create a dummy one-element enum in order not to stop existing tools from working.
I'm only concerned about this solution working from `dynamic_reconfigure` CLI, `rqt_reconfigure` and Python (ideally using the standard `Client`). I don't (yet) care about C++ clients.
Before I start working, could you please give me some feedback on how you like these ideas and what possible shortcomings do you see?
↧
↧
Dynamic_reconfigure's .cfg file synchronization with parameter's changes
Hello folks!
I'm wondering is there a simple way to update your .cfg file (used by dynamic_reconfigure tool) with the changes you make during program run? So that each time you restart roscore, the parameter's server uploads the latest changes you put via rqt_reconfigure, without manually updating your .cfg file.
I found similar question regarding Rosparam package without certain solutions. So maybe somebody came up with it for Dynamic_reconfigure pack?
I would appreciate if you can provide your solution with roscpp.
Thank you in advance!
↧
Dynamic parameters update from the code (cpp)
Hello, folks!
I am having trouble to update the dynamic parameters from c++ code. My first attempt was to follow [hokuyo_node tutorial](http://wiki.ros.org/hokuyo_node/Tutorials/UsingDynparamToChangeHokuyoLaserParameters#Using_dynparam_from_C.2B-.2B-_code). So I put this line in my code:
`system("rosrun dynamic_reconfigure dynparam set My_node My_param Value &");`
The **&** sign in the end was due to the information I print in my code. Without it the code stops. But when I started to test the code in Gazebo and invoked the command much often, processor load went to around 100% (without the line it worked on 40-50%). Maybe I need to invoke the command in another way?
Another solutions I found regarding my problem:
- [dynamic reconfigure: How explicity fetch data from parameter
server?](http://answers.ros.org/question/58820/dynamic-reconfigure-how-explicity-fetch-data-from-parameter-server/)
- [Bi-directional
dynamic_reconfigure](http://answers.ros.org/question/217369/bi-directional-dynamic_reconfigure/)
- [Notify changes to
dynamic_reconfigure](http://answers.ros.org/question/57498/notify-changes-to-dynamic_reconfigure/)
the solution presented in first two links didn't work for me (maybe because of my wrong initialization of dynamic_reconfigure::Server inside the class, I will put my code below). If I initialize dynamic_reconfigure::Server giving my node as an argument, nothing shows up in rqt_reconfigure.
The code from the last "Notify changes ... " was more similar to mine - it also based on classes, so It showed some work ability. But when I started rqt_reconfigure the parameter's values in my node were completely random and didn't change with my inputs.
Here is how my code look like:
**main**
int main(int argc, char * *argv)
{
ros::init(argc, argv, "flight_controller");
ros::NodeHandle my_node;
static My_class *class = new My_class(my_node);
}
**My_class**
class My_class
{
private:
ros::NodeHandle node;
dynamic_reconfigure::Server param_server;
dynamic_reconfigure::Server::CallbackType call_type;
public:
My_class(ros::NodeHandle &node_)
//,param_server(node) if this line uncomment, rqt_reconfigure doesn't see the node
{
node = node_;
call_type = boost::bind(&My_class::parametersCallback, this, _1, _2);
param_server.setCallback(call_type);
}
}
Thank you in advance for help!
↧
`rosmsg list` or `rosmsg show` equivalent for dynamic reconfigure?
Is there a way to list every dynamic reconfigure config on the system, and then show the config parameters for a specific one?
I was about to create a new cfg file for a project and was wondering if there was already a similar one in existence. This isn't a super compelling usage since there isn't a way to re-use cfg files inside other cfg files (though maybe that wouldn't be hard to add), I would either find something that works but if one parameter was missing I would have to cut and paste every gen.add into a new cfg.
It looks like `locate Config.h | grep opt` shows all the reconfigure files installed into opt, but the autogenerated headers aren't very readable.
↧
Catkin_make a package with dynamic_reconfigure for Python node
I'm struggling compiling a catkin package with a Python node using dynamic_reconfigure.
This is my CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(motors)
find_package(catkin REQUIRED COMPONENTS
rospy
std_msgs
message_generation
dynamic_reconfigure
)
add_message_files(
FILES
MotorPower.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
generate_dynamic_reconfigure_options(
cfg/pig.cfg
)
catkin_package(
CATKIN_DEPENDS rospy std_msgs
)
add_dependencies(pid ${PROJECT_NAME}_gencfg)
And this is my package.xml:
motors 0.0.0 The motors package ubuntu todo catkin rospy std_msgs dynamic_reconfigure rospy std_msgs dynamic_reconfigure
Unfortunately I'm getting the error:
> CMake Error at motors/CMakeLists.txt:29 (add_dependencies):> Cannot add target-level dependencies to non-existent target "pid".> The add_dependencies works for top-level logical targets created by the> add_executable, add_library, or add_custom_target commands. If you want to> add file-level dependencies see the DEPENDS option of the add_custom_target> and add_custom_command commands.
How can I introduce the "pid" node (located in the file scripts/pid.py) as a target?
add_executable and add_library only seem to work for C nodes.
Or is there any self-containing example project or tutorial?
Currently I'm following the [default ROS tutorial on dynamic_reconfigure](http://wiki.ros.org/dynamic_reconfigure/Tutorials/HowToWriteYourFirstCfgFile#dynamic_reconfigure.2BAC8-Tutorials.2BAC8-HowToWriteYourFirstCfgFile.2BAC8-catkin.Use_the_cfg_File).
↧
↧
Multiple dynamic_reconfigure servers in the same node? [Python]
It is possible to have multiple dynamic_reconfigure servers in the same node?
When I try that I get this error message:
Tried to advertise a service that is already advertised in this nodeMoreover, the first configuration server become unusable. I though that it should be possible since a set of nodelets can run on the same node with different dynamic configuration servers. Or it is more complex than it seems?
↧
possible to use dynamic_reconfigure inside rviz plugin?
hi,
is it possible to use the dynamic_reconfigure package inside a rviz plugin which adds a panel ? Where should i put the code which creates the server and init the callback? Inside the constructor of the plugin?
thanks
↧
Publishing parameter updates to camera using pointgrey_camera_driver
With Indigo and Ubuntu 14.04 I would like to control the parameters of a BlackFly GiGE camera using pointgrey_image_driver. I can see the image using image_view while running the driver.
It looks like the parameters should be accessible using dynamic reconfigure but when I publish messages from the command line, there is no effect on the image. Examples of messages I have tried:
rostopic pub -1 /camera/camera_nodelet/parameter_updates dynamic_reconfigure/BoolParameter '{name: auto_white_balance, value: False}'
rostopic pub -1 /camera/camera_nodelet/parameter_updates dynamic_reconfigure/BoolParameter '{name: white_balance_red, value: 3}'
Actually, I'd just like to set all the parameters once so if there's a way to do that other than by using dynamic_reconfigure, that would be great to know.
When I look at the parameter_updates topic, I see that there are no subscribers to that topic. That seems like a problem.
↧