Accessor: robotics/Scarab

robotics/Scarab

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 [1]). 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:

  1. Get your laptop on the SwarmMaster network, hosted by a SwarmBox.
  2. Connect to the Swarmbox using ssh. E.g.: ssh -l sbuser 192.168.0.111 You will need a password.
  3. Start screen on the swarmbox: screen
  4. Run the ROS core: roscore
  5. Create a new "window" in screen: Ctrl-A C
  6. Run the ROS bridge: roslaunch rosbridge_server rosbridge_websocket.launch
  7. 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:

  1. Connect to the Swarmbox using ssh, as above.
  2. Resume screen on the swarmbox: screen -r
  3. Stop the program: Ctrl-C
  4. End the "window": Ctrl-D
  5. 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".

  1. Power on the robot (all switches and one push button).
  2. 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".
  3. Connect to the robot using ssh: e.g., assuming the IP address is 192.168.0.105, ssh 192.168.0.105 -l terraswarm
  4. Enter the password.
  5. Start screen: screen
  6. Tell the robot it's IP address: export ROS_IP=192.168.0.105
  7. Launch the ROS client: roslaunch scarab dop.launch robot:=lucy map_file:=dop.yaml
  8. Detach from screen and log off (if you like): Ctrl-A D

References

  1. 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
Version:
  • $$Id$$
Author:
  • Brad Campbell, Pat Pannuto. Contributor: Edward A. Lee
Source:
Inputs:
Name Type Description
pose array:.<{position:: {x:: 0:, y:: 0:, z:: 0:}, orientation:: {x:: 0:, y:: 0:, z:: 0:, w:: 0:}}> Send the robot to a location with a given orientation, where orientation is a quaternion.
cmdvel array:.<{linear:: {x:: 0:, y:: 0:, z:: 0:}, angular:: {x:: 0:, y:: 0:, z:: 0:}}> Low-level control for the wheel motors. To drive the robot straight forward and backward, set the linear.x property to a value between -1.0 (backwards) and 1.0 (forwards). To turn the robot, set the angular.z property to a value between -1.0 and 1.0. Both can be to steer the robot while it drives forward or backward. The other properties are ignored. Note that this interface is not recommended for normal operation. In the general case, only `pose` should be used to direct the robot.
cancel Upon receiving any message, cancel the robot's current navigation goal. This will cause the robot to stop.
Outputs:
Name Type Description
battery The percentage of battery remaining.
state 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.
location The "pose" type of where the robot currently is. See the input "pose" for a description of the format.
Parameters:
Name Type Description
server The IP address of the ROS bridge, e.g. '192.168.0.111'.
port The port used by the ROS bridge web socket, e.g. 9090.
topicPrefix The identifier for the robot, e.g. '/scarab/lucy'.

Methods

(static) initialize()

Initialize the accessor by attaching functions to inputs and opening web socket connections to RosBridge.

Source:

(static) setup()

Set up the accessor by defining the parameters, inputs, and outputs.

Source: