ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In you setup you don't have any change to detect what data is valid unless it's visible from the data. You could include a flag that says if A or B are valid.
But it seems to me that your setup just isn't properly suited to what you want to do. The better solution would be to only have one message that contains (out1, out2) and both sensors publish these to topics (sensorA, sensorB) of the same message type. The listener can now match the data sources properly.
2 | No.2 Revision |
In you setup you don't have any change to detect what data is valid unless it's visible from the data. You could include a flag that says if A or B are valid.
But it seems to me that your setup just isn't properly suited to what you want to do.
The better solution would be to only have one message type that contains (out1, out2) and both sensors publish these to topics (sensorA, sensorB) of the same message type.
The listener can now match the data sources properly.properly. That obviously also works for different message types (like odom and laser).
Merging those two to one matching data set should then happen by whoever needs these. Depending on how you want to match the data sets, e.g. by timestamp there are some nice tools in the message_filters package.
3 | No.3 Revision |
In you setup you don't have any change to detect what data is valid unless it's visible from the data. You could include a flag that says if A or B are valid.
But it seems to me that your setup just isn't properly suited to what you want to do. The better solution would be to only have one message type that contains (out1, out2) and both sensors publish these to topics (sensorA, sensorB) of the same message type. The listener can now match the data sources properly. That obviously also works for different message types (like odom and laser).
Merging those two to one matching data set should then happen by whoever needs these. Depending on how you want to match the data sets, e.g. by timestamp timestamp, there are some nice tools in the message_filters package.