[ros-users] passing arguments to an executable with roslaunch

Adam Leeper aleeper at stanford.edu
Wed Jul 28 16:16:00 UTC 2010


I ran into this problem too. Roslaunch seems to be prepending 2 arguments to
the argument list, though I don't remember what they are right now.

I've resorted to avoiding arguments altogether, preferring to use
parameters, though perhaps this is not the best method.

--Adam


Adam Leeper
Stanford University
aleeper at stanford.edu
719.358.3804


On Wed, Jul 28, 2010 at 9:01 AM, Ivan Dryanovski
<ivan.dryanovski at gmail.com>wrote:

> I can't test this right now, but I encountered this before, and this
> is what I remember. When I did something like this:
>
> <node pkg="x" type="y" name="z"  args="ARG" output="screen"/>
>
> This would start program y with 4 arguments, the 4th of which is "ARG"
>
> however, if you do "rosrun x y ARG"
>
> this would pass 2 arguments to the program, the 2nd being ARG
>
> Ivan
>
> On Wed, Jul 28, 2010 at 11:51 AM, Steven Bellens
> <steven.bellens at mech.kuleuven.be> wrote:
> > Hi,
> >
> > I'm trying to start a rosnode with the roslaunch command and a launch
> file.
> > The command I use to start the program manually is:
> >
> > 'rosrun ocl_2.0 deployer-gnulinux -s deployer.xml'
> >
> > which executes 'deployer-gnulinux' in the ocl_2.0 package with
> > arguments '-s deployer.xml'
> > My pelican.launch file contains:
> >
> > <launch>
> > <node name="pelican" pkg="ocl_2.0" type="deployer-gnulinux" args="-s
> > deployer.xml" output="screen"/>
> > </launch>
> >
> > but when I launch this with 'roslaunch pelican.launch' it says:
> > "...
> > Exception:too many positional options
> > Allowed options:
> >  -h [ --help ]           Show program usage
> >  -s [ --start ] arg      Deployment configuration file (eg
> 'config-file.xml')
> >  --site-file arg         Site deployment file (eg 'Deployer-site.cpf' or
> >                          'Deployer-site.xml')
> >  -l [ --log-level ] arg  Level at which to log from RTT
> (case-insensitive)
> >
>  Never,Fatal,Critical,Error,Warning,Info,Debug,Realtim
> >                          e
> >  --no-consolelog         Turn off RTT logging to the console (will still
> log
> >                          to 'orocos.log')
> >  --require-name-service  Require CORBA name service
> >  --DeployerName arg      Name of deployer component (the --DeployerName
> flag
> >                          is optional)
> > ..."
> >
> > Which looks like the args don't get passed in the right way to the
> > program executable. What exactly happens when this roslaunch command
> > is executed and the args are passed to the goal program? Is it
> > possible roslaunch adds extra elements here? How can I make roslaunch
> > pass the right arguments to the program executable?
> >
> > best regards,
> >
> > Steven
> > _______________________________________________
> > ros-users mailing list
> > ros-users at code.ros.org
> > https://code.ros.org/mailman/listinfo/ros-users
> >
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100728/917c04dd/attachment-0003.html>


More information about the ros-users mailing list