rostopic pub python syntax error
Hi All, I need to use the rostopic pub command in phyton shell script: In c++ the command is: rostopic pub -r 5 /uav1/sug_cmd_vel geometry_msgs/Twist -- '[0.0, 0.2, 0.0]' '[0.0, 0.0, 0.0]'
In python I entered like this: ['rostopic', 'pub', '-r 5', '/uav1/sug_cmd_vel', 'geometry_msgs/Twist', '--','['0.0, 0.2,0.0', '0.0,0.0,0.0']' Also, I tried several other combinations but still getting syntax error. Can anyone help with this issue?. Thanks a lot