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

mdcr's profile - activity

2018-09-14 17:35:37 -0500 marked best answer How to send a complex request and save a complex response (service) in ROS?

Hi I don´t have a high level in ROS so I would request your help. Last weeks I was trying to make a client for testing that package https://github.com/sniekum/dmp Alwais I had problems running it (the client) so I decided to run it by CMD

I used this commands to send the request to one of the service´s package:

rosservice call /learn_dmp_from_demo "{'demo': {'points': [{'positions': [1.05], 'velocities': [0]}, {'positions': [4.05], 'velocities': [0]}, {'positions': [6.05], 'velocities': [0]}, {'positions': [4.05], 'velocities': [0]}, {'positions': [6.55], 'velocities': [0]}, {'positions': [6.05], 'velocities': [0]}, {'positions': [5.05], 'velocities': [0]}, {'positions': [2.05], 'velocities': [0]}], 'times': [0, 0.15, 0.65, 1.3, 2.32, 3.5, 4.8, 5.9, 7]}, 'd_gains': [0.5], 'k_gains': [1.5], 'num_bases': 50}"

I got this response:

dmp_list: 
  - 
    k_gain: 1.5
    d_gain: 0.5
    weights: []
    f_domain: [0.0, 0.02542372881355932, 0.11016949152542373, 0.22033898305084745, 0.3932203389830508, 0.5932203389830508, 0.8135593220338982, 1.0]
    f_targets: [0.0, 3526.023021050232, -1212.684557129261, -707.1580492824511, 827.153942036789, -818.845524643713, -197.3391387004624, -4666.23882178427]
tau: 7.0

So It was succesfull. The question is, How can I send the request without command line? and store the response in a YAML file for using it later? I was reading about Ros Param Server and bag files and store YAML files, but I´m a little bit lost with it

Thanks a lot

2017-11-15 13:48:04 -0500 received badge  Famous Question (source)
2017-11-07 08:26:00 -0500 received badge  Notable Question (source)
2017-08-26 04:59:07 -0500 received badge  Popular Question (source)
2017-05-25 13:47:53 -0500 received badge  Supporter (source)
2017-05-24 14:21:48 -0500 asked a question How to send a complex request and save a complex response (service) in ROS?

How to send a complex request and save a complex response (service) in ROS? Hi I don´t have a high level in ROS so I wo