Hey all,<br><br>roscpp and rospy both provide ways to remove ROS specific arguments from the argument list.<br><br>For roscpp its removeArgs: <a href="http://www.ros.org/doc/api/roscpp/html/namespaceros.html#aa044af6270e37edd78cf05f5fc7ee148">http://www.ros.org/doc/api/roscpp/html/namespaceros.html#aa044af6270e37edd78cf05f5fc7ee148</a><br>
<br>For rospy its myargv: <a href="http://www.ros.org/doc/api/rospy/html/rospy-module.html#myargv">http://www.ros.org/doc/api/rospy/html/rospy-module.html#myargv</a><br><br>Hope this helps,<br><br>Eitan<br><br><div class="gmail_quote">
On Wed, Jul 28, 2010 at 9:16 AM, Adam Leeper <span dir="ltr"><<a href="mailto:aleeper@stanford.edu">aleeper@stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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.<div><br></div><div>I've resorted to avoiding arguments altogether, preferring to use parameters, though perhaps this is not the best method.</div>

<div><br></div><div>--Adam</div><div><br></div><div><font color="#888888"><br clear="all">Adam Leeper<br>Stanford University<br><a href="mailto:aleeper@stanford.edu" target="_blank">aleeper@stanford.edu</a><br>719.358.3804</font><div>
<div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Wed, Jul 28, 2010 at 9:01 AM, Ivan Dryanovski <span dir="ltr"><<a href="mailto:ivan.dryanovski@gmail.com" target="_blank">ivan.dryanovski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

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