Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbol lookup error when launching #29

Open
farbod1277 opened this issue Dec 7, 2022 · 3 comments
Open

symbol lookup error when launching #29

farbod1277 opened this issue Dec 7, 2022 · 3 comments

Comments

@farbod1277
Copy link

Hi, when I try to launch this package I get the following errors:

nvidia@nvidia-desktop:~$ ros2 launch ros2_socketcan socket_can_bridge.launch.xml 
[INFO] [launch]: All log files can be found below /home/nvidia/.ros/log/2022-12-07-15-11-56-825760-nvidia-desktop-3492
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [socket_can_receiver_node_exe-1]: process started with pid [3504]
[INFO] [socket_can_sender_node_exe-2]: process started with pid [3506]
[socket_can_receiver_node_exe-1] [INFO] [1670386318.916417368] [socket_can_receiver]: interface: can0
[socket_can_receiver_node_exe-1] [INFO] [1670386318.917685827] [socket_can_receiver]: interval(s): 0.010000
[socket_can_receiver_node_exe-1] [INFO] [1670386318.917841924] [socket_can_receiver]: use bus time: 0
[socket_can_sender_node_exe-2] [INFO] [1670386318.919789173] [socket_can_sender]: interface: can0
[socket_can_sender_node_exe-2] [INFO] [1670386318.920796766] [socket_can_sender]: timeout(s): 0.010000
[socket_can_receiver_node_exe-1] /home/nvidia/ros2_ws/install/ros2_socketcan/lib/ros2_socketcan/socket_can_receiver_node_exe: symbol lookup error: /home/nvidia/ros2_ws/install/ros2_socketcan/lib/libsocket_can_receiver_node.so: undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN8can_msgs3msg6Frame_ISaIvEEEEEPK29rosidl_message_type_support_tv
[ERROR] [socket_can_receiver_node_exe-1]: process has died [pid 3504, exit code 127, cmd '/home/nvidia/ros2_ws/install/ros2_socketcan/lib/ros2_socketcan/socket_can_receiver_node_exe --ros-args -r __node:=socket_can_receiver -r __ns:=/ --params-file /tmp/launch_params_d99by55u'].
[ERROR] [socket_can_sender_node_exe-2]: process has died [pid 3506, exit code 127, cmd '/home/nvidia/ros2_ws/install/ros2_socketcan/lib/ros2_socketcan/socket_can_sender_node_exe --ros-args -r __node:=socket_can_sender -r __ns:=/ --params-file /tmp/launch_params_8r0zf3cn'].
[socket_can_sender_node_exe-2] /home/nvidia/ros2_ws/install/ros2_socketcan/lib/ros2_socketcan/socket_can_sender_node_exe: symbol lookup error: /home/nvidia/ros2_ws/install/ros2_socketcan/lib/libsocket_can_sender_node.so: undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN8can_msgs3msg6Frame_ISaIvEEEEEPK29rosidl_message_type_support_tv

I am running ros2 foxy on Jetpack 5.02 (ubuntu 20.04) on an industrial xavier computer. I have confirmed that my can interface is working, I've used a peak can device and checked it using a physical can bus:

nvidia@nvidia-desktop:~$ ifconfig 
can0: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 53  

can1: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 54  

Colcon build was also successful:

nvidia@nvidia-desktop:~/ros2_ws$ colcon build
Starting >>> ros2_socketcan
Starting >>> ros2_socketcan_msgs             
Finished <<< ros2_socketcan [4.53s]                                                                        
Finished <<< ros2_socketcan_msgs [6.18s]                  

Summary: 2 packages finished [8.55s]

Any help would be much appreciated. Let me know if you'd like more info about the issue. Thanks

@JWhitleyWork
Copy link
Collaborator

This appears to be a linking error related to can_msgs. Is this package installed? If so, is it from source or via apt? I recommend clearing your workspace (i.e. rm -rf build/ install/ log/) and re-building.

@farbod1277
Copy link
Author

Hi @JWhitleyWork , thank you for your response. I had previously installed ros-foxy-can-msgs fromt apt, but it looks like I also needed to install ros-foxy-can-msgs-dbgsym for this to work correctly. After installing that and rebuilding using colcon build it all works correctly now, thanks. Closing.

@farbod1277
Copy link
Author

Just reopening this issue as it seems it's not fixed yet. rosdep doesn't install ros-foxy-can-msgs-dbgsym only ros-foxy-can-msgs, and this caused a runtime issue with the symbol lookup.

@farbod1277 farbod1277 reopened this Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants