... | ... | @@ -161,9 +161,9 @@ 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```. **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
|
|
|
* Add a subscriber to your ```lab2_node```. **You should have a single class**, so add the `subscribe` and `callback` to your existing class. By default, the `spin` function is blocking and accept a single `node` as argument.
|
|
|
* 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.
|
|
|
|
|
|
Parameters
|
|
|
----------
|
... | ... | |