ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 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.

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.

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.