This accessor exposes a subset of commands and sensor data for a type of robot called a "Scarab" created by Prof. Vijay Kumar's group at the University of Pennsylvannia (see ). This accessor communicates with the robot through a websocket connection to ROS, the Robotic Operating System, using a websocket interface for ROS called ROSBridge.
This accessor requires very specific hardware. In the usual configuration, the ROS core and ROS bridge are executed on a SwarmBox, and robot itself operates as a ROS client. The ROS bridge provides a websocket that can be used to publish and subscribe to ROS events.
Following are instructions for running this accessor in the DOP Center setup at Berkeley:
- Get your laptop on the SwarmMaster network, hosted by a SwarmBox.
- Connect to the Swarmbox using ssh. E.g.: ssh -l sbuser 192.168.0.111 You will need a password.
- Start screen on the swarmbox: screen
- Run the ROS core: roscore
- Create a new "window" in screen: Ctrl-A C
- Run the ROS bridge: roslaunch rosbridge_server rosbridge_websocket.launch
- Detach from screen: Ctrl-A D
ROSBridge on Swarmbox will be running at IP 192.168.0.111, port 9090.
You can now log off from the swarmbox. To stop the ROS core and bridge on the SwarmBox later, you can:
- Connect to the Swarmbox using ssh, as above.
- Resume screen on the swarmbox: screen -r
- Stop the program: Ctrl-C
- End the "window": Ctrl-D
- Repeat for all screen windows.
Next, set up the robot. The DOP center robot is Lucy, and the ROS prefix for pub/sub is "/scarab/lucy".
- Power on the robot (all switches and one push button).
- Find the robot's IP address. You can use the Discovery swarmlet or command-line tools. The DOP center robot Lucy has mac address "4:f0:21:3:6:9".
- Connect to the robot using ssh: e.g., assuming the IP address is 192.168.0.105, ssh 192.168.0.105 -l terraswarm
- Enter the password.
- Start screen: screen
- Tell the robot it's IP address: export ROS_IP=192.168.0.105
- Launch the ROS client: roslaunch scarab dop.launch robot:=lucy map_file:=dop.yaml
- Detach from screen and log off (if you like): Ctrl-A D
- Nathan Michael, Michael M. Zavlanos, Vijay Kumar, and George J. Pappas, Distributed Multi-Robot Task Assignment and Formation Control, IEEE International Conference on Robotics and Automation (ICRA), Pasadena, CA, USA, May 19-23, 2008. DOI: 10.1109/ROBOT.2008.4543197
||The percentage of battery remaining.|
||The current state of the robot's navigation algorithm. It can be one of 'idle', 'navigating', or 'stuck'. If the robot is 'idle' it is currently not trying to navigate to any pose. In 'navigating' state, the robot is actively trying to reach a desired pose goal. If the robot is unable to find a path to the goal (beacuse there were obsticals in the way), it will enter the 'stuck' state.|
||The "pose" type of where the robot currently is. See the input "pose" for a description of the format.|
||The IP address of the ROS bridge, e.g. '192.168.0.111'.|
||The port used by the ROS bridge web socket, e.g. 9090.|
||The identifier for the robot, e.g. '/scarab/lucy'.|
Initialize the accessor by attaching functions to inputs and opening web socket connections to RosBridge.
Set up the accessor by defining the parameters, inputs, and outputs.