ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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:
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:
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 :-)
2 | Fixed (?) formatting |
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:
ros_conf.sh
) in my ros-workspace (~/ros_workspace
) that exports the ROS-variables of interest: ROS_IP, ROS_MASTER, ROS_PACKAGE_PATH, ...source /opt/ros/fuerte/setup.bash source~/ros_workspace/ros_conf.sh~/ros_workspace/ros_conf.sh
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 :-)
3 | No.3 Revision |
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:
ros_conf.sh
) in my ros-workspace (~/ros_workspace
) that exports the ROS-variables of interest: ROS_IP, ROS_MASTER, ROS_PACKAGE_PATH, ...source /opt/ros/fuerte/setup.bash source ~/ros_workspace/ros_conf.sh
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 :-)