turtlebot / turtlebot4_robot

TurtleBot 4 Robot packages
Apache License 2.0
22 stars 20 forks source link

Fix: Oak-D parameters to use custom config file and Fixed launch file error #24

Closed harishkumarbalaji closed 11 months ago

harishkumarbalaji commented 1 year ago

Description

This PR addresses an issue in the generate_launch_description function in the turtlebot4_bringup/launch/oakd.launch.py launch file. Previously, the function included a namespace configuration that was redundant, as the namespace was already specified in the parameters file. This redundancy was causing an error as the namespace argument was not being passed to the turtlebot4_bringup/launch/lite.launch.py launch file.

The fix involves removing the namespace configuration from the generate_launch_description function, which not only resolves the error but also simplifies the code and prevents potential conflicts between the function and parameters file.

Fixes # (please add the issue number here). https://github.com/turtlebot/turtlebot4_robot/issues/23#issue-1931191865

Type of change

How Has This Been Tested?

The changes were tested by running the following command:

# Run this command
ros2 launch turtlebot4_bringup oakd.launch.py

Now the params are taken from the custom config file resulting in changes that we make in the oakd_lite.yaml or oakd_pro.yaml file.

Please provide further instructions if necessary. Official depthai_ros_driver camera launch file - camera.launch.py for reference.

Checklist

harishkumarbalaji commented 1 year ago

Sorry for not knowing the single quote preference in Python. Updated the commit with single quotes for the namespace variable.

roni-kreinin commented 11 months ago

@harishkumarbalaji Looks good to me. Can you fix the linter errors?

2: ./launch/oakd.launch.py:42:27: E128 continuation line under-indented for visual indent
2:                           description='Robot namespace')
2:                           ^
harishkumarbalaji commented 11 months ago

Done. Fixed the indent to,

        DeclareLaunchArgument('namespace', default_value='',
                              description='Robot namespace'),