Creating a script to subscribe to multiple nodes with the same message id

Hi!

For context, I have multiple micro-controllers which have some ToF sensors attached and I have the ToF data publishing onto my CAN network. The micro-controllers all have the same code on them apart from giving a unique node ID.

I’m currently trying to make a python script which consists of subscribers who subscribe to each micro-controller’s ToF data message. I have a script working for when there is used one micro-controller connected, but when I add a second the two nodes publishing ToF data is going into the one subscriber.

I have two nodes 23 and 24 publishing data onto Port ID 1630. What I’d like to do is the following:
1 subscriber attached to node 23, port id 1630
1 subscriber attached to node 24, port id 1630

Is this possible? If so, how would I construct such?

Thanks in advance
Rebecca

Are you using the legacy v0 or the modern v1?

I’m using the modern V1

The idiomatic approach is to publish the data from different sensors on different subjects. Segregation by source node-ID is, in general, incompatible with the publish-subscribe architecture.

This and other architectural concepts (with examples) are covered in detail in the UAVCAN Guide.

Ok, thanks for clarifying.

I’ll speak to my colleague to see how we can modify our setup to match the ideal approach