rostopic pub -data format [closed]
Hello,
I was trying the turtlesim example and wanted to pub to cmd_vel topic. I tried the following from a tutorial
pc3:~$ rostopic pub -r 1 /turtle1/cmd_vel geometry_msgs/Twist '[2,0,0]''[0,0,2]'
Usage: rostopic pub /topic type [args...]
rostopic: error: Argument error: expected '<document start>', but found '['
in "<string>", line 1, column 8:
[2,0,0][0,0,2]
^
but I got the error above and can't identify what is wrong on the format.
After some research on internet I found a working message format: rostopic pub -r 100 /turtle1/cmd_vel geometry_msgs/Twist '{linear: {x: 0.5, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.5}}'
Is it because I'm on Indigo and tutorial was done on a previous version?
Can you provide some links? Is hard to tell if we do not know where you got the info from.
This looks like a duplicate: http://answers.ros.org/question/21324...
I'm reading the book "A Gentle Introduction to ROS"