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

Not able to set widhtxheighxfps using depth profile for realsense d435i #3314

Open
Akumar201 opened this issue Mar 10, 2025 · 4 comments
Open
Labels

Comments

@Akumar201
Copy link

Akumar201 commented Mar 10, 2025

I am attempting to set the depth profile on my RealSense D435i, but when I change it to any other value, the device fails to communicate with the hardware. I've also tried using a 1280x720x6, '424x240x60', '0x0x0',, configuration for both the color and camera profiles.I am using long cable from this website, Although I tried with the official cable also. The power consumption is

lsusb -v -d 8086:0b3a | grep -i -e "MaxPower" -e "bcdUSB"
  bcdUSB               3.20
    MaxPower              720mA

[realsense2_camera_node-1] [WARN] [1741581289.129918624] [camera.camera_top]: XXX Hardware Notification:Frames didn't arrived within 5 seconds,1.74158e+12,Warn,Frames Timeout
[realsense2_camera_node-1]  09/03 21:34:54,134 WARNING [134003281626688] (backend-v4l2.cpp:1649) Frames didn't arrived within 5 seconds
[realsense2_camera_node-1] [WARN] [1741581294.134894479] [camera.camera_top]: XXX Hardware Notification:Frames didn't arrived within 5 seconds,1.74158e+12,Warn,Frames Timeout
[realsense2_camera_node-1]  09/03 21:34:59,139 WARNING [134003281626688] (backend-v4l2.cpp:1649) Frames didn't arrived within 5 seconds
[realsense2_camera_node-1] [WARN] [1741581299.139939820] [camera.camera_top]: XXX Hardware Notification:Frames didn't arrived within 5 seconds,1.74158e+12,Warn,Frames Timeout

This is my launch file


def launch_setup(context, *args, **kwargs):
    """Dynamically set the RealSense serial number and resolution."""
    camera_name = LaunchConfiguration('camera_name').perform(context)  # Get the camera name from the argument
    serial_no = load_serial_number(camera_name)  # Read the serial number from the YAML file
    depth_profile = LaunchConfiguration('depth_profile').perform(context)
    color_profile = LaunchConfiguration('color_profile').perform(context)
    return [
        launch_ros.actions.Node(
            package='realsense2_camera',
            executable='realsense2_camera_node',
            name=camera_name,
            parameters=[{
                'serial_no': serial_no,
                'enable_depth': True,
                'enable_color': True,
                'align_depth': True,
                'enable_pointcloud': True,
                'depth_module.depth_profile': depth_profile,  
                'rgb_camera.color_profile': color_profile   
            }],
            output='screen'
        )
    ]

def generate_launch_description():
    return launch.LaunchDescription([
        # Camera selection
        DeclareLaunchArgument(
            'camera_name',
            default_value='camera_top',
            description='Camera name to load from config file (e.g., camera_top, camera_wrist)'
        ),
        DeclareLaunchArgument(
            'depth_profile',
            default_value='1280x720x6',  
            description='Depth module profile (widthxheightxFPS)'
        ),
        # Color Profile
        DeclareLaunchArgument(
            'color_profile',
            default_value='848x480x60',  
            description='Color camera profile (widthxheightxFPS)'
        ),
        # Start node setup
        OpaqueFunction(function=launch_setup)
    ])

The camera is working at USB 3.2

/:  Bus 10.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    |__ Port 2: Dev 3, If 0, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 2: Dev 3, If 1, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 2: Dev 3, If 2, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 2: Dev 3, If 3, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 2: Dev 3, If 4, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 2: Dev 3, If 5, Class=Human Interface Device, Driver=usbhid, 5000M

realsense-viewer

Image

@MartyG-RealSense
Copy link
Collaborator

Hi @Akumar201 How does the launch behave if you set the configuration with a ros2 launch instruction instead of launching the node with a yaml file?

ros2 launch realsense2_camera rs_launch.py depth_module.depth_profile:=1280x720x30 rgb_camera.color_profile:=848x480x60 pointcloud.enable:=true align_depth.enable:=true

@Akumar201
Copy link
Author

@MartyG-RealSense , this command that you suggested worked.

ros2 launch realsense2_camera rs_launch.py depth_module.depth_profile:=1280x720x30 rgb_camera.color_profile:=848x480x60 pointcloud.enable:=true align_depth.enable:=true

However as soon as I select 1280x720x30 for both I am getting the same error


[realsense2_camera_node-1] [WARN] [1741621628.592530683] [camera.camera]: XXX Hardware Notification:Depth stream start failure,1.74162e+12,Error,Hardware Error
[realsense2_camera_node-1] [WARN] [1741621628.592606207] [camera.camera]: Hardware Notification:Depth stream start failure,1.74162e+12,Error,Hardware Error
[realsense2_camera_node-1]  10/03 08:47:12,598 WARNING [140624913237568] (backend-v4l2.cpp:1649) Frames didn't arrived within 5 seconds
[realsense2_camera_node-1] [WARN] [1741621632.598662842] [camera.camera]: XXX Hardware Notification:Frames didn't arrived within 5 seconds,1.74162e+12,Warn,Frames Timeout
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)

for my user case I want both to be 1280x720 , I think I am fine with the low fps. Thank You

@MartyG-RealSense
Copy link
Collaborator

You are very welcome! D435i supports 6, 15 and 30 FPS for 1280x720, with 60 FPS available for 848x480 resolution.

@Akumar201
Copy link
Author

Okay , Thank you for your prompt replie. So what would be the best fps if I want 1280x720 from both camera rgb and depth as 1280x720 resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants