Hi all,
I created a custom service message (MyCustomServiceMessage.srv) defining the answer as a float32. After disperse particles and move robot, I request the particles covariance, that is a correct value. But when I try to check if covariance is less than threshold defined(0.65) I get this error: “while(covariance > 0.65): TypeError: ‘>’ not supported between instances of ‘MyCustomServiceMessageResponse’ and ‘float’”. To avoid this error I converted the service response (“message: 0.37408336997032166”) to string, take only the positions of this string that contain numbers and then convert it again to float so I can compare it. I think this is not very elegant way to do it and I want to know if there is more direct way?
Thanks in advance.