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

catkin+tmux problem

asked 2013-10-03 13:29:24 -0500

jbinney gravatar image

When I use catkin_make inside of a tmux session, and then source the devel/setup.sh, I sometimes end up with the CMAKE_PREFIX_PATH and the ROS_PACKAGE_PATH being backwards. This causes my overlay to be an underlay, so catkin finds system ROS packages before my source packages. It doesn't always happen, and I don't have a reliable way to reproduce it. Its possible that it isn't actually related to tmux, but I've only seen the problem when inside a tmux session.

I'm posting here in the hope that someone has some insight into why this happens.

Here's the issue for this on github: https://github.com/ros/catkin/issues/455

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-10-10 21:46:53 -0500

tfoote gravatar image

I usually use screen not tmux, but have had similar issues. I was using a ROS environment, entered a screen session, and found that some of my ROS environment variables had been lost. And had to resource my setup.bash to be able to continue. I now make sure to enter screen with a clean environment and then source setup.bash in each new window. (screen doesn't share the env like tmux apparently does)

edit flag offensive delete link more
2

answered 2013-10-09 03:52:54 -0500

KruseT gravatar image

updated 2013-10-09 22:01:31 -0500

Just an idea:

For tmux,you have to be aware that the environment you have before you start tmux is the one you get in every new tmux window. So by opening a new tmux window, you do not get a "totally clean" environment, just the environment of the parent process.

Since catkin was designed to (ab-)use the current environment, this may bite you. E.g. if a tutorial says "Create a new clean shell", opening another tmux window will not help, unless tmux was started from a clean shell.

edit flag offensive delete link more

Comments

As a side note, any file that is automatically run on a "clean shell" start also gets run on a new tmux window. So if you change your .bashrc, and then open a new tmux window, the change in the .bashrc is automatically reflected in the new window's environment.

jarvisschultz gravatar image jarvisschultz  ( 2013-10-09 05:26:51 -0500 )edit

Wow, this is getting weirder and weirder. Apparently the environment of a first tmux instance is also carried over to other new tmux instances (not windows, nor attaching), at least on my machine. So multiple tmux sessions may also bite you. GNU screen does not do this. Maybe it's my config...

KruseT gravatar image KruseT  ( 2013-10-09 22:01:13 -0500 )edit

Hm, so tmux instances really are just sessions that you can switch in between with 'C-b (', so maybe that makes sense... but can still bite you if you did not know (like me).

KruseT gravatar image KruseT  ( 2013-10-09 22:07:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-03 13:29:24 -0500

Seen: 568 times

Last updated: Oct 10 '13