Revision history [back]

This seems like a bit of a hack, but I'll bet the following would work:

rosrun kinect2_bridge kinect2_bridge _sensor:="'123456'"


This seems like a bit of a hack, but I'll bet the following would work:

rosrun kinect2_bridge kinect2_bridge _sensor:="'123456'"


EDIT

The above "hack" does indeed trick the parameter into being interpreted as a string. However, this only works because adding the extra set of quotes means the inner value can't be converted into an int32 by boost::lexical_cast. So you end up with a string parameter with an extra quote character on both ends (which is not what is really wanted, or needed). Relevant lines of code in param.cpp.

Bottom line: not sure how to produce OP's goal. A launch file could certainly fix the issue. Alternatively, the kinect2_bridge package could be patched to expect the device serial number to be an int rather than a string. All of my Kinect2 devices have purely numeric serial numbers, so I'd expect this would work.