[ros-users] [Discourse.ros.org] [General] Announcing rosbash_params - give your bash scripts a rospy-like feel

Martin Pecka via Discourse.ros.org ros.discourse at gmail.com
Fri Feb 1 20:35:33 UTC 2019

New package rosbash_params has been released into I, K, L and M: http://wiki.ros.org/rosbash_params

This Bash env-hook adds a "node-like" interface to your code written in Bash. The main thing it adds is ROS-like command-line parameter parsing (`_param:=value`), so that you can easily call the Bash script from a launch file like this:

<node name="test" pkg="pkg" type="my_bash_script.sh">
    <param name="par" value="test" />

rosbash_init_node "node_name" "$@"  # parse the command line arguments
rosbash_param param_var "par" 
echo "Got parameter 'par' with value ${param_var}"

Please note this is not a full-featured client library for Bash - it just adds some convenience for people writing Bash scripts ros ROS packages. So even though there's `rosbash_init_node` call, it does not start up a real ROS node - but it reads the private parameters from the same namespace a real node would.

The package can work both with ROS param server and without it. It can even be used without a roscore running.

One of the ideas behind this package was to allow easier writing of ROS nodes which can be used by downstream packages without knowing which language they are written in. Currently, even C++ and Python nodes [process parameters differently](https://github.com/ros/ros_comm/issues/1498) when called from commandline. Put a thumb-up to the issue if you also want language-agnostic ROS nodes :)

[Visit Topic](https://discourse.ros.org/t/announcing-rosbash-params-give-your-bash-scripts-a-rospy-like-feel/7702/1) or reply to this email to respond.

More information about the ros-users mailing list