Configure RPLIDAR Namespaces with the Correct ROS 2 Launcher

Jason IP1 min read
Other ManufacturerRoboticsTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

The RPLIDAR container ignores robot_namespace and device_namespace when it starts the official launcher because those arguments are custom to the container integration. Start the custom launcher in /husarion_utils to apply both namespace options.

Why the namespace arguments have no effect

The supplied compose.yaml launches sllidar_ros2 through sllidar_launch.py. The official RPLIDAR package does not define robot_namespace or device_namespace, so passing those arguments to that launcher cannot configure the requested namespaces.

Configure the correct RPLIDAR launcher

Change the container launch command so that it begins with the custom launcher path:

ros2 launch /husarion_utils/rplidar.launch.py

Keep the required robot_namespace and device_namespace arguments in the container command. Do not redirect those custom arguments to sllidar_launch.py or the official repository launcher.

Verify the correction

  1. Confirm that the effective Compose command starts with ros2 launch /husarion_utils/rplidar.launch.py.
  2. Recreate or restart the RPLIDAR container using the changed Compose configuration.
  3. Inspect the resulting ROS 2 node and device names and confirm that they appear under the configured robot and device namespaces.

The reported resolution was the launcher change itself. The available evidence does not identify a newer compose.yaml version, so verify the active command instead of assuming that the latest image contains a corrected Compose definition.

FAQ

Why does robot_namespace have no effect in the RPLIDAR container?

robot_namespace is a custom launcher argument and is not defined by the official RPLIDAR package. Use /husarion_utils/rplidar.launch.py to process it.

Which ROS 2 launch command enables RPLIDAR namespaces?

Start the command with ros2 launch /husarion_utils/rplidar.launch.py, then retain the required namespace arguments in the container command.

Does sllidar_launch.py support robot_namespace and device_namespace?

Not through the custom argument mechanism described here. The evidence identifies both arguments as additions provided by the custom launcher, not arguments from the official package.

Back to blog