ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
def joyread(data):
foo[0] = 4*data.axes[1]
You are obviously missing the declaration. foo should be a Float32MultiArray, but then you'd rather have to write in foo.data.
2 | No.2 Revision |
You are obviously missing the declaration. foo should be a Float32MultiArray, but then you'd rather have to write in foo.data. foo.data.
3 | No.3 Revision |
def joyread(data): foo[0] = 4*data.axes[1]
You are missing the declaration. foo should be a Float32MultiArray, but then you'd rather have to write in foo.data.
Something closer to this should work: (I'm not quite sure how the foo.layout has to be initialized)
def joyread(data):
foo = Float32MultiArray()
foo.data.append(4*data.axes[1])
(...)
4 | No.4 Revision |
def joyread(data): foo[0] = 4*data.axes[1]
You are missing the declaration. foo should be a Float32MultiArray, but then you'd rather have to write in foo.data.
Something closer to this should work: (I'm not quite sure how the foo.layout has to be initialized)
def joyread(data):
foo = Float32MultiArray()
foo.data.append(4*data.axes[1])
(...)
5 | No.5 Revision |
def joyread(data): foo[0] = 4*data.axes[1]
You are missing the declaration. foo should be a Float32MultiArray, but then you'd rather have to write in foo.data.
Something closer to this should work: (I'm not quite sure how the foo.layout has to be initialized)
def joyread(data):
foo = Float32MultiArray()
foo.data.append(4*data.axes[1])
(...)