[ros-users] dynamic parameters

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: garratt gallagher
Date:  
To: ros-users
Subject: [ros-users] dynamic parameters
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