Skip to content

smart-robotics-team/slack-ros-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-ros-pkg

General description

ROS packages to enable communication between ROS and Slack.

Installation

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

Usage

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

Node: slack_ros.py (in package slack_ros)

Description

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.

Parameters

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.

Published Topics

from_slack_to_ros (std_msgs::String)

This topic will show you what people say in the selected channel.

Subscribed Topics

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.

Node: slack_test.py (in package slack_ros)

Description

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".

Parameters

Published Topics

from_ros_to_slack (std_msgs::String)

This topic will send the answer of the bot in Slack.

Subscribed Topics

from_slack_to_ros (std_msgs::String)

This topic subscribe what you say in Slack.

Example

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 :

About

ROS package to enable communication with Slack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages