Rostweet is a twitter client for ROS. It allows your robots to send tweets to its followers, and to receive tweets from its following contacts. Rostweet can be applied in many different ways, these are some examples:
- Communicating progress. Robots running ROS can use rostweet for reporting feedback: task progress, failure detection, etc.
- Sharing new knowledge. After acquiring new information, a robot can use rostweet in order to share it with its followers, e.g. how to grasp an object, a new environment map, etc.
- Acquiring new knowledge. By listening to the others’ tweets, a new source of incoming information is created and can be used for enlarging the robot knowledge.
- Just fun! Let your robot read your tweets, etc.
In general, rostweet can be useful for instantaneous and decentralized robot-robot, robot-human and human-robot sharing of information.
Rostweet is delivered as a ROS stack. It can be downloaded from the uji-ros-pkg google code project repository:
svn co http://uji-ros-pkg.googlecode.com/svn/trunk/rostweet
After downloading and placing it in a folder inside your ROS_PACKAGE_PATH, it should compile with:
and run with:
rosrun rostweet rostweet
This will ask for a twitter username and password and start the node afterwards (by running the node for the first time, you implicitly accept rostweet as a twitter application in your account, and allow it to read your timeline and publish tweets). Once the node is running, other nodes can subscribe to incoming tweets at /rostweet/incomingTweet (of type rostweet_msgs/IncomingTweet), and publish tweets by calling to the service /rostweet/postTweet (of type rostweet_msgs/postTweet). There is an example node for posting e.g.:
View incoming tweets:
rostopic echo /rostweet/incomingTweet/tweet
Send a tweet:
rosrun rostweet post "Hello world from rostweet"
Without any parameters, each time rostweet is executed, it will ask for username, password, and will get the OAuth tokens. If you want to skip some of these steps, you can set them with the following parameters via rosparam:
After the first execution, the username and token keys are stored in a file inside the launch/ folder in YAML format. With it you can easily write a launch file in order to set the parameters automatically:
<node name="rostweet" pkg="rostweet" type="rostweet" output="screen">
<rosparam command="load" file="$(find rostweet)/launch/paramFile.yaml" />
Please check also our more recent post about tweeting with pictures.
For support, please post to ROS-Answers.