[ros-users] dynamic parameters

garratt gallagher garrattgallagher at gmail.com
Fri Apr 16 15:19:02 UTC 2010


Hi,

I'm working on a different solution to the issue of mapping ports to
sensors.  Instead of configuring every computer to automatically map usb
devices to specific addresses,  I wrote a program that uses the libudev
library (also get ID for hokuyos) to find the serial number of the device,
so I can query for a serial number and get back the device it is plugged
into (or determine that it is not there)
The motivation for doing this:
- I swap out devices a bit, and configuring the udev is more annoying than
just changing a parameter
- I can run the same program with the devices plugged into a different
computer without having to configure udev.

The problem I am having is in setting the correct parameter to the correct
port.
What I would like to do is dynamically substitute in the appropriate
parameter when running the launch file:
<node name="hokuyo" pkg="hokuyo_node" type="hokuyo_node" respawn="true"
output="screen">
    <param name="port" type="string" value="$(devfind H0902062)"/>
 </node>

I see that there is some support for executing functions in the launch file:
http://www.ros.org/wiki/roslaunch/XML#substitution_args
Would it be possible to add the running of shell commands?

Thanks
Garratt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100416/28732de6/attachment-0002.html>


More information about the ros-users mailing list