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

Revision history [back]

click to hide/show revision 1
initial version

In addition to what @William proposes, here are some additional steps needed to get this working. I have submitted pull requests for according patches.

  1. the openni formula has a typo in the pkg-config file path: https://github.com/Homebrew/homebrew-science/pull/882
  2. openni_camera needs a patch to compile: https://github.com/ros-drivers/openni_camera/pull/22
  3. rosdep keys are missing: https://github.com/ros/rosdistro/pull/4264

Instructions with additional steps until the above fixes are in (which let me successfully compile on OS X 10.9):

mkdir ~/openni_ws
cd ~/openni_ws
source /path/to/hydro/install/setup.bash
rosinstall_generator openni_launch --deps --exclude RPP --tar > openni-hydro.rosinstall
wstool init src -j8 openni-hydro.rosinstall
rosdep install --from-paths ./src --ignore-src -y --skip-keys "libopenni-dev libopenni-sensor-primesense-dev"

# manually install the dependencies
brew install openni totakke/openni/sensor-kinect

# manually fix the typo in openni
cd /usr/local/lib/pkgconfig
ln -s ../pkg-config/libopenni.pc

# apply patch to openni_camera
pushd src/openni_camera
curl https://github.com/ros-drivers/openni_camera/pull/22.patch | patch -p1
popd

# now proceed building
catkin_make install
source ./install/setup.bash
roslaunch openni_launch openni.launch

In addition to what @William proposes, here are some additional steps needed to get this working. I have submitted pull requests for according patches.

  1. the openni formula has a typo in the pkg-config file path: https://github.com/Homebrew/homebrew-science/pull/882
  2. openni_camera needs a patch to compile: https://github.com/ros-drivers/openni_camera/pull/22
  3. rosdep keys are missing: https://github.com/ros/rosdistro/pull/4264

EDIT: Faults 1 and 3 have been fixed upstream. So the only additional step on top of William's instructions should the openni_camera patch.

Instructions with additional steps until the above fixes are in (which let me successfully compile on OS X 10.9):

mkdir ~/openni_ws
cd ~/openni_ws
source /path/to/hydro/install/setup.bash
rosinstall_generator openni_launch --deps --exclude RPP --tar > openni-hydro.rosinstall
wstool init src -j8 openni-hydro.rosinstall
rosdep install --from-paths ./src --ignore-src -y --skip-keys "libopenni-dev libopenni-sensor-primesense-dev"

# manually install the dependencies
brew install openni totakke/openni/sensor-kinect

# manually fix the typo in openni
cd /usr/local/lib/pkgconfig
ln -s ../pkg-config/libopenni.pc

# apply patch to openni_camera
pushd src/openni_camera
curl https://github.com/ros-drivers/openni_camera/pull/22.patch | patch -p1
popd

# now proceed building
catkin_make install
source ./install/setup.bash
roslaunch openni_launch openni.launch

In addition to what @William proposes, here are some additional steps needed to get this working. I have submitted pull requests for according patches.

  1. the openni formula has a typo in the pkg-config file path: https://github.com/Homebrew/homebrew-science/pull/882
  2. openni_camera needs a patch to compile: https://github.com/ros-drivers/openni_camera/pull/22
  3. rosdep keys are missing: https://github.com/ros/rosdistro/pull/4264

EDIT: Faults 1 and 3 have been fixed upstream. So the only additional step on top of William's instructions should the openni_camera patch.

Instructions with additional steps until the above fixes are in (which let me successfully compile on OS X 10.9):

mkdir ~/openni_ws
cd ~/openni_ws
source /path/to/hydro/install/setup.bash
rosinstall_generator openni_launch --deps --exclude RPP --tar > openni-hydro.rosinstall
wstool init src -j8 openni-hydro.rosinstall
rosdep install --from-paths ./src --ignore-src -y --skip-keys "libopenni-dev libopenni-sensor-primesense-dev"

# manually install the dependencies
brew install openni totakke/openni/sensor-kinect

# manually fix the typo in openni
cd /usr/local/lib/pkgconfig
ln -s ../pkg-config/libopenni.pc

