Image data is not correct
This commit is contained in:
parent
45f789f9b7
commit
ba0c730bd7
@ -1,5 +1,5 @@
|
|||||||
int16 height
|
int16 height
|
||||||
int16 width
|
int16 width
|
||||||
uint8[] red
|
uint16[] red
|
||||||
uint8[] green
|
uint16[] green
|
||||||
uint8[] blue
|
uint16[] blue
|
@ -40,8 +40,15 @@ class RLService(Node):
|
|||||||
rgb_array = output[5]
|
rgb_array = output[5]
|
||||||
rgb_shape = rgb_array.shape
|
rgb_shape = rgb_array.shape
|
||||||
|
|
||||||
|
red = rgb_array[:, :, 0].flatten().tolist()
|
||||||
|
green = rgb_array[:, :, 1].flatten().tolist()
|
||||||
|
blue = rgb_array[:, :, 2].flatten().tolist()
|
||||||
|
|
||||||
feedback_msg.height = rgb_shape[0]
|
feedback_msg.height = rgb_shape[0]
|
||||||
feedback_msg.width = rgb_shape[1]
|
feedback_msg.width = rgb_shape[1]
|
||||||
|
feedback_msg.red = red
|
||||||
|
feedback_msg.green = green
|
||||||
|
feedback_msg.blue = blue
|
||||||
|
|
||||||
self.publisher.publish(feedback_msg)
|
self.publisher.publish(feedback_msg)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user