Skip to content

Commit 2dc246f

Browse files
committed
Merge pull request OpenNI#30 from hgaiser/indigo-devel
Compile fix for OSX
2 parents f546a37 + c53722e commit 2dc246f

6 files changed

Lines changed: 14 additions & 6 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ add_executable(list_devices
7070
)
7171
target_link_libraries(list_devices openni2_wrapper)
7272

73-
add_executable(usb_reset src/usb_reset.c)
73+
if (UNIX AND NOT APPLE)
74+
add_executable(usb_reset src/usb_reset.c)
75+
set(ADDITIONAL_EXECUTABLES "usb_reset")
76+
endif()
7477

75-
install(TARGETS openni2_wrapper openni2_camera_nodelet openni2_camera_node list_devices openni2_driver_lib usb_reset
78+
install(TARGETS openni2_wrapper openni2_camera_nodelet openni2_camera_node list_devices openni2_driver_lib ${ADDITIONAL_EXECUTABLES}
7679
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
7780
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
7881
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}

include/openni2_camera/openni2_frame_listener.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class OpenNI2FrameListener : public openni::VideoStream::NewFrameListener
6060
callback_ = callback;
6161
}
6262

63-
bool setUseDeviceTimer(bool enable);
63+
void setUseDeviceTimer(bool enable);
6464

6565
private:
6666
openni::VideoFrameRef m_frame;

src/openni2_device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ std::ostream& operator <<(std::ostream& stream, const OpenNI2Device& device)
713713
stream << "No Depth sensor available" << std::endl;
714714
}
715715

716+
return stream;
716717
}
717718

718719
}

src/openni2_device_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ std::ostream& operator << (std::ostream& stream, const OpenNI2DeviceManager& dev
268268
", Product ID: " << it->product_id_ <<
269269
")" << std::endl;
270270
}
271+
272+
return stream;
271273
}
272274

273275

src/openni2_driver.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ OpenNI2Driver::OpenNI2Driver(ros::NodeHandle& n, ros::NodeHandle& pnh) :
6868
while (!config_init_)
6969
{
7070
ROS_DEBUG("Waiting for dynamic reconfigure configuration.");
71-
boost::this_thread::sleep(boost::posix_time::seconds(0.1));
71+
boost::this_thread::sleep(boost::posix_time::milliseconds(100));
7272
}
7373
ROS_DEBUG("Dynamic reconfigure configuration received.");
7474

@@ -718,6 +718,8 @@ std::string OpenNI2Driver::resolveDeviceURI(const std::string& device_id) throw(
718718
}
719719
return matched_uri;
720720
}
721+
722+
return "INVALID";
721723
}
722724

723725
void OpenNI2Driver::initDevice()
@@ -748,7 +750,7 @@ void OpenNI2Driver::initDevice()
748750
while (ros::ok() && !device_->isValid())
749751
{
750752
ROS_DEBUG("Waiting for device initialization..");
751-
boost::this_thread::sleep(boost::posix_time::seconds(0.1));
753+
boost::this_thread::sleep(boost::posix_time::milliseconds(100));
752754
}
753755

754756
}

src/openni2_frame_listener.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ OpenNI2FrameListener::OpenNI2FrameListener() :
5151
ros::Time::init();
5252
}
5353

54-
bool OpenNI2FrameListener::setUseDeviceTimer(bool enable)
54+
void OpenNI2FrameListener::setUseDeviceTimer(bool enable)
5555
{
5656
user_device_timer_ = enable;
5757

0 commit comments

Comments
 (0)