ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I remember some earlier discussion about this, but can't find (or link) it right now.
If I remember correctly, the rationale was that in ROS 1, you never really created subcribers, you already created subscriptions.
This is evidenced by the fact you cannot create any additional subscriptions using a ros::Subscriber
instance in ROS 1, which would have made sense. You do that via your ros::NodeHandle
.
The only things you can do with a ros::Subscriber
are:
ros::Subscriber
instances (which then compares the topic it's subscribed to, among other things) and copy itthat all sounds really more like things you'd do with a subscription.
The class' documentation also states this:
Manages an subscription callback on a specific topic.
Which again reinforces the idea that ros::Subscriber
was really actually a ros::Subscription
all along. The name of the class just didn't reflect that fact, so using the latter as the name of the class in ROS 2 just made more sense.
2 | No.2 Revision |
I remember some earlier discussion about this, but can't find (or link) it right now.
If I remember correctly, the rationale was that in ROS 1, you never really created subcribers, you already created subscriptions.
This is evidenced by the fact you cannot create any additional subscriptions using a ros::Subscriber
instance in ROS 1, which would have made sense. You do that via your ros::NodeHandle
.
The only things you can do with a ros::Subscriber
are:are (from the C++ API):
ros::Subscriber
instances (which then compares the topic it's subscribed to, among other things) and copy itthat all sounds really more like things you'd do with a subscription.
The class' documentation also states this:
Manages an subscription callback on a specific topic.
Which again reinforces the idea that ros::Subscriber
was really actually a ros::Subscription
all along. The name of the class just didn't reflect that fact, so using the latter as the name of the class in ROS 2 just made more sense.