0
$\begingroup$

Rosanswers logo

Hi, I have to publish on topic \cmd_vel a message:'{"linear":{"x":1,"y":0,"z":0}, "angular":{"x":0,"y":0,"z":0}}', of the type geometry_msgs/Twist using rosbridge v2.0. I have written: connection = new ros.Connection("ws://localhost:9090"); connection.publish('/cmd_vel', 'geometry_msgs/Twist', '{"linear":{"x":1,"y":0,"z":0}, "angular":{"x":0,"y":0,"z":0}}'); But the format message is for rosbridge v1.0. What I can write to publish the same message in the correct format of rosbridge v2.0? Thanks a lot!
Chiara


Originally posted by chiara300689 on ROS Answers with karma: 1 on 2013-02-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You could refer to the following rosjs example, https://github.com/RobotWebTools/keyboardteleopjs/blob/groovy-devel/keyboardteleop.js


Originally posted by clark with karma: 393 on 2013-02-04

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.