How to pass message into rosservice using args
Please refer to the package ethzasl_icp_mapper's node matcher_service
Matcher Service node offers a Service match_clouds, which is by description:
<...> takes two sensor_msgs/PointCloud2 messages as inputs (the first is the reference and the second the reading) and provides a geometry_msgs/Transform message as output.
Thus, the service structure is the following:
sensor_msgs/PointCloud2 reference
sensor_msgs/PointCloud2 readings
---
geometry_msgs/Transform transform
And required arguments are reference
and readings
I have two topics with the same msgs type, but cannot understand how to provide them properly?
Double_tabbing gives a skeleton, but I'd be happy to make them taken from topics aready existing, than typing myself.
Service arguments are: [reference.header.seq reference.header.stamp reference.header.frame_id reference.height reference.width reference.fields reference.is_bigendian reference.point_step reference.row_step reference.data reference.is_dense readings.header.seq readings.header.stamp readings.header.frame_id readings.height readings.width readings.fields readings.is_bigendian readings.point_step readings.row_step readings.data readings.is_dense]
[EDIT]
Thanks @fexner for your answer, your logic is completely right, I think it can be accepted.
After digging up, I realized, that's what ROS Client stands for. I completely forget about it.
That means, parsing arguments from the command line is only a little part of ServiceClient tool. Unfortunately, tutorials only consist of sums of 1+3, without more advanced implementations.
[EDIT 2]
Got lucky to find lots of practical examples, hopefully gets helpful for those, who tries to implement something more than prime numbers addition:)
For reference matcher_service node