Writing the ros pub command inside the launch file
This is a command line command:
rostopic pub /rec_pose_as/goal path_exam/RecordOdomActionGoal "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
goal_id:
stamp:
secs: 0
nsecs: 0
id: ''
goal: {}"
I want to use a launch file to run this command, so I do the following:
<node pkg='rostopic' type='rostopic' name='some_arbitary_name' args='pub /rec_pose_as/goal path_exam/RecordOdomActionGoal
"header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ""
goal_id:
stamp:
secs: 0
nsecs: 0
id: ""
goal: {}"' />
But I get the error
rostopic: error: Argument error: mapping values are not allowed here
in "<string>", line 1, column 14:
header: seq: 0 stamp: secs: 0 nse ...
The error appears to come at seq: (the arrow points at colon)
What should be done? Would be grateful to any help
Actually I found a way to escape this error, I copied the command to a bash script and ran the bash script from the command line, using https://answers.ros.org/question/5147...