TypeError: cannot marshal <type 'numpy.uint8'> objects
I am unable to set parameters to the param server using the following code:
hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
rospy.set_param("lower_h", hsv[:, :, 0].min()) rospy.set_param("lower_s", hsv[:, :, 1].min()) rospy.set_param("lower_v", hsv[:, :, 2].min())
print('lower_h = {}\nlower_s = {}\nlower_v = {}'.format(hsv[:, :, 0].min(), hsv[:, :, 1].min(), hsv[:, :, 2].min()))
I am getting the following error:
TypeError: cannot marshal <type 'numpy.uint8'> objects
In the above code I am able to print the values in the terminal but not set the values in the parameter server. Any help will be appreciated.