How to get the ros service argument type in python
Hello, I'm writing a programm in which it should be possible to show the user the parameters he should give, when he calls a service. So far I know that:
- I can get a ros service list with the get_service_list() function from the ros service python library: https://docs.ros.org/en/melodic/api/r...
- I can get the service arguments by get_service_args(service_name): Same source This returns the name that I defined in the srv file. Example: If the following is my SRV file:
float64 move_x_target
(---) (without brackets)
bool success
Then the get_service_args function returns move_x_target.
So how do I get float64 into my python programm? I tried type(move_x_target) but this returns String.
Thanks in advance!
I would suggest to take a look at how rqt_service_caller does this.
It seems like that implements basically what you describe.