Project

General

Profile

LaserDriver component

This is the LaserDriver component from the GenoM3 OSMOSIS show case. It controls an Hokuyo Laser.

It produces a Scan (out) port (similar to a ROS sensor_msgs/LaserScan).

Note Note that by default the intensities sequence is not filled.

Ports

Scan (out)

Data structure
  • struct ::laser::sensor_msgs_LaserScan Scan

    • struct ::laser::std_msgs_header header

      • unsigned long seq

      • struct ::laser::msgs_time stamp

        • unsigned long sec

        • unsigned long nsec

      • string frame_id

    • float angle_min

    • float angle_max

    • float angle_increment

    • float time_increment

    • float scan_time

    • float range_min

    • float range_max

    • sequence< float > ranges

    • sequence< float > intensities

The laser Scan port for other components to use.


Services

SetDevice (attribute)

Inputs
  • string device (default "/dev/hokuyo")

Set the device name for com.


SetBaudrate (attribute)

Inputs
  • long baudrate (default "115200")

Set the speed for com. Useless for USB.


SetFirstAngle (attribute)

Inputs
  • double first_angle (default "-1.57")

Set the first angle in rad.


SetLastAngle (attribute)

Inputs
  • double last_angle (default "1.57")

Set the last angle in rad.


SetAngleResolution (attribute)

Inputs
  • double angle_resolution (default "0")

Set the angle resolution.


SetVerbose (attribute)

Inputs
  • short verbose (default "0") Verbose level

Set the verbose level.


SetDelay (attribute)

Inputs
  • long usec_delay (default "200000")

Set the delay in usec we will delay port update (to test the monitor).


Stop (function)

Context

Stop laser scanning.


ConnectDevice (function)

Throws
  • exception ::LaserDriver::cant_open_device

  • exception ::LaserDriver::cant_set_parameter

  • exception ::LaserDriver::out_of_mem

Connect to the device


SetVerbose (function)

Inputs
  • long verbose_level (default "0") Verbose level

Set the verbose level.


Terminate (function)

Terminate the program by telling also ros it is finished.


ScanStart (activity)

Throws
  • exception ::LaserDriver::out_of_mem

  • exception ::LaserDriver::measurement_start_error

  • exception ::LaserDriver::measurement_error

  • exception ::LaserDriver::bad_scan_port

Context

Get a scan from the Hokuyo and publish it in the Scan (out) port.


Tasks

scan

Context
  • Frequency 10.0 Hz

Throws
  • exception ::LaserDriver::out_of_mem