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

rospeex dependency libraries error

asked 2015-06-05 11:12:54 -0600

Pinchi gravatar image

I recently install the rospeex package and I managed to run the Talking Watch sample with the following command:

roslaunch rospeex_samples talking_watch_cpp_en_local.launch

However, if I try to make my own package (named extras) and copy-paste the same code shown in the example in a script called speech_rec.cpp I get the following error:

Linking CXX executable ../bin/speech_rec
  /opt/ros/hydro/lib/librospeex_if.so: undefined reference to `ros::package::getPath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

Is there any way to solve it? I think I'm not linking the libraries correctly (I'm new in ROS). I'm using Ubuntu 12.04, ROS distro Hydro and rosbuild. My CMakeList.txt is:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
rosbuild_add_executable(speech_rec src/speech_rec.cpp)

And my manifest.xml is:

<package>
  <description brief="extras">
     extras
  </description>
  <author>Cl</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/extras</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>
  <depend package="roslib"/>
  <depend package="rospack"/>
  <depend package="opencv2"/>
  <depend package="image_transport"/>
  <depend package="cv_bridge"/>
  <depend package="rospeex_if"/>
  <depend package="rospeex_audiomonitor"/>
  <depend package="rospeex_core"/>
  <depend package="rospeex_launch"/>
  <depend package="rospeex_msgs"/>
  <depend package="rospeex_webaudiomonitor"/>
</package>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-09 09:31:29 -0600

130s gravatar image

On newer version(/distro) of ROS (like Hydro that you seem to use), using the build system called Catkin instead of rosbuild is recommended. I sueggest you go through the Catkin tutorial and modify your own package accordingly. After you do that and still keep seeing the similar issue, post the error again along with your CMakeLists.txt. HTH

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-06-05 11:12:54 -0600

Seen: 266 times

Last updated: Jun 09 '15