ROS 2 device driver for the scanCONTROL series of laser line scanners of Micro Epsilon using the scanCONTROL Linux C++ SDK 1.0.0. The driver allows to connect to a (specific) scanCONTROL device, configure the sensor using predefined settings or at runtime and publishes the sensor data as point clouds.
Author: D. Kroezen (GitHub username: dave992)
Affiliation: SAM XL, TU Delft
Maintainer: D. Kroezen, d.kroezen@tudelft.nl
The micro_epsilon_scancontrol packages have been tested under ROS 2 Jazzy & Ubuntu 24.04, and ROS 2 Humble & Ubuntu 22.04.
To build from source, clone the lastest version from this repository into your workspace:
cd ros_ws/src
git clone https://github.com/sam-xl/scancontrol.gitInstall the dependencies of the cloned packages using rosdep:
cd ros_ws
rosdep install --from-paths src --ignore-src -yFinally, build all packages in the workspace:
cd ros_ws
colcon build [--merge-install] [--symlink-install]Run the main driver node with:
ros2 launch micro_epsilon_scancontrol_driver load_driver.launch- load_driver.launch: Launch a scanCONTROL driver node that connect to a single device.
- test_driver.launch: Visualize the live measurement data from the driver using RViz. By default uses the
26x0_29x0_25model.
- load_scancontrol_26x0_29x0_25.launch: Launch a
robot_state_publisherwith therobot_descriptionloaded for the26x0_29x0_25sensor series. - load_scancontrol_27x0_100.launch: Launch a
robot_state_publisherwith therobot_descriptionloaded for the27x0_100sensor series. - load_scancontrol_30xx_25.launch: Launch a
robot_state_publisherwith therobot_descriptionloaded for the30xx_25sensor series. - test_scancontrol_26x0_29x0_25.launch: Visialize the
robot_descriptionfor the26x0_29x0_25sensor series. - test_scancontrol_27x0_100.launch: Visialize the
robot_descriptionfor the27x0_100sensor series. - test_scancontrol_30xx_25.launch: Visialize the
robot_descriptionfor the30xx_25sensor series.
To see arguments that may be given to the launch file, run the following command:
ros2 launch <package> <file.launch> --show-argsThe scancontrol_driver_node connects to the scanCONTROL device and allows control of most settings through the provided services. By default the driver only extracts the xyz data from the measurement buffer to create the point cloud message. For now the additional measurement data such as reflections are discarted.
-
/scancontrol_pointcloud(sensor_msgs/PointCloud2)The laser scan data filtered by the partial profile settings. The last point(s) may get lost, as a timestamp overwrites the last 4 bytes of the measurement buffer.
Most servives are wrappers of the scanCONTROL API. For more information on the available settings and values see the documentation as part of the scanCONTROL Linux C++ SDK 0.2. The rqt plugin uses these services to change the settings during runtime.
-
~set_feature(micro_epsilon_scancontrol_msgs/SetFeature)Set a feature (setting) on the scanCONTROL device.
-
~get_feature(micro_epsilon_scancontrol_msgs/GetFeature)Get the current feature (setting) from the connected scanCONTROL device.
-
~get_resolution(micro_epsilon_scancontrol_msgs/GetResolution)Get the current active resolution used by the connected scanCONTROL device.
-
~set_resolution(micro_epsilon_scancontrol_msgs/SetResolution)Set the resultion of the connected scanCONTROL device.
-
~get_available_resolutions(micro_epsilon_scancontrol_msgs/GetAvailableResolutions)Retrieve a list of all available resolutions of the connected scanCONTROL device.
-
~invert_x(std_srvs/SetBool)Flip the X values around the middle of the laser line of the sensor.
-
~invert_z(std_srvs/SetBoolFlip the Z values around the middle of the measuring range of the sensor. Factory default value of of this setting is
True.
Device Settings
-
resolution(int)Define a prefered resolution setting for the laser scan. By default the highest available resolution is selected.
The following parameters are available to allow using multiple scanCONTROL devices.
-
serial(string)Define a prefered scanCONTROL device by its serial number. If not defined, the driver will try to connect to the first device it is able to find.
-
topic_name(string, default:scancontrol_pointcloud)Define a custom name for the topic to publish the point cloud data on.
-
frame_id(string, default:scancontrol)Define a custom name for the measurement frame in which the point clouds are published.
Please report bugs and request features using the Issue Tracker.