ethz-asl / vicon_bridge

This is a driver providing data from VICON motion capture systems. It is based on the vicon_mocap package from the starmac stacks. Additionally, it can handle multiple subjects / segments and allows to calibrate an origin of the vehicle(s) as this is somehow tedious with the VICON Tracker.
Other
91 stars 102 forks source link

Segmentation fault on Ubuntu 20.04 with ROS Noetic #28

Closed ferrolho closed 3 years ago

ferrolho commented 3 years ago

Hi! I am trying to run roslaunch vicon_bridge vicon.launch on Ubuntu 20.04 with ROS Noetic, but the process dies soon after connecting to the VICON server. Below is the information output by using gdb. Is anyone running into a similar issue? Thanks!

(gdb) run
Starting program: /home/henrique/catkin_ws/devel/lib/vicon_bridge/vicon_bridge __name:=vicon __log:=/home/henrique/.ros/log/814fc820-8d8a-11eb-bf20-6922279961a7/vicon-2.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff4331700 (LWP 36938)]
[New Thread 0x7ffff3b30700 (LWP 36939)]
[New Thread 0x7ffff332f700 (LWP 36940)]
[New Thread 0x7ffff2b2e700 (LWP 36941)]
[New Thread 0x7ffff232d700 (LWP 36942)]
[ INFO] [1616691315.885458948]: Connecting to Vicon DataStream SDK at vicon:801 ...
[New Thread 0x7ffff1b2c700 (LWP 36943)]
[ INFO] [1616691315.886954747]: .
[ INFO] [1616691316.887277343]: ... connected!
[ INFO] [1616691316.887327717]: Setting Stream Mode to ClientPull: Success
[ INFO] [1616691316.887378140]: Axis Mapping: X-Forward Y-Left Z-Up
[ INFO] [1616691316.887389120]: Version: 1.3.0
[ INFO] [1616691316.887397639]: setting up grab_vicon_pose service server ... 
[ INFO] [1616691316.888402378]: setting up segment calibration service server ... 
[ WARN] [1616691316.889472326]: grab frame returned false

Thread 1 "vicon_bridge" received signal SIGSEGV, Segmentation fault.
__GI___pthread_mutex_lock (mutex=0x110) at ../nptl/pthread_mutex_lock.c:67
67      ../nptl/pthread_mutex_lock.c: No such file or directory.

(gdb) bt
#0  __GI___pthread_mutex_lock (mutex=0x110) at ../nptl/pthread_mutex_lock.c:67
#1  0x00007ffff7be2fa8 in ros::Publication::hasSubscribers() () from /opt/ros/noetic/lib/libroscpp.so
#2  0x00007ffff7bd31ce in ros::TopicManager::publish(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<ros::SerializedMessage ()> const&, ros::SerializedMessage&) () from /opt/ros/noetic/lib/libroscpp.so
#3  0x00007ffff7bc7046 in ros::Publisher::publish(boost::function<ros::SerializedMessage ()> const&, ros::SerializedMessage&) const () from /opt/ros/noetic/lib/libroscpp.so
#4  0x00007ffff7039260 in tf2_ros::TransformBroadcaster::sendTransform(std::vector<geometry_msgs::TransformStamped_<std::allocator<void> >, std::allocator<geometry_msgs::TransformStamped_<std::allocator<void> > > > const&) () from /opt/ros/noetic/lib/libtf2_ros.so
#5  0x00007ffff7cb6a1b in tf::TransformBroadcaster::sendTransform(std::vector<tf::StampedTransform, std::allocator<tf::StampedTransform> > const&) () from /opt/ros/noetic/lib/libtf.so
#6  0x0000555555587bbf in ViconReceiver::process_subjects(ros::Time const&) ()
#7  0x0000555555588be1 in ViconReceiver::process_frame() ()
#8  0x000055555558c364 in ViconReceiver::grabThread() ()
#9  0x000055555558d6e7 in ViconReceiver::ViconReceiver() ()
#10 0x0000555555573bc4 in main ()
ferrolho commented 3 years ago

I can confirm that #29 fixes this problem. This issue can be closed once that PR is merged.