# apply patch to openni_camera
pushd src/openni_camera
curl https://github.com/ros-drivers/openni_camera/pull/22.patch | patch -p1
popd

# now proceed building
catkin_make install
source ./install/setup.bash
roslaunch openni_launch openni.launch

EDIT 2: (in respose to your updated question)

I did the following :

...
$ source /path/to/hydro/install/setup.bash
...

When following the instructions, please make sure you actually replace the path in source /path/to/hydro/install/setup.bash with the actual path to where you installed hydro.

When I ran this : rosdep install --from-paths ./src --ignore-src -y, I got the following error.

openni_camera: No definition of [libopenni-sensor-primesense-dev] for OS [osx]

This indicates the rosdep database is out of date. Make sure to sudo rosdep update beforehand. The --skip-keys is useful to make rosdep continue, but you have to make sure you install the dependencies by hand, in this case brew install openni totakke/openni/sensor-kinect (after update rosdep should be able to install them for you).

I did brew unlink and link as well to make sure the openni that I installed from brew is properly linked.

I have outlined in my instructions why this happened and how to fix it with a manual link. The homebrew formula is updated no, so if you do brew update and then brew uninstall openni and then brew install openni there should not be the need for manually creating a link.

After @demmeln suggested the procedure, I get an error that I believe is related to the compiler somehow.

What does rosdep check --from-paths ./src --ignore-src output (after you updated rosdep)? What does brew info gcc output?

In addition to what @William proposes, here are some additional steps needed to get this working. I have submitted pull requests for according patches.

  1. the openni formula has a typo in the pkg-config file path: https://github.com/Homebrew/homebrew-science/pull/882
  2. openni_camera needs a patch to compile: https://github.com/ros-drivers/openni_camera/pull/22
  3. rosdep keys are missing: https://github.com/ros/rosdistro/pull/4264

EDIT: Faults 1 and 3 have been fixed upstream. So the only additional step on top of William's instructions should the openni_camera patch.

Instructions with additional steps until the above fixes are in (which let me successfully compile on OS X 10.9):

mkdir ~/openni_ws
cd ~/openni_ws
source /path/to/hydro/install/setup.bash
rosinstall_generator openni_launch --deps --exclude RPP --tar > openni-hydro.rosinstall
wstool init src -j8 openni-hydro.rosinstall
rosdep install --from-paths ./src --ignore-src -y --skip-keys "libopenni-dev libopenni-sensor-primesense-dev"

# manually install the dependencies
brew install openni totakke/openni/sensor-kinect

# manually fix the typo in openni
cd /usr/local/lib/pkgconfig
ln -s ../pkg-config/libopenni.pc

# apply patch to openni_camera
pushd src/openni_camera
curl https://github.com/ros-drivers/openni_camera/pull/22.patch | patch -p1
popd

# now proceed building
catkin_make install
source ./install/setup.bash
roslaunch openni_launch openni.launch

EDIT 2: (in respose to your updated question)

I did the following :

...
$ source /path/to/hydro/install/setup.bash
...

When following the instructions, please make sure you actually replace the path in source /path/to/hydro/install/setup.bash with the actual path to where you installed hydro.

When I ran this : rosdep install --from-paths ./src --ignore-src -y, I got the following error.

openni_camera: No definition of [libopenni-sensor-primesense-dev] for OS [osx]

This indicates the rosdep database is out of date. Make sure to sudo rosdep update beforehand. The --skip-keys is useful to make rosdep continue, but you have to make sure you install the dependencies by hand, in this case brew install openni totakke/openni/sensor-kinect (after update rosdep should be able to install them for you).

I did brew unlink and link as well to make sure the openni that I installed from brew is properly linked.

I have outlined in my instructions why this happened and how to fix it with a manual link. The homebrew formula is updated no, so if you do brew update and then brew uninstall openni and then brew install openni there should not be the need for manually creating a link.

After @demmeln suggested the procedure, I get an error that I believe is related to the compiler somehow.

What does rosdep check --from-paths ./src --ignore-src output (after you updated rosdep)? What does brew info gcc output?