# Revision history [back]

### message_filters synchronize laserscan and custom message

Hi together,

I'm working with the Microsoft Kinect.

I'm using pointcloud_to_laserscan to retrieve a laserscan from kinect.

And there is another node which retrieves the rgb image from kinect for feature extraction and advertises the features using a custom ros message on a topic called "features".

Now I have another node. This node should subscribe to the pointcloud_to_laserscan and to the features topic using message_filters, because I need the laserscan and the features taken at the same time.

I tried to use the tutorial on http://www.ros.org/wiki/message_filters

I defined a sync policy:

typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::LaserScan, myNode::myMsg> SyncLaserNodePolicy;

message_filters::Synchronizer<SyncLaserNodePolicy> sync2_;
message_filters::Subscriber<sensor_msgs::LaserScan> kinectLaser_sub;
message_filters::Subscriber<myNode::myMsg> feature_sub;


In the constructor of the node I initialize:

      kinectLaser_sub(n,"kinectLaser",1),
feature_sub(n,"features",1),
sync2_(SyncLaserNodePolicy(10),kinectLaser_sub,feature_sub),


My custom message is defined as:

Header header
surfKeyp2d[] keypoints2d
surfKeyp3d[] keypoints3d
surfDescMsg[] descriptors
uint32 number
sensor_msgs/Image image
geometry_msgs/TransformStamped trans


The code is compiling without errors, but when I try to run my node I get the following error:

myNode: /usr/include/boost/thread/pthread/mutex.hpp:50:
void boost::mutex::lock():     Assertion !pthread_mutex_lock(&m)' failed.
Aborted


Anybody an Idea whats wrong?

Thx a lot!

 2 Improve title, + grammar Asomerville 2583 ●70 ●94 ●130 http://www.resquared.com/

### message_filters synchronize laserscan and "Assertion !pthread_mutex_lock(&m)' failed." runtime error while working with custom messagemessage and kinect

Hi together,all,

I'm working with the Microsoft Kinect.

I'm using pointcloud_to_laserscan to retrieve a laserscan from kinect.

And there is another node which retrieves the rgb image from kinect for feature extraction and advertises the features using a custom ros message on a topic called "features".

Now I have another node. This node should subscribe to the pointcloud_to_laserscan and to the features topic using message_filters, because I need the laserscan and the features taken at the same time.

I tried to use the tutorial on http://www.ros.org/wiki/message_filters

I defined a sync policy:

typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::LaserScan, myNode::myMsg> SyncLaserNodePolicy;

message_filters::Synchronizer<SyncLaserNodePolicy> sync2_;
message_filters::Subscriber<sensor_msgs::LaserScan> kinectLaser_sub;
message_filters::Subscriber<myNode::myMsg> feature_sub;


In the constructor of the node I initialize:

      kinectLaser_sub(n,"kinectLaser",1),
feature_sub(n,"features",1),
sync2_(SyncLaserNodePolicy(10),kinectLaser_sub,feature_sub),


My custom message is defined as:

Header header
surfKeyp2d[] keypoints2d
surfKeyp3d[] keypoints3d
surfDescMsg[] descriptors
uint32 number
sensor_msgs/Image image
geometry_msgs/TransformStamped trans


The code is compiling without errors, but when I try to run my node I get the following error:

myNode: /usr/include/boost/thread/pthread/mutex.hpp:50:
void boost::mutex::lock():     Assertion !pthread_mutex_lock(&m)' failed.
Aborted


Anybody an Idea whats wrong?

Thx Thanks a lot!

 3 grammar Asomerville 2583 ●70 ●94 ●130 http://www.resquared.com/

### "Assertion !pthread_mutex_lock(&m)' failed." runtime error while working with custom message and kinect

Hi all,

I'm working with the Microsoft Kinect.

I'm using pointcloud_to_laserscan to retrieve a laserscan from kinect.

And there is another node which retrieves the rgb image from kinect for feature extraction and advertises the features using a custom ros message on a topic called "features".

Now I have another node. This node should subscribe to the pointcloud_to_laserscan and to the features topic using message_filters, because I need the laserscan and the features taken at the same time.

I tried to use the tutorial on http://www.ros.org/wiki/message_filters

I defined a sync policy:

typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::LaserScan, myNode::myMsg> SyncLaserNodePolicy;

message_filters::Synchronizer<SyncLaserNodePolicy> sync2_;
message_filters::Subscriber<sensor_msgs::LaserScan> kinectLaser_sub;
message_filters::Subscriber<myNode::myMsg> feature_sub;


In the constructor of the node I initialize:

      kinectLaser_sub(n,"kinectLaser",1),
feature_sub(n,"features",1),
sync2_(SyncLaserNodePolicy(10),kinectLaser_sub,feature_sub),


My custom message is defined as:

Header header
surfKeyp2d[] keypoints2d
surfKeyp3d[] keypoints3d
surfDescMsg[] descriptors
uint32 number
sensor_msgs/Image image
geometry_msgs/TransformStamped trans


The code is compiling without errors, but when I try to run my node I get the following error:

myNode: /usr/include/boost/thread/pthread/mutex.hpp:50:
void boost::mutex::lock():     Assertion !pthread_mutex_lock(&m)' failed.
Aborted
`

Anybody have an Idea idea whats wrong?

Thanks a lot!