ROS packages to enable communication between ROS and Slack.
First of all, you have to install python_slackclient.
Then, install this package :
cd ~/catkin_ws/src
git clone https://github.com/smart-robotics-team/slack-ros-pkg.git
cd ~/catkin_ws
catkin_make --pkg slack_ros
Just run :
rosrun slack_ros slack_ros.py _token:="xoxp-123456789" _channel:="G123456789Q" _username:="ROSbot"
You can run in another terminal the test program :
rosrun slack_ros slack_test.py
This node makes the communication between ROS and Slack. You have to enter some parameters to make it works. It listen what you write in Slack and publish it on a topic. On the other hand, you can write in a topic to make your bot speak in Slack.
token (string, default: xoxp-123456789)
You have to place here, the generated token from https://api.slack.com/web#authentication (you can generate a test token for your slack team).
channel (string, default: G1234567Q)
Enter the channel where you want to speak with your bot. For example, you can type #general if your channel is public. If your channel is private, use https://api.slack.com/methods/groups.list/test to find the correct string.
username (string, default: ros-bot)
The name given to your bot in Slack.
from_slack_to_ros (std_msgs::String)
This topic will show you what people say in the selected channel.
from_ros_to_slack (std_msgs::String)
This topic is used to send a MESSAGE in the selected Slack channel.
send_file_to_slack (std_msgs::String)
This topic is used to send a FILE in the selected Slack channel.
This node is used to test your communication between ROS and Slack. The node wait that you write something on Slack, on the correct channel. Then, the bot will answer you in Slack with : "You just say : XXXXXXX".
from_ros_to_slack (std_msgs::String)
This topic will send the answer of the bot in Slack.
from_slack_to_ros (std_msgs::String)
This topic subscribe what you say in Slack.
In this image, you can see the Slack channel with the bot speaking :
In this image, you can see in ROS what has been said in the Slack channel :