... | ... | @@ -149,7 +149,7 @@ Modify the publisher example to instead publish a ```geometry_msgs/msg/Twist``` |
|
|
* Copy/paste the publisher example from the respective tutorials into your ```lab2_node.py``` or ```lab2_node.cpp```
|
|
|
* Make sure you understand what is happening, if you have doubts, ask questions to your lab assistant
|
|
|
* Build your project with ```tdde05_build``` and then use ```ros2 run ...``` to start your node. Alternatively for python, you can start the script directly from the source directory.
|
|
|
* Check that it runs properly, you can use ```rostopic echo ...``` or ```rqt``` to check that a message is published by the node, it should be a string.
|
|
|
* Check that it runs properly, you can use ```ros2 topic echo ...``` or ```rqt``` to check that a message is published by the node, it should be a string.
|
|
|
* Modify the script to publish a ```geometry_msgs/msg/Twist``` on ```/cmd_vel``` with a linear velocity of ```0.1``` and angular velocity of ```0.05```.
|
|
|
|
|
|
The documentation for ```geometry_msgs/Twist``` can be found online at [geometry_msgs/Twist](https://docs.ros2.org/galactic/api/geometry_msgs/msg/Twist.html) or by running ```ros2 msg info geometry_msgs/Twist```.
|
... | ... | |