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

[ROS2] symbol lookup error and undefined symbol while using image transport cpp

asked 2020-09-27 04:16:00 -0500

Majed gravatar image

Hi fellow developers,

I am a beginner at ROS2. After building the package and trying to run it I get the following error.

/home/jetson/ros2_ws/install/camera_pkg/lib/camera_pkg/camera_node: symbol lookup error: /home/jetson/ros2_ws/install/camera_pkg/lib/camera_pkg/camera_node: undefined symbol: _ZN15image_transport16create_publisherEPN6rclcpp4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE17rmw_qos_profile_t

Honestly, do not know where to begin to tackle this issue. It seems to me an error with image_transport.h

edit retag flag offensive close merge delete

Comments

1

you may post your Cmakelists.txt as well as package.xml, to me it seems that you are not correctly using find_package() and linking in the Cmakelists.txt. Are finding and linking rclcpp

Fetullah Atas gravatar image Fetullah Atas  ( 2020-09-28 03:09:14 -0500 )edit

@atas thank you for willingness to help.

Majed gravatar image Majed  ( 2020-09-28 09:09:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-09-28 09:08:56 -0500

Majed gravatar image

updated 2021-05-27 07:42:33 -0500

@atas has given me a hint into how to solve the problem. As I was preparing to post the CMakelist, I noticed I had an extra #ament_export_dependencies(.....) below the ament_target_dependencies(.....). This was the cause of the problem. I Just removed the #ament_export_dependencies(.....)

@atas thank you for willingness to help.

edit flag offensive delete link more

Comments

Hi I am getting the same error but not finding anything in my CMAkelist.txt... So please help me if there any other way

Ajoe gravatar image Ajoe  ( 2021-05-27 00:57:43 -0500 )edit

Post your CMakeList I will try my best to see what is the issue.

Majed gravatar image Majed  ( 2021-05-27 07:39:12 -0500 )edit

@Ajoe please create a new question and post a link to it here. Comments/answers aren't a good place to be working on a new question

jayess gravatar image jayess  ( 2021-05-28 00:24:33 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-09-27 04:16:00 -0500

Seen: 4,212 times

Last updated: May 27 '21