Skip to content

Python limit input

I’m having some trouble, I want to limit the input to only integers, positive numbers, and also not zero. Now I have written these two functions and I don’t want to allow the user to put in any value. My code is not recognizing my if-statement. Only the integer/float statement. What should I do? A…

Get ros message type at runtime

I’m hoping to have a config file loaded in via rosparam that includes the type for a generic callback to subscribe to. Right now this is what I have but can’t figure out how to make it work with the subscriber. Answer In Python you can use globals to lookup and return the message type from a strin…