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

clearpath_diagnostics launch file does not work with other setup_paths #59

Open
SteveMacenski opened this issue Jun 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SteveMacenski
Copy link

Please provide the following information:

  • OS: 22.04
  • ROS 2 Distro: Humble
  • Built from source or installed: Source on main
  • Package version: N/A
  • Real hardware or simulation: N/A

Expected behaviour

    launch_diagnostics = IncludeLaunchDescription(
        PythonLaunchDescriptionSource([PathJoinSubstitution([
            FindPackageShare('clearpath_diagnostics'), 'launch', 'diagnostics.launch.py'])]),
        launch_arguments=[('setup_path', setup_path)],
        condition=UnlessCondition(use_simulation)
    )

Works, but for some reason I cannot get that setup path to be respected and I get errors in launch about no YAML can be found. After about 15 minutes of playing around I just copy pasted its contents into my launch file and works fine. the battery updater/estimator seem to get the setup_path correctly, and I'm not 100% sure why it is that this launch file isn't quite working (perhaps the opaque function?)

Actual behaviour

Works:


    launch_diagnostics = GroupAction([
        Node(
            package='diagnostic_aggregator',
            executable='aggregator_node',
            output='screen',
            parameters=[PathJoinSubstitution([
                get_package_share_directory('clearpath_diagnostics'), 'config', 'diagnostics.yaml'])],
            remappings=[
                ('/diagnostics', 'diagnostics'),
                ('/diagnostics_agg', 'diagnostics_agg'),
                ('/diagnostics_toplevel_state', 'diagnostics_toplevel_state')],
            condition=UnlessCondition(use_simulation)),
        Node(
            package='clearpath_diagnostics',
            executable='diagnostics_updater',
            output='screen',
            remappings=[
                ('/diagnostics', 'diagnostics'),
                ('/diagnostics_agg', 'diagnostics_agg'),
                ('/diagnostics_toplevel_state', 'diagnostics_toplevel_state')],
            arguments=['-s', setup_path],
            condition=UnlessCondition(use_simulation))
    ])
@SteveMacenski SteveMacenski added the bug Something isn't working label Jun 4, 2024
@SteveMacenski SteveMacenski changed the title clearpath_diagnostics launch file does not work with other setup_aths clearpath_diagnostics launch file does not work with other setup_paths Jun 4, 2024
@luis-camero
Copy link
Contributor

This issue was likely to do with the setup_path being passed in. The path resolution was naive and expected a directory to end with a / in order to join the robot.yaml file to the directory path. I'm assuming that this was the cause of your issues and why you were able to resolve it by getting rid of the requirement on the namespace, and therefore did not need to use the opaque function to load the robot.yaml. I have made the fix in #62.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants