teleop_twist_joy reverts to defaults parameters after launch with joy:=true

5 views
Skip to first unread message

Mark Barton

unread,
Sep 27, 2025, 10:01:56 AM (13 days ago) Sep 27
to LINOROBOT
Whenever I launch with the following, the teleop_twist_joy parameters are set to the package default and not the values from the joy.yaml file.

ros2 launch linorobot2_bringup bringup.launch.py joy:=true

def generate_launch_description():
   joy_config_path = PathJoinSubstitution(
        [FindPackageShare("linorobot2_bringup"), "config", "joy.yaml"]
    )
    return LaunchDescription([
        Node(
            package='joy_linux',
            executable='joy_linux_node',
            name='joy_linux_node',
            output='screen',
        ),

        Node(
            package='teleop_twist_joy',
            executable='teleop_node',
            name='teleop_twist_joy_node',
            output='screen',
            parameters=[joy_config_path]
        )
    ])

After a bit of searching I found this  which has a different way of finding joy.yaml and it does work:
:
from ament_index_python.packages import get_package_share_directory
def generate_launch_description():
    config_dir = os.path.join(get_package_share_directory('linorobot2_bringup'), 'config')
    params_file = os.path.join(config_dir, 'joy.yaml')

    return LaunchDescription([
        Node(
            package='joy_linux',
            executable='joy_linux_node',
            name='joy_linux_node',
            output='screen',
        ),

        Node(
            package='teleop_twist_joy',
            executable='teleop_node',
            name='teleop_twist_joy_node',
            output='screen',
            parameters=[params_file]
        )
    ])

I see how the second version works and it makes more sense to me, but I don't see why the first version doesn't work. Any thoughts?

Chuck Illingworth
Paul Bouchier

I tried four times to respond to my post regarding nodes now showing up  but the messages were deleted. I even tried different wording but no joy. Setting ROS_DOMAIN_ID to 0 did solve my issue. Thanks for that.

Mark 

Reply all
Reply to author
Forward
0 new messages