Some errors occurred when package was compiling.(LINK ERROR

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Some errors occurred when package was compiling.(LINK ERROR

pdmike
Hey guys, i just copy the codes , in the Chapter 10 of book,' Mastering ROS for Robotics Programming', to my ros. The cmakelists file is written as followed,

cmake_minimum_required(VERSION 2.8.3)
project(seven_dof_arm_test)
find_package(catkin REQUIRED COMPONENTS
  cmake_modules
  interactive_markers
  moveit_core
  moveit_ros_perception
  moveit_ros_planning_interface
  pluginlib**
  roscpp
  std_msgs
)
find_package(Boost REQUIRED COMPONENTS system)
catkin_package(
)
include_directories(
  ${catkin_INCLUDE_DIRS}
)
add_executable(test_random_node src/test_random.cpp)
add_dependencies(test_random_node seven_dof_arm_test_generate_messages_cpp)
target_link_libraries(test_random_node
   ${catkin_LIBRARIES}
 )
include_directories(
  ${catkin_INCLUDE_DIRS}
)
And the cpp file is shown as followed,

#include <moveit/move_group_interface/move_group.h>
int main(int argc, char **argv)
{
  ros::init(argc, argv, "move_group_interface_demo", ros::init_options::AnonymousName);
  // start a ROS spinning thread
  ros::AsyncSpinner spinner(1);
  spinner.start();
  // this connecs to a running instance of the move_group node
  move_group_interface::MoveGroup group("arm");
  // specify that our target will be a random one
  group.setRandomTarget();
  // plan the motion and then move the group to the sampled target
  group.move();
  ros::waitForShutdown();
}
Now when the package is compiling, the error occured ,

Linking CXX executable /home/aicrobo/catkin_ws/devel/lib/seven_dof_arm_test/test_random_node /opt/ros/indigo/lib/libmoveit_planning_scene_monitor.so: undefined reference to `ros::WallTimer::setPeriod(ros::WallDuration const&, bool)' collect2: error: ld returned 1 exit status make[2]: * [/home/aicrobo/catkin_ws/devel/lib/seven_dof_arm_test/test_random_node] Error 1 make[1]: [seven_dof_arm_test/CMakeFiles/test_random_node.dir/all] Error 2 make: ** [all] Error 2 Invoking "make -j1 -l1" failed

So do you have any idea about the problem? Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Some errors occurred when package was compiling.(LINK ERROR

matlabbe
Administrator
I suggest to ask your question on ROS answers as it is not rtabmap related.

cheers,
Mathieu