... | ... | @@ -161,7 +161,7 @@ In the previous part, we have created a node that publish on a topic and make yo |
|
|
|
|
|
Check in the Python or C++ tutorial to see how you can subscribe on a topic. You will have to somehow combine together the publisher and subscriber classes. We strongly advise that you follow the an incremental approach:
|
|
|
|
|
|
* Add a subscriber to your ```lab2_node```
|
|
|
* Add a subscriber to your ```lab2_node```. **You should have a single class**, so add the `subscribe` and `callback` to your existing class.
|
|
|
* Add a printout in the callback to check that you receive a message
|
|
|
* Modify your program so that it exit once the distance has been computed
|
|
|
|
... | ... | |