ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Good afternoon,
I think I had the same problem you're having and what I did to fix it was substituting this line:
sub[i] = n.subscribe("/vrep/visionSensorData"+str_i, 1, boost::bind(&newImageTrigger_trgI, _1, i));
for this:
sub[i] = n.subscribe <sensor_msgs::ImageConstPtr> ("/vrep/visionSensorData"+str_i, 1, boost::bind(&newImageTrigger_trgI, _1, i));
I think, when you bind the parameter with the boost library you have to specify the type of the callback item to the node handler, but am not sure why.
Hope it helps,
Have a great day,
Tiago Pimentel
2 | No.2 Revision |
Good afternoon,
I think I had the same problem you're having and what I did to fix it was substituting this line:
sub[i] = n.subscribe("/vrep/visionSensorData"+str_i, 1, boost::bind(&newImageTrigger_trgI, _1, i));
for this:
sub[i] = n.subscribe <sensor_msgs::ImageConstPtr> ("/vrep/visionSensorData"+str_i, 1, boost::bind(&newImageTrigger_trgI, _1, i));
I think, when you bind the parameter with the boost library you have to specify the type of the callback item to the node handler, but am not sure why. why.
Hope it helps,
Have a great day,
Tiago Pimentel