ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to ask to ros the service parameter data type

asked 2017-03-27 11:15:44 -0600

I am learning ROS from the Wiki site and doing some commandos on the terminal to improve my understanding about it:

I would like to know what are the parameters of a Rosservice, I am doing something like:

$rosclient@rosclient-VirtualBox:~$ rosservice list

I get:

/clear /kill /reset /rosout/get_loggers

/rosout/set_logger_level /spawn

/teleop_turtle/get_loggers

/teleop_turtle/set_logger_level

/turtle1/set_pen

/turtle1/teleport_absolute

...etc etc

then I do:

$rosclient@rosclient-VirtualBox:~$ rosservice info /turtle1/teleport_absolute

and I get:

Node: /turtlesim

URI: rosrpc://rosclient-VirtualBox:40839

Type: turtlesim/TeleportAbsolute

Args: x y theta

but I need to know what x,y theta are... are float, ints or what (please note this example is pretty trivial to infer the data type, but I am looking for somthing like rosmsg <type>)

thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2017-03-27 14:08:50 -0600

130s gravatar image

rossrv offers exactly the same sub-commands as rosmsg. See its wiki.

For your particular case,

$ rossrv 
list      md5       package   packages  show      
$ rossrv show turtlesim/TeleportAbsolute
float32 x
float32 y
float32 theta
---

Or without package name:

$ rossrv show TeleportAbsolute                                                                                                                                                            
[turtlesim/TeleportAbsolute]:
float32 x
float32 y
float32 theta
---
edit flag offensive delete link more

Comments

Thanks a lot!

ΦXocę 웃 Пepeúpa ツ gravatar image ΦXocę 웃 Пepeúpa ツ  ( 2017-03-28 00:11:50 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-27 11:15:44 -0600

Seen: 291 times

Last updated: Mar 27 '17