ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This is a Python problem more than a ROS one.
def las_callback(self, msg):
[..]
You've defined a method here (the first argument is self
), but it is not part of any class.
Remove the self
argument, so las_callback(..)
becomes a function.
2 | No.2 Revision |
This is a Python problem more than a ROS one.
def las_callback(self, msg):
[..]
You've defined a method here (the first argument is self
), but it is not part of any class.
Remove the self
argument, so las_callback(..)
becomes a function.
3 | No.3 Revision |
This is a Python problem more than a ROS one.
def las_callback(self, msg): [..]
You've defined a method here (the first argument is self
), but it is not part of any class.
Remove the self
argument, so las_callback(..)
becomes a function.
Alternatively: create a Python class
and make las_callback(..)
a method of that class. You'll have to take care to create all the member variables as well in that case, or the callback will not run successfully.