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

Ivan Dryanovski ivan.dryanovski at gmail.com
Wed Jul 28 16:01:26 UTC 2010


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
>



More information about the ros-users mailing list