Challenge - 5 Problems
ROS Topic Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediateUnderstanding
rostopic echo outputWhat will
rostopic echo /chatter display when the topic /chatter publishes messages of type std_msgs/String with the data field set to "hello world"?Attempts:
2 left
💡 Hint
Think about what
rostopic echo does when subscribed to a topic.✗ Incorrect
rostopic echo prints the content of messages published on a topic. For std_msgs/String, it shows the data field with the string value.
❓ component_behavior
intermediateBehavior of
rostopic hz commandWhat does the command
rostopic hz /sensor_data display when the topic /sensor_data is publishing messages at 10 Hz?Attempts:
2 left
💡 Hint
Consider what measuring frequency means for a topic.
✗ Incorrect
rostopic hz subscribes to a topic and calculates the message publishing frequency, showing an average rate.
📝 Syntax
advancedCorrect syntax for publishing a message with
rostopic pubWhich command correctly publishes a single message with data "42" to the topic
/numbers of type std_msgs/Int32?Attempts:
2 left
💡 Hint
Remember the YAML format for message data in
rostopic pub.✗ Incorrect
The message data must be provided in YAML format inside quotes, specifying the field name and value.
🔧 Debug
advancedIdentifying error cause in
rostopic pubYou run
rostopic pub /cmd_vel geometry_msgs/Twist "linear: 1.0, angular: 0.5" --once but get a syntax error. What is the most likely cause?Attempts:
2 left
💡 Hint
Think about how YAML represents nested data.
✗ Incorrect
Nested message fields require proper indentation and YAML syntax. Writing them inline with commas causes syntax errors.
❓ state_output
expertEffect of
rostopic bw on topic bandwidth measurementWhat does
rostopic bw /camera/image_raw display when the topic publishes 5 messages per second, each about 2 MB in size?Attempts:
2 left
💡 Hint
Bandwidth is message size times message rate.
✗ Incorrect
rostopic bw calculates the data rate by multiplying message size by frequency, showing bandwidth in bytes per second.
