On Wed, Aug 10, 2011 at 2:07 PM, Thibault Kruse wrote: > As it is not urgent for me, I am dispassionate about the distribution > and release. > > I briefly thought about just adding the functionality to rosrun or rosh, > just to keep an open mind. If we add it to rosh, what about the lisp use case? > For roslaunch the package argument is optional, it could be optional for > rosrun. > And rosrun could check whether it runs a script, whether there is a > second shebang line (made unique by additional symbols), and if so run > the file with the given script interpreter and args. In order to add it to rosrun, it would have to be added to roslaunch as well. - Ken > As for the name else, some other ideas: > rosrunsh > roshrun > roscript > rosscript > roshscript > roscall > roshcall > > While there is no strong connection to rosh, i would not mind regarding > it as a tool belonging to the rosh group. > > > > On 08/10/2011 06:21 PM, Ken Conley wrote: >> +1 >> >> If shorter names are being debated, I offer 'rosbang'.  The placement >> of the hyphen in ros-shebang doesn't quite feel like a ros command >> name. >> >> I should also note that part of this discussion also includes what >> distributions ros-shebang should be included in, i.e. should it be >> backported to diamondback, sneak in through the electric freeze, >> etc... >> >> The hashbang spec has definitely been an impediment for having a good >> ease-of-use with rosh, so I support at least having this in ROS >> Electric.  I'm indifferent to ROS Diamondback as my development is >> always focused on the latest-and-greatest release. >> >>   - Ken >> >> On Tue, Aug 9, 2011 at 2:40 PM, Thibault Kruse  wrote: >>> Hi, >>> >>> I would like to make a suggestion. >>> >>> I want to add a command (called ros-shebang for now) to ros/bin that runs >>> script files by invoking a second shebang line. >>> >>> This allows invoking script interpreters with #! and passing additional >>> arguments, as well as invoking interpreters that live in ROS packages. >>> >>> My stake is calling an interpreter for roslisp scripting. However a >>> similar concern is invoking of rosh plugins, see >>> http://www.ros.org/wiki/rosh/Overview/Roshlets >>> >>> Example for rosh: >>> #! /usr/bin/env ros-shebang >>> #! /usr/bin/env rosrun rosh rosh rosh/echolet.py >>> --plugins=rosh_common,rosh_geometry >>> >>> Example for roslisp: >>> >>> #! /usr/bin/env ros-shebang >>> ;; /usr/bin/env rosrun sbcl run-sbcl.sh --script >>> >>> One less known alternative is to use other directives to declare the >>> script interpreter than #!, (in case you wonder, for lisp, #| and ":"; >>> work) however this does not work with python subprocess.Popen, which means >>> roslaunch and rostest would fail to run scripts like that (except using >>> shell=True, but this is strongly discouraged for security and portability >>> reasons). >>> >>> Alternatives: >>> - A modification to roslaunch syntax to allow forcing shell=true >>> >>> - an executable in ros/bin that executes roslisp scripts, such that we >>> could write: >>> #! /usr/bin/env ros-run-roslisp-script >>> >>> - A required fixed installation of our lisp implementation, or some custom >>> made variant of /usr/bin/env >>> >>> >>> I wrote a ros-shebang script in python that works, which is no more magic >>> than reading the second line and calling python execvp on it (minus the >>> first two symbols). >>> >>> If a new command were introduced to ros/bin, this would affect more people >>> than those working with roslisp, so opinions should be heard. There is no >>> urgency to this, roslisp works fine as it is without offering comfortable >>> scripting, just as rosh works fine by loading plugins after the shebang >>> line. >>> >>> Not sure if there are other scripting interpreter usages with similar >>> issues in ROS (Java, Lua, Javascript, ...). >>> >>> Thoughts? >>> >>>   Thibault >>> >>> _______________________________________________ >>> ros-developers mailing list >>> ros-developers@code.ros.org >>> https://code.ros.org/mailman/listinfo/ros-developers >>> _______________________________________________ >>> ros-users mailing list >>> ros-users@code.ros.org >>> https://code.ros.org/mailman/listinfo/ros-users >>> >> _______________________________________________ >> ros-users mailing list >> ros-users@code.ros.org >> https://code.ros.org/mailman/listinfo/ros-users > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users >