diff --git a/README.md b/README.md
index 5a42192..457ab88 100644
--- a/README.md
+++ b/README.md
@@ -3,62 +3,45 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
## Overview
-
ROS device driver for the scanCONTROL series of laser line scanners of Micro Epsilon using the [scanCONTROL Linux C++ SDK 1.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, E. Bernardi
-Affiliation: [SAM XL](https://samxl.com/), [TU Delft](https://tudelft.nl/)
-Maintainer: D. Kroezen, d.kroezen@tudelft.nl**
+Author: **D. Kroezen** \
+Affiliation: [SAM XL](https://samxl.com/), [TU Delft](https://tudelft.nl/) \
+Maintainers:
+**D. Kroezen, d.kroezen@tudelft.nl**
+**E. Brnardi, e.bernardi@tudelft.nl**
+
+> [!WARNING]
+> This micro_epsilon_scancontrol package branch **is under development** for [ROS2 Humble](https://docs.ros.org/en/humble/index.html) and Ubuntu 22.04 Jammy!
-The micro_epsilon_scancontrol package has been tested under [ROS2 Humble](https://docs.ros.org/en/humble/index.html) and Ubuntu 22.04.3 Jammy LTS.
## Installation
#### Dependencies
-
- [Aravis 0.8.x](https://github.com/AravisProject/aravis/releases) [[docs]](https://aravisproject.github.io/aravis/)
- [scanCONTROL Linux C++ SDK 1.0.x](https://www.micro-epsilon.com/2D_3D/laser-scanner/Software/downloads/)
#### Building
+To build from source, clone the latest version from this repository into your workspace and compile the package:
-To build from source, clone the latest version from this repository into your catkin workspace and compile the package using:
-
- cd catkin_ws/src
- git clone https://github.com/sam-xl/micro_epsilon_scancontrol.git
- cd ../
- catkin build
-
-
-
-
-## Usage
-
-Run the main driver node with:
-
- roslaunch micro_epsilon_scancontrol_driver load_driver.launch
-
-
-
-## Launch files
-
-* **driver.launch:** Launch a single scanCONTROL driver node and the configuration window.
-
+```bash
+mkdir -p ros2_ws/src && cd ros2_ws/src
+git clone https://github.com/sam-xl/micro_epsilon_scancontrol.git -b ros2-devel
+cd ..
+colcon build
+```
## Nodes
+### scancontrol_description_node
+Visualise the scanCONTROL models
+```bash
+ros2 launch micro_epsilon_scancontrol_description load_scancontrol.launch.py
+```
+
+Possible models passed as arguments with `scancontrol_type:=`
+- `scancontrol_26x0_29x0_25.xacro` (default)
+- `scancontrol_27x0_100.xacro`
+- `scancontrol_30xx_25.xacro`
### scancontrol_driver_node
@@ -72,7 +55,8 @@ The scancontrol_driver_node connects to the scanCONTROL device and allows contro
#### Services
-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](https://www.micro-epsilon.com/2D_3D/laser-scanner/Software/downloads/). The rqt plugin uses these services to change the settings during runtime.
+Most servives are wrappers of the scanCONTROL API.
+The rqt plugin uses these services to change the settings during runtime.
* **`~set_feature`** ([micro_epsilon_scancontrol_msgs/SetFeature])
diff --git a/micro_epsilon_scancontrol_description/launch/load_scancontrol.launch.py b/micro_epsilon_scancontrol_description/launch/load_scancontrol.launch.py
index ead839a..222968f 100644
--- a/micro_epsilon_scancontrol_description/launch/load_scancontrol.launch.py
+++ b/micro_epsilon_scancontrol_description/launch/load_scancontrol.launch.py
@@ -1,47 +1,102 @@
+# Copyright 2023 SAM XL (Eugenio Bernardi)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
from launch import LaunchDescription
-from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument
-from launch.substitutions import LaunchConfiguration
+from launch.substitutions import (
+ LaunchConfiguration,
+ Command,
+ PathJoinSubstitution,
+ FindExecutable,
+)
+from launch_ros.substitutions import FindPackageShare
+from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os
-# Declare an argument for the URDF file
-args =[
- DeclareLaunchArgument(
- 'model',
- default_value='scancontrol_26x0_29x0_25.macro.xacro',
- description='URDF file to visualize'
- ),
-]
def generate_launch_description():
+ declared_arguments = []
+ # General arguments
+ declared_arguments.append(
+ DeclareLaunchArgument(
+ "description_package",
+ default_value="micro_epsilon_scancontrol_description",
+ description="Description package with URDF/XACRO files. Usually the argument \
+ is not set, it enables use of a custom description.",
+ )
+ )
+ # Declare argument for the URDF file selection
+ declared_arguments.append(
+ DeclareLaunchArgument(
+ "scancontrol_type",
+ default_value="scancontrol_26x0_29x0_25.xacro",
+ description="scanCONTROL URDF type file to visualize",
+ choices=[
+ "scancontrol_26x0_29x0_25.xacro",
+ "scancontrol_27x0_100.xacro",
+ "scancontrol_30xx_25.xacro",
+ ],
+ )
+ )
+ # General arguments
+ description_package = LaunchConfiguration("description_package")
+ # Initialize Arguments
+ scancontrol_type = LaunchConfiguration("scancontrol_type")
# Get the path to the URDF file
- urdf_file_path = os.path.join(get_package_share_directory('micro_epsilon_scancontrol_description'), 'urdf')
- robot_description = Command(['xacro', ' ', xacro_path, '/', 'samxl_eef_acf.xacro', ' ', 'fixed:=', LaunchConfiguration("fixed")])
-
+ urdf_file_path = os.path.join(
+ get_package_share_directory("micro_epsilon_scancontrol_description"), "urdf"
+ )
+ robot_description = Command(
+ [
+ PathJoinSubstitution([FindExecutable(name="xacro")]),
+ " ",
+ PathJoinSubstitution(
+ [FindPackageShare(description_package), "urdf", scancontrol_type]
+ )
+ ]
+ )
# Node to publish the URDF to the robot_description parameter
robot_state_publisher_node = Node(
- package='robot_state_publisher',
- executable='robot_state_publisher',
- name='robot_state_publisher',
- #output='both',
- output='screen',
- parameters=[{'robot_description': robot_description}],
+ package="robot_state_publisher",
+ executable="robot_state_publisher",
+ name="robot_state_publisher",
+ # output='both',
+ output="screen",
+ parameters=[{"robot_description": robot_description}],
)
# Node to start RViz2
rviz_node = Node(
- package='rviz2',
- executable='rviz2',
- name='rviz2',
- output='log',
- arguments=['-d', get_package_share_directory('micro_epsilon_scancontrol_description') + '/config/rviz.rviz'],
+ package="rviz2",
+ executable="rviz2",
+ name="rviz2",
+ output="log",
+ arguments=[
+ "-d",
+ get_package_share_directory("micro_epsilon_scancontrol_description")
+ + "/config/rviz.rviz",
+ ],
)
- return LaunchDescription(args + [
- robot_state_publisher_node,
- rviz_node,
- ])
\ No newline at end of file
+ return LaunchDescription(
+ declared_arguments
+ + [
+ robot_state_publisher_node,
+ rviz_node,
+ ]
+ )
diff --git a/micro_epsilon_scancontrol_description/launch/load_scancontrol_26x0_29x0_25.launch b/micro_epsilon_scancontrol_description/launch/load_scancontrol_26x0_29x0_25.launch
deleted file mode 100644
index e9af850..0000000
--- a/micro_epsilon_scancontrol_description/launch/load_scancontrol_26x0_29x0_25.launch
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/micro_epsilon_scancontrol_description/launch/load_scancontrol_27x0_100.launch b/micro_epsilon_scancontrol_description/launch/load_scancontrol_27x0_100.launch
deleted file mode 100644
index 3959768..0000000
--- a/micro_epsilon_scancontrol_description/launch/load_scancontrol_27x0_100.launch
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/micro_epsilon_scancontrol_description/launch/load_scancontrol_30xx_25.launch b/micro_epsilon_scancontrol_description/launch/load_scancontrol_30xx_25.launch
deleted file mode 100644
index b52b016..0000000
--- a/micro_epsilon_scancontrol_description/launch/load_scancontrol_30xx_25.launch
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/micro_epsilon_scancontrol_description/launch/test_scancontrol_26x0_29x0_25.launch b/micro_epsilon_scancontrol_description/launch/test_scancontrol_26x0_29x0_25.launch
deleted file mode 100644
index d3ba2bc..0000000
--- a/micro_epsilon_scancontrol_description/launch/test_scancontrol_26x0_29x0_25.launch
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/micro_epsilon_scancontrol_description/launch/test_scancontrol_27x0_100.launch b/micro_epsilon_scancontrol_description/launch/test_scancontrol_27x0_100.launch
deleted file mode 100644
index 03bc79d..0000000
--- a/micro_epsilon_scancontrol_description/launch/test_scancontrol_27x0_100.launch
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/micro_epsilon_scancontrol_description/launch/test_scancontrol_30xx_25.launch b/micro_epsilon_scancontrol_description/launch/test_scancontrol_30xx_25.launch
deleted file mode 100644
index a454e1e..0000000
--- a/micro_epsilon_scancontrol_description/launch/test_scancontrol_30xx_25.launch
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/micro_epsilon_scancontrol_description/meshes/collision/collision.stl b/micro_epsilon_scancontrol_description/meshes/collision/26x0_29x0_25.stl
similarity index 100%
rename from micro_epsilon_scancontrol_description/meshes/collision/collision.stl
rename to micro_epsilon_scancontrol_description/meshes/collision/26x0_29x0_25.stl
diff --git a/micro_epsilon_scancontrol_description/meshes/visual/visual.dae b/micro_epsilon_scancontrol_description/meshes/visual/26x0_29x0_25.dae
similarity index 100%
rename from micro_epsilon_scancontrol_description/meshes/visual/visual.dae
rename to micro_epsilon_scancontrol_description/meshes/visual/26x0_29x0_25.dae
diff --git a/micro_epsilon_scancontrol_description/package.xml b/micro_epsilon_scancontrol_description/package.xml
index 4bda097..2ec48f0 100644
--- a/micro_epsilon_scancontrol_description/package.xml
+++ b/micro_epsilon_scancontrol_description/package.xml
@@ -3,9 +3,9 @@
micro_epsilon_scancontrol_description
0.1.0
URDFs for the Micro-Epsilon scanCONTROL laser profile sensors.
- Rik Tonnaer (Delft University of Technology)
+ Eugenio Bernardi (Delft University of Technology)
- BSD
+ Apache 2.0
ament_cmake
diff --git a/micro_epsilon_scancontrol_description/urdf/scancontrol_26x0_29x0_25_macro.xacro b/micro_epsilon_scancontrol_description/urdf/scancontrol_26x0_29x0_25_macro.xacro
index 1986fe0..cdcdcd5 100644
--- a/micro_epsilon_scancontrol_description/urdf/scancontrol_26x0_29x0_25_macro.xacro
+++ b/micro_epsilon_scancontrol_description/urdf/scancontrol_26x0_29x0_25_macro.xacro
@@ -7,7 +7,7 @@
-
+
@@ -16,7 +16,7 @@
-
+