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

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/ 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)
rosbuild_add_executable(speech_rec src/speech_rec.cpp)

And my manifest.xml is:

  <description brief="extras">
  <review status="unreviewed" notes=""/>
  <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"/>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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


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

Seen: 266 times

Last updated: Jun 09 '15