leap_motion
leap_motion copied to clipboard
Segmentation faults in C++ code when compiled/run on ROS Noetic
Steps to reproduce:
> Pull this repository into a catkin workspace in a Noetic installation
> Compile with catkin_make
> Run any of the launch files:
> roslaunch leap_motion vizualization.launch
You will see errors (seg faults) for all the C++ nodes being started, such as "leap_motion_driver_node".
[Note: I understand that the leap motion SDK was only built for python 2.7, but that is not what this above Issue is about. I also understand that Noetic is not presently supported for this driver...but if the issue above is a simple fix, perhaps it could help uses who just want to use the C++ portions of the driver].
I am also having this issue running the latest ROS Noetic
I tried to throw both the camera node and the driver node into GDB to find where the SEGFAULT was occuring and both brought me to boost::detail::find_tss_data(void const*) in LeapSDK/lib/x64/libLeap.so.
The complete output of the GDB log is below
Starting program: /home/derickvigne/Documents/GitHub/marc_robot_hand/workspace/devel/lib/leap_motion/leap_motion_driver_node
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff4790700 (LWP 74921)]
[New Thread 0x7ffff3f8f700 (LWP 74922)]
[New Thread 0x7ffff378e700 (LWP 74923)]
[New Thread 0x7ffff2f8d700 (LWP 74924)]
Thread 5 "leap_motion_dri" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2f8d700 (LWP 74924)]
0x00007ffff7a7f9ac in boost::detail::find_tss_data(void const*) () from /home/derickvigne/Documents/GitHub/marc_robot_hand/workspace/src/leap_motion/LeapSDK/lib/x64/libLeap.so
Hello!
I am unsure when I am able to look into and fix this issue as I don't have easy access to the hardware anymore. However, thanks for reporting this issue regardless.
Hi, just wondering if someone got a fix to run this project on Noetic?
@safdark @dvigne
The error for this is:

