Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UST changes #10

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion clearpath_gz/launch/robot_spawn.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare

import os


ARGUMENTS = [
DeclareLaunchArgument('rviz', default_value='false',
Expand Down Expand Up @@ -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 ('', '/'):
Expand Down