Compile all your ROS packages as usual and make sure there are no more errors left
|
cd ~/ros_catkin_ws catkin_make |
Because having too many packages in Xcode can be a bit overwhelming, I recommend to install all the unused packages to /opt/ros/indigo:
|
catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/indigo |
Remove the build, devel and the unneeded stuff from src
Then generate a Xcode project by:
|
catkin_make -G"Xcode" |
you may have to do this every time you add a new package or add files to a package so define an alias:
|
alias catkin_make_xcodeproject='catkin_make -G"Xcode"' |
Define an alias for starting ROS from the console in your .zshrc:
|
alias xcode_ros='open /Applications/Xcode.app ~/ros_catkin_ws/build/Project.xcodeproj' |
Start ROS from the console so that it gets its correct environment
If you get an error like this after linking:
|
dyld: Library not loaded: libcv_bridge.dylib Referenced from: /Users/tatsch/ros_catkin_ws/devel/lib/pixel_slam/Debug/slam Reason: image not found |
Click Product->Scheme->Edit Scheme->Run „Target Name“->Environment Variables
and add DYLD_LIBRARY_PATH /opt/ros/indigo/lib