Thanks!
Hi @rglbiv, no I'm sorry I never picked it back up to try and fix, do you have any additional log lines besides what was output to the ROS console above?
Unfortunately, I think that was all that was outputted, the log messages were not helpful (see below). I think this is because Noetic is still not supported with this project. I tried with another machine (Melodic) and it works, but I am just trying my luck here to check if someone figured out a solution to make it work with Noetic. Nevertheless, thanks for reaching out!
ding@ding-HP-ENVY-15-Notebook-PC:~/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd$ roslaunch leap_motion demo.launch
... logging to /home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/roslaunch-ding-HP-ENVY-15-Notebook-PC-30120.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://ding-HP-ENVY-15-Notebook-PC:38315/
SUMMARY
========
PARAMETERS
* /enable_controller_info: False
* /enable_filter: True
* /enable_frame_info: False
* /enable_gesture_circle: False
* /enable_gesture_key_tap: False
* /enable_gesture_screen_tap: False
* /enable_gesture_swipe: False
* /enable_hand_info: False
* /filter_cutoff: 4.0
* /rosdistro: noetic
* /rosversion: 1.15.14
NODES
/
leap_driver (leap_motion/leap_motion_driver_node)
leap_filter (leap_motion/leap_motion_filter_node)
leap_visualizer (leap_motion/leap_motion_visualizer_node)
link1_broadcaster (tf/static_transform_publisher)
rviz (rviz/rviz)
/leap_motion/
leap_camera (leap_motion/leap_motion_camera_node)
link2_broadcaster (tf/static_transform_publisher)
stereo_image (stereo_image_proc/stereo_image_proc)
ROS_MASTER_URI=http://localhost:11311
process[leap_driver-1]: started with pid [30134]
process[leap_visualizer-2]: started with pid [30135]
process[link1_broadcaster-3]: started with pid [30137]
process[leap_filter-4]: started with pid [30144]
process[leap_motion/leap_camera-5]: started with pid [30155]
process[leap_motion/stereo_image-6]: started with pid [30162]
process[leap_motion/link2_broadcaster-7]: started with pid [30163]
process[rviz-8]: started with pid [30178]
[leap_visualizer-2] process has died [pid 30135, exit code -11, cmd /home/ding/catkin_ws/devel/lib/leap_motion/leap_motion_visualizer_node __name:=leap_visualizer __log:=/home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_visualizer-2.log].
log file: /home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_visualizer-2*.log
[leap_driver-1] process has died [pid 30134, exit code -11, cmd /home/ding/catkin_ws/devel/lib/leap_motion/leap_motion_driver_node __name:=leap_driver __log:=/home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_driver-1.log].
log file: /home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_driver-1*.log
[leap_filter-4] process has died [pid 30144, exit code -11, cmd /home/ding/catkin_ws/devel/lib/leap_motion/leap_motion_filter_node __name:=leap_filter __log:=/home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_filter-4.log].
log file: /home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_filter-4*.log
[leap_motion/leap_camera-5] process has died [pid 30155, exit code -11, cmd /home/ding/catkin_ws/devel/lib/leap_motion/leap_motion_camera_node __name:=leap_camera __log:=/home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_motion-leap_camera-5.log].
log file: /home/ding/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd/leap_motion-leap_camera-5*.log
[ WARN] [1647877963.806339858]: The input topic '/leap_motion/right/camera_info' is not yet advertised
^C[rviz-8] killing on exit
[leap_motion/link2_broadcaster-7] killing on exit
[leap_motion/stereo_image-6] killing on exit
[link1_broadcaster-3] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
ding@ding-HP-ENVY-15-Notebook-PC:~/.ros/log/57cd1f98-a927-11ec-9552-1d024eec14cd$ tail -f roslaunch-ding-HP-ENVY-15-Notebook-PC-30120.log
[roslaunch.pmon][INFO] 2022-03-21 23:53:25,343: ProcessMonitor exit: pmon has shutdown
[roslaunch][INFO] 2022-03-21 23:53:25,343: process monitor is done spinning, initiating full shutdown
[roslaunch][INFO] 2022-03-21 23:53:25,343: runner.stop()
[roslaunch][INFO] 2022-03-21 23:53:25,343: shutting down processing monitor...
[roslaunch][INFO] 2022-03-21 23:53:25,343: shutting down processing monitor <ProcessMonitor(ProcessMonitor-1, stopped daemon 140103266612992)>
[roslaunch.pmon][INFO] 2022-03-21 23:53:25,343: ProcessMonitor.shutdown <ProcessMonitor(ProcessMonitor-1, stopped daemon 140103266612992)>
[roslaunch][INFO] 2022-03-21 23:53:25,343: ... shutting down processing monitor complete
[roslaunch][INFO] 2022-03-21 23:53:25,344: done
[roslaunch.pmon][INFO] 2022-03-21 23:53:25,344: ProcessMonitor.shutdown <ProcessMonitor(ProcessMonitor-1, stopped daemon 140103266612992)>
[rospy.core][INFO] 2022-03-21 23:53:25,344: signal_shutdown [atexit]
Hi, just wondering if someone got a fix to run this project on Noetic?
@rglbiv If you need to access leapmotion frame data urgently, a workaround that I used was leapmotion's websocket interface. It's not ideal, but at least can get you the data you need.
Hi, just wondering if someone figured how to run this project in Noetic?
@alikureishy @dvigne @rglbiv
@Jasv06 Hello, unfortunately, I used this project for Melodic as I also couldn't figure out on how to run it on Noetic on my own. But I can assure you it works on Melodic version!
@Jasv06 I never got the time to debug it further so I never got it to run on Melodic. Sorry I couldn't be more help.
@Jasv06 I am also hoping to use the driver on Noetic. As @rglbiv mentioned, there isn't much to go on with the error message. But since it works with Melodic, I guess it has something to do with python 2.7 vs 3.4+ (I guess the cpp nodes will run just the same). I wonder if someone has done a python 3 migration for all the scripts to test out this theory.