The passthrough driver acts as a client to another Player server; it returns data generated by the remote server to client programs, and send commands from the client programs to the remote server. In this way, one Player server can pretend to have devices that are actually located at some other location in the network (i.e., owned by some other Player server). Thus, the passthrough driver makes possible two important capabilities:
The passthrough driver will support any of Player's interfaces, and can connect to any Player device.
Name | Type | Default | Meaning |
host | string | localhost | Host name for the machine running the remote Player server. |
port | integer | 6665 | Port number for remote server. |
index | integer | 0 | Index of the device on the remote server. |
The passthrough driver can be used to aggregate devices from multiple robots into a single server. The following example illustrates the general method for doing
position:0 (driver "p2os_position") laser:0 (driver "sicklms200")In this example, the robots are assumed to be Pioneer's with SICK laser range-finders.
position:0 (driver "passthrough" host "bee" port 6665 index 0) laser:0 (driver "passthrough" host "bee" port 6665 index 0) position:1 (driver "passthrough" host "bug" port 6665 index 0) laser:1 (driver "passthrough" host "bug" port 6665 index 0)A client connecting to orac will see four devices: two position devices and two laser devices. Both robots can now be controlled through a single connection to orac.
Computationally expensive drivers (such as adaptive_mcl) can be shifted off the robot and onto a workstation. The basic method is a straight-forward variant of the example given above.
position:0 (driver "p2os_position") laser:0 (driver "sicklms200")The robot is assumed to be a Pioneer with a SICK laser range-finder.
position:0 (driver "passthrough" host "bee" port 6665 index 0) laser:0 (driver "passthrough" host "bee" port 6665 index 0) localize:0 (driver "adaptive_mcl" position_index 0 laser_index 0 ...)(see Section 7.3 for a detailed description of the additional setings for the adaptive_mcl driver). Clients connecting to this server will see a robot with position, laser and localize devices, but all of the heavy computation will be done on the workstation.
Some newer drivers, such as the adaptive_mcl driver, are not supported natively in Stage. For these drivers users must employ a second Player server configured to use the passthrough driver. The basic procedure is as follows.
... position (port 6665 laser ()) ...Stage will create one robot (position device) with a laser, and will start a Player server that listens on port 6665.
player -p 7000 amcl.cfgwhere the configuration file amcl.cfg looks like this (see Section 7.3 for a detailed description of the setings for the adaptive_mcl driver):
position:0 (driver "passthrough" port 6665 index 0) laser:0 (driver "passthrough" port 6665 index 0) localize:0 (driver "adaptive_mcl" position_index 0 laser_index 0 ...)The second Player server will start up and listen on port 7000; clients connecting to this server will see a robot with position, laser and localize devices.