ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The author is telling the function (in this case the constructor for the rospy subscriber
class) which particular arguments the value they are passing in is for. If you look at the documentation for the subscriber class you will notice the __init__()
function has name
,data_class
, and callback
as arguments in the function definition. You don't necessarily have to do that, but then you need to be careful about the order in which you pass in the values to the function. Basically, the authors are explicitly telling the function which argument each value they pass in relates to.
Docs: Subscriber
2 | No.2 Revision |
The author is telling the function (in this case the constructor for the rospy subscriber
class) which particular arguments the value they are passing in is for. If you look at the documentation for the subscriber class you will notice the __init__()
function has name
,data_class
, and callback
as arguments in the function definition. You don't necessarily have to do that, but then you need to be careful about the order in which you pass in the values to the function. Basically, the authors are explicitly telling the function which argument each value they pass in relates to.
Docs: Subscriber