Skip to content

Humble 1.3 Release #80

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

Merged
merged 4 commits into from
Apr 15, 2025
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 @@ -243,4 +243,15 @@ def generate_platform(self) -> None:

def generate_manipulators(self) -> None:
manipulators_service_launch_writer = LaunchWriter(self.manipulators_service_launch_file)
if self.clearpath_config.manipulators.get_all_manipulators():
if self.clearpath_config.manipulators.moveit.enable:
manipulators_service_launch_writer.add(LaunchFile(
name='moveit',
package=self.pkg_clearpath_manipulators,
args=[
('setup_path', self.setup_path),
('use_sim_time', 'true'),
('namespace', self.namespace)
]
))
manipulators_service_launch_writer.generate_file()
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
NovatelSmart7)
from clearpath_config.sensors.types.imu import BaseIMU, Microstrain, CHRoboticsUM6, RedshiftUM7
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.lidars_3d import BaseLidar3D, OusterOS1, VelodyneLidar
from clearpath_config.sensors.types.sensor import BaseSensor
from clearpath_config.common.utils.yaml import write_yaml

Expand Down Expand Up @@ -275,6 +275,7 @@ def __init__(
Microstrain.SENSOR_MODEL: ImuParam,
RedshiftUM7.SENSOR_MODEL: ImuParam,
VelodyneLidar.SENSOR_MODEL: Lidar3dParam,
OusterOS1.SENSOR_MODEL: Lidar3dParam,
Garmin18x.SENSOR_MODEL: GPSParam,
NovatelSmart6.SENSOR_MODEL: GPSParam,
NovatelSmart7.SENSOR_MODEL: GPSParam,
Expand Down
24 changes: 22 additions & 2 deletions clearpath_gz/launch/robot_spawn.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
description='Gazebo World'),
DeclareLaunchArgument('setup_path',
default_value=[EnvironmentVariable('HOME'), '/clearpath/'],
description='Clearpath setup path')
description='Clearpath setup path'),
DeclareLaunchArgument('generate',
default_value='true',
choices=['true', 'false'],
description='Generate parameters and launch files')
]

for pose_element in ['x', 'y', 'yaw']:
Expand All @@ -67,6 +71,7 @@ def launch_setup(context, *args, **kwargs):
use_sim_time = LaunchConfiguration('use_sim_time')
x, y, z = LaunchConfiguration('x'), LaunchConfiguration('y'), LaunchConfiguration('z')
yaw = LaunchConfiguration('yaw')
generate = LaunchConfiguration('generate')

# Parse robot YAML into config
clearpath_config = ClearpathConfig(os.path.join(
Expand All @@ -88,6 +93,8 @@ def launch_setup(context, *args, **kwargs):
setup_path, 'platform/launch', 'platform-service.launch.py'])
launch_file_sensors_service = PathJoinSubstitution([
setup_path, 'sensors/launch', 'sensors-service.launch.py'])
launch_file_manipulators_service = PathJoinSubstitution([
setup_path, 'manipulators/launch', 'manipulators-service.launch.py'])

group_action_spawn_robot = GroupAction([

Expand All @@ -103,6 +110,10 @@ def launch_setup(context, *args, **kwargs):
('prefix', ['/world/', world, '/model/', robot_name, '/link/base_link/sensor/'])]
),

IncludeLaunchDescription(
PythonLaunchDescriptionSource([launch_file_manipulators_service]),
),

# Spawn robot
Node(
package='ros_gz_sim',
Expand All @@ -123,6 +134,7 @@ def launch_setup(context, *args, **kwargs):
executable='generate_description',
name='generate_description',
output='screen',
condition=IfCondition(generate),
arguments=['-s', setup_path]
)

Expand All @@ -131,6 +143,7 @@ def launch_setup(context, *args, **kwargs):
executable='generate_semantic_description',
name='generate_semantic_description',
output='screen',
condition=IfCondition(generate),
arguments=['-s', setup_path]
)

Expand All @@ -139,6 +152,7 @@ def launch_setup(context, *args, **kwargs):
executable='generate_launch',
name='generate_launch',
output='screen',
condition=IfCondition(generate),
arguments=['-s', setup_path]
)

Expand All @@ -147,6 +161,7 @@ def launch_setup(context, *args, **kwargs):
executable='generate_param',
name='generate_launch',
output='screen',
condition=IfCondition(generate),
arguments=['-s', setup_path]
)

Expand Down Expand Up @@ -187,7 +202,7 @@ def launch_setup(context, *args, **kwargs):
condition=IfCondition(LaunchConfiguration('rviz')),
)

return [
actions = [
node_generate_description,
event_generate_description,
event_generate_semantic_description,
Expand All @@ -196,6 +211,11 @@ def launch_setup(context, *args, **kwargs):
rviz
]

if not generate.perform(context):
actions.append(group_action_spawn_robot)

return actions


def generate_launch_description():
# Define LaunchDescription variable
Expand Down