Skip to content

Commit

Permalink
Update Realsense camera launch file to work with new firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewHWang1605 committed Jan 29, 2025
1 parent f93459d commit bd50b4e
Showing 1 changed file with 34 additions and 20 deletions.
54 changes: 34 additions & 20 deletions ff_drivers/launch/rs_d455.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,47 @@


from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, GroupAction
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch_ros.actions import Node

from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node, SetParameter, PushRosNamespace
from launch_ros.substitutions import FindPackageShare

def generate_launch_description():
robot_name = LaunchConfiguration("robot_name")
camera_name = LaunchConfiguration("camera_name")

launch_camera = IncludeLaunchDescription(
PythonLaunchDescriptionSource([
PathJoinSubstitution([
FindPackageShare('realsense2_camera'),
'launch',
'rs_launch.py'
])
]),
launch_arguments={
"camera_name":camera_name,
"initial_reset":"True",
"rgb_camera.profile":"640x360x30",
"depth_module.profile":"640x360x30",
"rgb.enable_auto_white_balance":"False",
"rgb_enable_white_balance":"3800.0",
"rgb_enable_auto_exposure":"False",
"enable_infra1":"False",
"enable_infra2":"False",
}.items()
)

return LaunchDescription(
[
DeclareLaunchArgument("robot_name", default_value="robot"),
Node(
package="realsense2_camera",
executable="realsense2_camera_node",
name="realsense2_camera_node",
namespace=PathJoinSubstitution([robot_name, "camera"]),
parameters=[
{
"depth_module.profile": "640x360x30",
"rgb_camera.profile": "640x360x30",
"rgb_camera.enable_auto_exposure": False,
"rgb_camera.enable_auto_white_balance": False,
"rgb_camera.white_balance": 3800.0,
"enable_infra1": False,
"enable_infra2": False,
}
],
),
DeclareLaunchArgument("camera_name", default_value="camera"),
GroupAction(
actions=[
PushRosNamespace(robot_name),
launch_camera,
]
)
]
)

0 comments on commit bd50b4e

Please sign in to comment.