Laser Range Finder Plugin
Hardware driver plugin to access data from 2D laser range finders. It currently supports the Hokuyo URG and Lase EDL.
An arbitrary number of laser input devices can be configured. For each laser, a separate acquisition thread will be started, retrieving the data concurrently to the main loop. A separate thread will be started for each acquisition thread that posts new data if available during the sensor hook. There exists one distinguished "main" laser sensors, which can be visualized using the LaserGUI?.
For the Hokuyo devices the plugin can either use the vendor's own urg library, or the Gearbox 9.11 implementation of the SCIP 2.0 protocol. It has been tested successfully for the URG-04LX-UG01 with both.
The Lase EDL driver assumes a USB CAN adapter using the Peak Systems Linux CAN driver. The communication protocol is implemented within Fawkes, no external library (besides the PCAN driver) is required. It has been tested with a customized Lase EDL L A. The compatibility to other devices by Lase is unknown. Note: The PCAN driver can be compiled in two different access modes, either in "chardev" mode (access device as a device file) or in "netdev" mode (use socket API). This plugin requires the chardev mode, but netdev mode is the default. To enable chardev mode, compile the PCAN driver with make all NET=NO_NETDEV_SUPPORT.
Requires
Config Values
The configuration values below show example configurations for the URG laser scanner (for both, the urg and Gearbox libraries) and the LaseEDL scanner. You can omit or disable a configuration if not used. Replace the <urg>, <urg_gbx>, or <lase_edl> place holders with a symbolic name. The laser interface will have this in its ID. The default configuration simply omits the arrow braces. Note that you can have only one configuration marked as main sensor.
| Path | Type | Description | Default | R |
| /hardware/laser/<urg>/active | bool | Enable this configuration? | 0 | |
| /hardware/laser/<urg>/main_sensor | bool | Make this the default sensor, i.e. interface ID "Laser"? | 1 | |
| /hardware/laser/<urg>/type | string | Configuration is for Hokuyo URG laser range finder using URG library | urg | |
| /hardware/laser/<urg>/device | string | Device file | /dev/ttyACM0 | |
| /hardware/laser/<urg_gbx>/active | bool | Enable this configuration? | 0 | |
| /hardware/laser/<urg_gbx>/main_sensor | bool | Make this the default sensor, i.e. interface ID "Laser"? | 1 | |
| /hardware/laser/<urg_gbx>/type | string | Configuration is for Hokuyo URG laser range finder using the Gearbox library | urg_gbx | |
| /hardware/laser/<urg_gbx>/device | string | Device file | /dev/ttyACM0 | |
| /hardware/laser/<lase_edl>/active | bool | Enable this configuration? | 0 | |
| /hardware/laser/<lase_edl>/main_sensor | bool | Make this the default sensor, i.e. interface ID "Laser"? | 1 | |
| /hardware/laser/<lase_edl>/clockwise_angle | bool | Reverse default angle direction to clockwise? | 1 | |
| /hardware/laser/<lase_edl>/type | string | Configuration is for Lase EDL laser range finder | lase_edl | |
| /hardware/laser/<lase_edl>/interface_type | string | Interface type, currently only usb | usb | |
| /hardware/laser/<lase_edl>/use_default | bool | Use default settings from flash? | 0 | |
| /hardware/laser/<lase_edl>/set_default | bool | Store default settings in flash? | 0 | |
| /hardware/laser/<lase_edl>/canonical_resolution | string | Canonical resolution, if set overrides rotation_freq and angle_step; one of low (1 deg, 20 Hz) or high (0.5 deg, 15 Hz) | high | |
| /hardware/laser/<lase_edl>/rotation_freq | unsigned int | Maximum rotation frequency; Hz | 20 | |
| /hardware/laser/<lase_edl>/angle_step | unsigned int | Angle step; 1/16th degree | 16 | |
| /hardware/laser/<lase_edl>/max_pulse_freq | unsigned int | Max pulse frequency; Hz | 10800 | |
| /hardware/laser/<lase_edl>/profile_format | unsigned int | Profile format, 0x0100 only distances, 0x0400 only echoes, 0x0500 both | 256 | |
| /hardware/laser/<lase_edl>/can_id | unsigned int | CAN ID of laser | 683 | |
| /hardware/laser/<lase_edl>/can_id_resp | unsigned int | CAN ID response | 1808 | |
| /hardware/laser/<lase_edl>/sensor_id | unsigned int | Sensor ID in laser | 16 | |
| /hardware/laser/<lase_edl>/sensor_id_resp | unsigned int | Sensor ID response | 3 | |
| /hardware/laser/<lase_edl>/btr0btr1 | unsigned int | Baud rate key, 0x14 for 1 MBit/s | 20 | |
| /hardware/laser/<lase_edl>/port | unsigned int | Port, 0 for default | 0 | |
| /hardware/laser/<lase_edl>/irq | unsigned int | IRQ, 0 for default | 0 | |
| /hardware/laser/<lase_edl>/num_init_tries | unsigned int | Number of times to try initialization | 5 | |
| /hardware/laser/<lase_edl>/mount_rotation | float | Rotation of the laser towards front; degree | 180 | |
| /hardware/laser/<lase_edl>/use_dead_spots_filter | bool | If true, the fflaser_calibrate tool must be used to gain information about dead spots, which are then extracted with a filter | 0 |
Provides
BlackBoard Interfaces
- Laser360Interface::Laser: Provided if a main sensor has been defined.
- Laser720Interface::Laser: Provided if a main sensor has been defined and this sensor supports high resolution scans (Lase EDL).
- Laser360Interface::Laser <ID>: Provided for laser range finders which are not the main sensors. <ID> is replaced by the configuration name.
- Laser360Interface::Laser <ID>: Provided for laser range finders which are not the main sensors and which support high resolution scans (Lase EDL). <ID> is replaced by the configuration name.
Compilation and Runtime Requirements
- URG library (urg and urg-devel on Fedora)
- Gearbox library (gearbox and gearbox-devel on Fedora)
- Peak Systems PCAN library
These libraries are all optional. If none is available, the plugin will not be built, as no hardware drivers would be available.
Usage Instructions
Connect the laser range finders you wish to use to your robot. Then create or adapt the configurations matching your setup. In most cases, enabling one of the default entries should suffice. For example, to use a Hokuyo URG using the urg library run Fawkes, configure it, and run the plugin like this:
fawkes ffconfig set /hardware/laser/urg/active true ffconfig set /hardware/laser/urg/main_sensor true bool ffplugin -l laser
You should see the parameters of the Hokuyo scanner in the Fawkes log. Make sure that the Fawkes process has access to the device file, for example using sudo chmod 666 /dev/ttyACM0 for the first connected scanner.
Afterwards, you can run the LaserGUI? to view the laser data in real-time as it is written to the blackboard.

