How to search ROS parameters from Arduino?
I created some parameters using dynamic configure package. I want to access them in arduino using rosserial. I can get normal parameters using getParam() function but the parameters I created using dynamic configure package use a different namespace which is of the format /<package_name>1324859983924..47929/<parameter_name>
And the two numbers ( which I guess are time stamps) change everytime I run the node that creates these parameters and hence I cannot use getParam() command in arduino. In python and C++, there is a command called searchParam(), but I cannot find that command in Node_handle.h library for arduino.
The arduino library is here : https://github.com/ros-drivers/rosser...
Can anyone please help me either remove the timestamp or whatever those 2 numbers are from the parameter name or ADD the searchParam() function in the arduino library? Thanks In Advance
Can you give a little more detail how and where you added those dyn recfg parameters? Which node exposes them?
Parameter searching only works 'upwards', so if the node with dyn recfg maintains parameters, a sibling node will not be able to find them, even with searching.
I make a package in my catkin_ws just like shown in the dynamic reconfigure tutorials.(How to make a .cfg file and defining parameters using python) So the structure is exactly the same which will be formed using those tutorials. If searchParam() won't work then what else should I do?
There is no support for dynamic reconfigure in
rosserial
afaik, so you'll have to approach this differently. The "time stamps" you mention are most likely added because you ask ROS to start an "anonymous" node (either in your launch file or in your node's init options). If you don't set that .... you should get predictable node names which you could use again with
getParam(..)
. But note that that is not how dyn recfg is supposed to be used, so it would be a bit of a hack in any case.You could take a look at tstoyanov/sensors_lab1 which shows one possible approach for getting dyn recfg events over to a
rosserial
node (using services). Note that the pkg intentionally doesn't include everything as it is a student's assignment.