filmov
tv
Creating a Chat Room using Robot Operating System

Показать описание
The task undertaken involves the creation of a chatroom for users where they can view and send messages that all other users can see. The chat room must have at least 3 users/nodes that connect to the same.
My approach initially involved the creation of 3 separate publisher nodes (called talker1, talker2, talker3) that published to a common topic "chatter". Another node called listener subscribed to the same topic and displayed all the messages shared by the three users. However, in this approach each user could not see other's messages in their own window.
Hence, I created 3 nodes (talker1, talker2, talker3) which can both publish and subscribe to the same topic "chatter". No custom messages were used for this task as it was sufficient to use the std_msgs/String for handling string data used as messages in the chatroom. No services were used either. Each node uses the time library in order to display the current time at which each message is being sent.
My approach initially involved the creation of 3 separate publisher nodes (called talker1, talker2, talker3) that published to a common topic "chatter". Another node called listener subscribed to the same topic and displayed all the messages shared by the three users. However, in this approach each user could not see other's messages in their own window.
Hence, I created 3 nodes (talker1, talker2, talker3) which can both publish and subscribe to the same topic "chatter". No custom messages were used for this task as it was sufficient to use the std_msgs/String for handling string data used as messages in the chatroom. No services were used either. Each node uses the time library in order to display the current time at which each message is being sent.