diff --git a/clearpath_generator_gz/clearpath_generator_gz/launch/sensors.py b/clearpath_generator_gz/clearpath_generator_gz/launch/sensors.py index 4c0bc59..7046a50 100644 --- a/clearpath_generator_gz/clearpath_generator_gz/launch/sensors.py +++ b/clearpath_generator_gz/clearpath_generator_gz/launch/sensors.py @@ -31,7 +31,7 @@ # of Clearpath Robotics. from clearpath_config.sensors.types.sensor import BaseSensor -from clearpath_config.sensors.types.lidars_2d import BaseLidar2D, HokuyoUST10, SickLMS1XX +from clearpath_config.sensors.types.lidars_2d import BaseLidar2D, HokuyoUST, SickLMS1XX from clearpath_config.sensors.types.lidars_3d import BaseLidar3D, VelodyneLidar from clearpath_config.sensors.types.cameras import BaseCamera, IntelRealsense from clearpath_config.sensors.types.imu import BaseIMU, Microstrain @@ -255,7 +255,7 @@ def __init__(self, ] MODEL = { - HokuyoUST10.SENSOR_MODEL: Lidar2dLaunch, + HokuyoUST.SENSOR_MODEL: Lidar2dLaunch, SickLMS1XX.SENSOR_MODEL: Lidar2dLaunch, IntelRealsense.SENSOR_MODEL: IntelRealsenseLaunch, Microstrain.SENSOR_MODEL: ImuLaunch, @@ -268,5 +268,5 @@ def __new__(cls, robot_namespace: str, launch_path: str, param_path: str) -> BaseLaunch: - return SensorLaunch.MODEL[sensor.SENSOR_MODEL]( + return SensorLaunch.MODEL.setdefault(sensor.SENSOR_MODEL, SensorLaunch.BaseLaunch)( sensor, robot_namespace, launch_path, param_path) diff --git a/clearpath_generator_gz/clearpath_generator_gz/param/generator.py b/clearpath_generator_gz/clearpath_generator_gz/param/generator.py index 1589eb0..c197ebc 100644 --- a/clearpath_generator_gz/clearpath_generator_gz/param/generator.py +++ b/clearpath_generator_gz/clearpath_generator_gz/param/generator.py @@ -41,7 +41,7 @@ def generate_sensors(self) -> None: pass def generate_platform(self) -> None: - for param in PlatformParam.PARAMETER: + for param in PlatformParam.PARAMETERS: platform_param = PlatformParam( param, self.clearpath_config, diff --git a/clearpath_gz/launch/robot_spawn.launch.py b/clearpath_gz/launch/robot_spawn.launch.py index ba4b5c2..37a9eca 100644 --- a/clearpath_gz/launch/robot_spawn.launch.py +++ b/clearpath_gz/launch/robot_spawn.launch.py @@ -36,6 +36,8 @@ from launch_ros.actions import Node from launch_ros.substitutions import FindPackageShare +import os + ARGUMENTS = [ DeclareLaunchArgument('rviz', default_value='false', @@ -67,7 +69,8 @@ def launch_setup(context, *args, **kwargs): yaw = LaunchConfiguration('yaw') # Parse robot YAML into config - clearpath_config = ClearpathConfig(str(setup_path.perform(context) + 'robot.yaml')) + clearpath_config = ClearpathConfig(os.path.join( + str(setup_path.perform(context)), 'robot.yaml')) namespace = clearpath_config.system.namespace if namespace in ('', '/'):