rostopic pub -data format
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/cmdvel geometrymsgs/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?
Asked by metRo_ on 2015-07-09 05:50:53 UTC
Comments
Can you provide some links? Is hard to tell if we do not know where you got the info from.
Asked by Javier V. Gómez on 2015-07-09 06:40:38 UTC
This looks like a duplicate: http://answers.ros.org/question/213245/rostpoic-pub-teleop_key/
Asked by tfoote on 2015-07-09 06:59:53 UTC
I'm reading the book "A Gentle Introduction to ROS"
Asked by metRo_ on 2015-07-09 07:40:25 UTC