0
$\begingroup$

Rosanswers logo

I'm trying to interface my Orbbec Astra camera using ROS (c++).

I figured out I need to use the custom OpenNI2 by Orbbec. I built it according to the instructions.

Then I tried to build ros_astra_camera.
catkin_make --pkg astra_camera gives me /usr/bin/ld: cannot find -lOpenNI2Orbbec

My CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(camera)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
  message_generation
  image_transport
  cv_bridge
)
find_package( OpenCV REQUIRED )

 add_message_files(
   FILES
   TrackedPosition.msg
 )

 generate_messages(
   DEPENDENCIES
   std_msgs
 )

catkin_package(
  CATKIN_DEPENDS roscpp std_msgs message_runtime
)

include_directories(
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
)

add_executable(tracker src/tracker.cpp)
target_link_libraries(tracker ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})
add_dependencies(tracker camera_generate_messages_cpp)

My package.xml:

<?xml version="1.0"?>
<package>
  <name>camera</name>
  <version>0.0.0</version>
  <description>The camera package</description>

  <maintainer email="[email protected]">jeff</maintainer>

  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>message_generation</build_depend>
  <build_depend>image_transport</build_depend>
  <build_depend>cv_bridge</build_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>message_runtime</run_depend>
  <run_depend>image_transport</run_depend>
  <run_depend>cv_image</run_depend>

</package>

Any help is very much appreciated.
Please let me know if you need any additional information.


Originally posted by voxl on ROS Answers with karma: 1 on 2016-12-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Had this issue myself - Rename Astra OpenNI2 file to OpenNI2Orbbec in /usr/lib

Mark


Originally posted by MarkyMark2012 with karma: 1834 on 2017-01-28

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2017-01-29:
Are you suggesting to rename the library itself?

Comment by MarkyMark2012 on 2017-01-29:
You can simply add a sym link to the OpenNI2 library file. Calling the link libOpenNI2Orbbec or there abouts

Comment by dwikyerl on 2017-01-29:
There is no Astra OpenNI2 file in my /usr/lib

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.