(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Launching a Hub

Description: Launching a rocon hub and debugging it via command line redis tools.

Tutorial Level: INTERMEDIATE

Next Tutorial: Writing a Hub Client


This tutorial is useful to developers who are directly utilising the hub's redis server.

The Redis Server

The rocon hub redis server uses its own redis server (doesn't use your system's default redis server). This is done to keep the configuration very low on memory usage and conflict free. The port it runs on can be configured by rosparam and by default it runs on port 6380.

> roslaunch rocon_hub hub.launch

Command Line Access

Connecting to the redis server is much like any other database (e.g. mysql).

> redis-cli -p 6380

Cheat Sheet

info - get information and statistics about the server
monitor - starts streaming every command processed by redis to the console
flushall - Remove all data
keys * - show all keys stored
set <key> - set a single key
get <key> - get a single key's value
sadd <key> <value> [<value>...] - add one or more members to a set
srem <key> <value> - remove one or more members from a set
smembers <key> - returns a list of members


For the default rocon hub startup above...

> redis> keys *
1) "rocon:hub:name"

> redis> get rocon:hub:name
"Rocon Hub"

Start monitoring, dynamically, all interactions on the redis server.

> redis> monitor

Wiki: rocon_hub/Tutorials/indigo/Launching a Hub (last edited 2014-03-25 00:12:36 by DanielStonier)