subscribe_for_duration
Subscribe to a specific ROS topic for a defined duration to collect messages, specifying message type and maximum message count for precise data gathering.
Instructions
Subscribe to a topic for a duration and collect messages. Example: subscribe_for_duration(topic='/cmd_vel', msg_type='geometry_msgs/msg/TwistStamped', duration=5, max_messages=10)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
duration | No | ||
max_messages | No | ||
msg_type | No | ||
topic | No |
Input Schema (JSON Schema)
{
"properties": {
"duration": {
"default": 5,
"title": "Duration",
"type": "number"
},
"max_messages": {
"default": 100,
"title": "Max Messages",
"type": "integer"
},
"msg_type": {
"default": "",
"title": "Msg Type",
"type": "string"
},
"topic": {
"default": "",
"title": "Topic",
"type": "string"
}
},
"title": "subscribe_for_durationArguments",
"type": "object"
}