Complete the code to create a ROS topic publisher.
publisher = node.create_publisher(std_msgs.msg.String, '[1]', 10)
The /chatter topic is a common example name for publishing messages in ROS topics.
Complete the code to call a ROS service client.
client = node.create_client([1], 'add_two_ints')
Services require a service type like AddTwoInts from example_interfaces.srv.
Fix the error in the code to correctly wait for a service to be available.
if not client.[1](timeout_sec=5.0): node.get_logger().error('Service not available')
The method wait_for_service waits until the service is ready to be called.
Fill both blanks to create a topic subscriber with a callback function.
subscription = node.create_subscription([1], '[2]', callback, 10)
Subscribers use message types like std_msgs.msg.String and topic names like /chatter.
Fill all three blanks to define a service server with a callback.
service = node.create_service([1], '[2]', [3])
Service servers need the service type, service name, and a callback function.
