Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 2.52 KB

README.md

File metadata and controls

65 lines (47 loc) · 2.52 KB

Telegram bot for your ROS enabled robot

Given that the realtime chatting app Telegram enables the use of bots why not connect your robot via that service?

Requisites

You need python-telegram-bot.

sudo pip install python-telegram-bot --upgrade

You need to get a TOKEN talking to the @botfather bot as described here. Remember you can use the Telegram web client, although you still need a phone with telegram to allow connecting to it.

Configure

Copy from config/example_token.yaml to token.yaml and add your token.

cp `rospack find telegram_robot`/config/example_token.yaml `rospack find telegram_robot`/config/token.yaml

Launch

You can test if your token works with:

roslaunch telegram_robot echobot_example.launch

The bot should echo what you write to it.

What can you do

  • To publish anything the bot receives in the chat in a std_msgs/String topic (/telegram_bot/telegram_chat) use:
roslaunch telegram_robot chat_pub.launch

Then you can do whatever you want with the sentences from any other node you program.

  • To make the robot answer you back an image of your choosing of any sensor_msgs/Image topic available:
roslaunch telegram_robot chat_pub.launch

capture of the telegram chat

Watch it working in this video.

  • To drive the robot via a geometry_msgs/Twist topic run:
roslaunch telegram_robot arrows.launch

capture of the custom keyboard

Watch it working in this video.

How we got here

Telegram recommends the Python libraries:

And googling you also find:

So we choose python-telegram-bot after checking which had the biggest and most active community of users and also had good documentation.