How to call a custom service? [closed]

asked 2016-07-28 07:28:44 -0500

neckutrek gravatar image

My service (AddTask.srv) is defined as:

string       name          
string       type         
string[]     behaviour     
uint16       priority     
bool         visibility   
string[]     parameters

and my rosservice call is

rosservice call /mynamespace/addTask \
'name: "mytask", type: "TaskPoP", behaviour: ["TaskBehFO", "10"], priority: 1, visibility: 1, parameters: ["gripper_r_base", "0", "0", "0.1", "gripper_l_base", "1", "0", "0", "0.2"]'

and I get this error message:

yaml.parser.ParserError: while parsing a block mapping
  in "<string>", line 1, column 1:
    name: "mytask", type: "TaskPoP", ... 
expected <block end>, but found ','
  in "<string>", line 1, column 15:
    name: "mytask", type: "TaskPoP", behaviour: [" ...

What does the error message mean and how do I resolve it?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by NEngelhard
close date 2016-07-28 08:45:50.567318