ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

ros2 simple message to rosbridge_suite

asked 2022-02-25 11:34:06 -0500

vKuehn gravatar image

updated 2022-03-06 09:40:36 -0500

on ros2 foxy( Ubuntu 20.04) I installed rosbridge

Through a web socket I created the topic three with that message.

{ “op”: “advertise”, “topic”: “/three”, “type”: “std_msgs/String” }

but failed send than sending a simple string with that

{ “op”: “publish”, “topic”: “/three”, “type”: “”, “msg”: “forward” }

or that

{ “op”: “publish”, “topic”: “/three”, “type”: “std_msgs/String”, “msg”: “forward” }

what would be the right way to post a simple text message ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-03-06 09:29:42 -0500

vKuehn gravatar image

found the answer in the testcode of rosbridge suite

creating the topic { "op": "advertise", "topic": "/a_topic", "type": "std_msgs/String" }

sending simple message { "op": "publish", "topic": "/a_topic", "msg": { "data": "Hellow World" }}

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-02-25 11:34:06 -0500

Seen: 61 times

Last updated: Mar 06