Ask Your Question
0

error in migrating fuerte to hydro, using SR4000

asked 2013-12-22 15:30:40 -0600

kaist.wook gravatar image

updated 2015-07-17 17:01:44 -0600

130s gravatar image

hi there, I am using SR4000(3D camera) and it is going well under Fuerte. But I have to migrate the package to Hydro. When I try to compile it, I always face this error.

my error is,

Scanning dependencies of target swissranger_camera
[ 36%] Building CXX object camera_drivers_experimental/swissranger_camera/CMakeFiles/swissranger_camera.dir/src/sr.cpp.o
[ 37%] Building CXX object camera_drivers_experimental/swissranger_camera/CMakeFiles/swissranger_camera.dir/src/dev_sr.cpp.o
Linking CXX executable /home/ktset/catkin_ws/devel/lib/swissranger_camera/swissranger_camera
CMakeFiles/swissranger_camera.dir/src/sr.cpp.o: In function `swissranger_camera::SwissRangerConfig::__get_statics__()':
sr.cpp:(.text._ZN18swissranger_camera17SwissRangerConfig15__get_statics__Ev[swissranger_camera::SwissRangerConfig::__get_statics__()]+0x23): undefined reference to `dynamic_reconfigure::__init_mutex__'
CMakeFiles/swissranger_camera.dir/src/sr.cpp.o: In function `SRNode::SRNode(ros::NodeHandle const&)':
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0x53): undefined reference to `image_transport::ImageTransport::ImageTransport(ros::NodeHandle const&)'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0x73): undefined reference to `image_transport::ImageTransport::ImageTransport(ros::NodeHandle const&)'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0x93): undefined reference to `image_transport::ImageTransport::ImageTransport(ros::NodeHandle const&)'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0x3b1): undefined reference to `image_transport::ImageTransport::advertise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, bool)'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0x44e): undefined reference to `image_transport::ImageTransport::advertise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, bool)'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0x4e5): undefined reference to `image_transport::ImageTransport::advertise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, bool)'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0x579): undefined reference to `image_transport::ImageTransport::advertise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, bool)'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0xcf1): undefined reference to `image_transport::ImageTransport::~ImageTransport()'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0xd0b): undefined reference to `image_transport::ImageTransport::~ImageTransport()'
sr.cpp:(.text._ZN6SRNodeC2ERKN3ros10NodeHandleE[_ZN6SRNodeC5ERKN3ros10NodeHandleE]+0xd25): undefined reference to `image_transport::ImageTransport::~ImageTransport()'
CMakeFiles/swissranger_camera.dir/src/sr.cpp.o: In function `SRNode::~SRNode()':
sr.cpp:(.text._ZN6SRNodeD2Ev[_ZN6SRNodeD5Ev]+0x1d3): undefined reference to `image_transport::ImageTransport::~ImageTransport()'
sr.cpp:(.text._ZN6SRNodeD2Ev[_ZN6SRNodeD5Ev]+0x1e5): undefined reference to `image_transport::ImageTransport::~ImageTransport()'
CMakeFiles/swissranger_camera.dir/src/sr.cpp.o:sr.cpp:(.text._ZN6SRNodeD2Ev[_ZN6SRNodeD5Ev]+0x1f7): more undefined references to `image_transport::ImageTransport::~ImageTransport()' follow
CMakeFiles/swissranger_camera.dir/src/sr.cpp.o: In function `SRNode::getInitParams()':
sr.cpp:(.text._ZN6SRNode13getInitParamsEv[SRNode::getInitParams()]+0x1aa): undefined reference to `camera_info_manager::CameraInfoManager::CameraInfoManager(ros::NodeHandle, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/swissranger_camera.dir/src/sr.cpp.o: In function `SRNode::reconfig(swissranger_camera::SwissRangerConfig&, unsigned int)':
sr.cpp:(.text._ZN6SRNode8reconfigERN18swissranger_camera17SwissRangerConfigEj[SRNode::reconfig(swissranger_camera::SwissRangerConfig&, unsigned int)]+0x2fd): undefined reference to `tf::resolve(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
sr.cpp:(.text._ZN6SRNode8reconfigERN18swissranger_camera17SwissRangerConfigEj[SRNode::reconfig(swissranger_camera::SwissRangerConfig&, unsigned int)]+0x3a0): undefined reference to `camera_info_manager::CameraInfoManager::validateURL(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
sr.cpp:(.text._ZN6SRNode8reconfigERN18swissranger_camera17SwissRangerConfigEj[SRNode::reconfig(swissranger_camera::SwissRangerConfig&, unsigned int)]+0x3c8): undefined reference to `camera_info_manager::CameraInfoManager::loadCameraInfo(std::basic_string<char, std ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-21 01:37:28 -0600

mgruhler gravatar image

Hope this helps: There are several problems with your CMakeLists.txt.

The biggest one: You need to find_package all the ROS packages you depend on. This is how the variables catkin_INCLUDE_DIRS and catkin_LIBRARIES are set up.

So do a

find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
  image_transport
  sensor_msgs
  tf
  camera_info_manager
  dynamic_reconfigure
  driver_base
)

(best sort this alphabetically). Maybe this resolves your problem already.

Other issues:

  • You shouldn't link against a library with the full path, but just against the library name minus the lib part, i.e. mesasr
  • the add_dependencies call is not what you want. You need this if you need messages to be built before, but better use ${<packagename>_EXPORTED_TARGETS} or ${catkin_EXPORTED_TARGETS}
  • in catkin_package: The LIBRARIES part is not correct, this is only for exporting libraries that you build
  • in catkin_package: exchange mesasr with libmesasr (the same name as in the package.xml)

Also, there already exists a swissranger driver, have you checked out the OpenPTrack swissranger_camera package?

edit flag offensive delete link more

Comments

1

omg, just saw now, when this was actually asked... :-D just stumbled upon it due to the update to the question :-S

mgruhler gravatar imagemgruhler ( 2015-07-21 01:38:41 -0600 )edit
1

Doesn't matter: we try to answer all questions on ROS Answers, old or new. Only really outdated / no longer relevant questions get closed (but only rarely). So thanks for your contribution.

gvdhoorn gravatar imagegvdhoorn ( 2015-07-21 06:16:20 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-12-22 15:30:40 -0600

Seen: 405 times

Last updated: Jul 21 '15