plusone-robotics / realsense

Intel(R) RealSense(TM) ROS Wrapper for D400 series and SR300 Camera
http://wiki.ros.org/RealSense
Apache License 2.0
0 stars 5 forks source link

Enable infrared RGB from launch file. #33

Closed 130s closed 4 years ago

130s commented 4 years ago

Problem

Infrared-RGB functionality https://github.com/plusone-robotics/realsense/pull/30 adds a ROS Parameter to enable itself, which is not available yet in the launch files in realsense2_camera pkg. Users have to define such a Parameter by themselves.

Approach

Add needed ROS Parameters.

Test

With roslaunch realsense2_camera rs_camera.launch enable_infra:=true enable_infra_rgb:=true, I was able to see /camera/infra/image_raw topic being published (without the change in this PR and the command args I didn't see it published).

Screenshot from 2020-11-06 14-47-31

FYI I used the following docker-compose config file and have Realsense driver running in the Docker container. Worked.

version: '2.3'
services:
  realsense:
      image: %REPLACE_WITH_YOUR_IMG%
      container_name: realsense_launch
      restart: "no"
      network_mode: "host"
      privileged: true
      volumes:
        - /dev:/dev
      command: /bin/bash -c "source /opt/por/setup.bash && roslaunch realsense2_camera rs_camera.launch enable_infra:=true enable_infra_rgb:=true"