ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 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.

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.

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.