ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

In its current form, I don't believe that roslaunch will support this behavior. The roslaunch command line script parses the launch files to figure out arguments, and then eventually opens new subprocesses using the Python subprocess.Popen function. Here are the relevant lines of code. There are many questions online about how to have Popen support globbing (e.g. this one), and the general consensus is that you need to have shell=True (which is often not a good idea... check out this question). The relevant lines in roslaunch don't set shell=True (and they probably shouldn't), and therefore the globbing feature (which is specific to your shell... likely bash) doesn't work.

You could write a simple bash script that handles the globbing for you. For example a starting point would be:

#!/bin/bash
rosbag play --clock $1

Then your launch file could be changed to

<launch>
  <arg name="path" default="/home/kailegh/Descargas/Custom/20Jul16/" /> 
  <node pkg="your-package" type="name-of-bash-script.sh" name="player" output="screen" args="$(arg path)*.bag" />
</launch>

This could give your the functionality that you want.