ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I fiddled around with this issue as well: tried different ways to set up parameters when using ssh (.ssh/environment-file, ...), tried to load my configuration at different places, but to no avail.

My current working solution now looks like this:

  • As before, there is a shell script (named ros_conf.sh) in my ros-workspace (~/ros_workspace) that exports the ROS-variables of interest: ROS_IP, ROS_MASTER, ROS_PACKAGE_PATH, ...
  • In ~/.bashrc, the last two lines execute the ROS specific scripts (so interactive shells are fully usable with ROS):

    source /opt/ros/fuerte/setup.bash source ~/ros_workspace/ros_conf.sh

  • The file opt/ros/fuerte/env.sh executes both scripts:

    !/bin/sh

    if [ $# -eq 0 ] ; then /bin/echo "Entering environment at /opt/ros/fuerte" . /opt/ros/fuerte/setup.sh . /home/megi-labor/ros_workspace/ros_conf.sh $SHELL /bin/echo "Exiting build environment at /opt/ros/fuerte" else . /opt/ros/fuerte/setup.sh . /home/megi-labor/ros_workspace/ros_conf.sh exec "$@" fi

Voila! Looks to be working until now :-)

I fiddled around with this issue as well: tried different ways to set up parameters when using ssh (.ssh/environment-file, ...), tried to load my configuration at different places, but to no avail.

My current working solution now looks like this:

  • As before, there is a shell script (named ros_conf.sh) in my ros-workspace (~/ros_workspace) that exports the ROS-variables of interest: ROS_IP, ROS_MASTER, ROS_PACKAGE_PATH, ...
  • In ~/.bashrc, the last two lines execute the ROS specific scripts (so interactive shells are fully usable with ROS):

source /opt/ros/fuerte/setup.bash
source ~/ros_workspace/ros_conf.sh

~/ros_workspace/ros_conf.sh
  • The file opt/ros/fuerte/env.sh executes both scripts:

    !/bin/sh

#!/bin/sh

if [ $# -eq 0 ] ; then /bin/echo "Entering environment at /opt/ros/fuerte" . /opt/ros/fuerte/setup.sh . /home/megi-labor/ros_workspace/ros_conf.sh $SHELL /bin/echo "Exiting build environment at /opt/ros/fuerte" else . /opt/ros/fuerte/setup.sh . /home/megi-labor/ros_workspace/ros_conf.sh exec "$@" fi

Voila! Looks to be working until now :-)

I fiddled around with this issue as well: tried different ways to set up parameters when using ssh (.ssh/environment-file, ...), tried to load my configuration at different places, but to no avail.

My current working solution now looks like this:

  • As before, there is a shell script (named ros_conf.sh) in my ros-workspace (~/ros_workspace) that exports the ROS-variables of interest: ROS_IP, ROS_MASTER, ROS_PACKAGE_PATH, ...
  • In ~/.bashrc, the last two lines execute the ROS specific scripts (so interactive shells are fully usable with ROS):
source /opt/ros/fuerte/setup.bash
source ~/ros_workspace/ros_conf.sh
  • The file opt/ros/fuerte/env.sh executes both scripts:

#!/bin/sh

if [ $# -eq 0 ] ; then /bin/echo "Entering environment at /opt/ros/fuerte" . /opt/ros/fuerte/setup.sh . /home/megi-labor/ros_workspace/ros_conf.sh /home/MY_USERNAME/ros_workspace/ros_conf.sh $SHELL /bin/echo "Exiting build environment at /opt/ros/fuerte" else . /opt/ros/fuerte/setup.sh . /home/megi-labor/ros_workspace/ros_conf.sh /home/MY_USERNAME/ros_workspace/ros_conf.sh exec "$@" fi

Voila! Looks to be working until now :-)