Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 586104

Summary: dev-util/catkin: environment hooks not processed when activating local workspace
Product: Gentoo Linux Reporter: Eric Timmons <gentoo-bugs>
Component: Current packagesAssignee: Robot Operating System team <ros>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to add CATKIN_PREFIX_PATH support to _setup_util.py.in
emerge --info

Description Eric Timmons 2016-06-16 13:26:10 UTC
Created attachment 437748 [details, diff]
Patch to add CATKIN_PREFIX_PATH support to _setup_util.py.in

The standard ROS environment hooks are not run when sourcing devel.{bash,zsh} in a local catkin workspace. This results in environment variables not being set to expected values and tools like roslaunch being unable to find some files in the workspace.

Steps to reproduce (you can't have dev-ros/rospy_tutorials installed):

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
git clone https://github.com/ros/ros_tutorials.git
cd ..
catkin_make
source devel/setup.zsh
roslaunch rospy_tutorials talker_listener.launch

Expected:

[...]
SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.2

NODES
  /
    listener (rospy_tutorials/listener.py)
    talker (rospy_tutorials/talker.py)

auto-starting new master
process[master]: started with pid [4959]
ROS_MASTER_URI=http://localhost:11311/

setting /run_id to d318e7fc-33c3-11e6-97e0-00142fa25553
process[rosout-1]: started with pid [4974]
started core service [/rosout]
process[listener-2]: started with pid [4977]
process[talker-3]: started with pid [4978]
[INFO] [WallTime: 1466082684.525548] hello world 1466082684.53
[INFO] [WallTime: 1466082684.625986] hello world 1466082684.63
[INFO] [WallTime: 1466082684.627015] /listenerI heard hello world 1466082684.63
[INFO] [WallTime: 1466082684.725854] hello world 1466082684.73

[...]

Actual:

[talker_listener.launch] is neither a launch file in package [rospy_tutorials] nor is [rospy_tutorials] a launch file name
The traceback for the exception was written to the log file

Reason:

More CMAKE_PREFIX_PATH silliness from Catkin, this time in _setup_util.py. The attached patch is one way to fix this for Gentoo.
Comment 1 Eric Timmons 2016-06-16 13:27:07 UTC
Created attachment 437750 [details]
emerge --info
Comment 2 Alexis Ballier gentoo-dev 2016-10-07 11:51:51 UTC
applied to catkin 0.7.1-r1, thanks

sorry it took so long, i didnt notice you did all the work...