ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ok, as @osilva suggested, here a summary how I solved it:

I have the following topics published:

  • depth/image_raw
  • depth/camera_info (conatining the internal calbiration parameter and the frame id of the depth camera)
  • ir/camera_info (conatining the internal calbiration parameter and the frame id of the ir camera)
  • tf2 static tranform between the two frames ids.

Using depth_image_proc package regsiter, I can now map the depth data in the ir frame. My launch file looks like this:

<launch>
  <arg name="namespace_ir" default="gas_camera"/>
  <arg name="namespace_vis" default="realsense"/>


  <!-- gas_cam --> 
  <include file="$(find gas_cam)/launch/gas_cam.launch"> 
        <arg name="namespace" value="$(arg namespace_ir)" />
   </include>  

  <!-- realsense --> 
    <include file="$(find realsense2_camera)/launch/rs_camera.launch"  ns="$(arg namespace_vis)"> 
        <arg name="filters" value="pointcloud" />
        <arg name="tf_prefix" value="rs" />
   </include>


  <!-- tf2 -->   
    <node pkg="tf2_ros" type="static_transform_publisher" name="rs_2_ir" args="-0.062249 -0.083060 0.006821 0.00465763 0.052355 0.02046292  rs_link ir_kam_frame" />


  <!-- stereo proc for image registration -->
    <node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" />
    <node pkg="nodelet" type="nodelet" name="nodelet1" args="load depth_image_proc/register nodelet_manager">
        <remap from="depth/camera_info" to="/$(arg namespace_vis)/camera/depth/camera_info"/>
        <remap from="rgb/camera_info" to="/$(arg namespace_ir)/camera_info"/>
        <remap from="depth/image_rect" to="/$(arg namespace_vis)/camera/depth/image_rect_raw"/>
    </node>

    <!-- RVIZ -->
    <node pkg="rviz" type="rviz" name="rviz" args="-d $(find gas_cam)/rviz/default_visualization.rviz"/>
</launch>

Ok, as @osilva suggested, here a summary how I solved it:

I have the following topics published:

  • depth/image_raw
  • depth/camera_info (conatining the internal calbiration parameter and the frame id of the depth camera)
  • ir/camera_info (conatining the internal calbiration parameter and the frame id of the ir camera)
  • tf2 static tranform between the two frames ids.

Using depth_image_proc depth_image_proc package regsiter, I can now map the depth data in the ir frame. My launch file looks like this:

<launch>
  <arg name="namespace_ir" default="gas_camera"/>
  <arg name="namespace_vis" default="realsense"/>


  <!-- gas_cam --> 
  <include file="$(find gas_cam)/launch/gas_cam.launch"> 
        <arg name="namespace" value="$(arg namespace_ir)" />
   </include>  

  <!-- realsense --> 
    <include file="$(find realsense2_camera)/launch/rs_camera.launch"  ns="$(arg namespace_vis)"> 
        <arg name="filters" value="pointcloud" />
        <arg name="tf_prefix" value="rs" />
   </include>


  <!-- tf2 -->   
    <node pkg="tf2_ros" type="static_transform_publisher" name="rs_2_ir" args="-0.062249 -0.083060 0.006821 0.00465763 0.052355 0.02046292  rs_link ir_kam_frame" />


  <!-- stereo proc for image registration -->
    <node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" />
    <node pkg="nodelet" type="nodelet" name="nodelet1" args="load depth_image_proc/register nodelet_manager">
        <remap from="depth/camera_info" to="/$(arg namespace_vis)/camera/depth/camera_info"/>
        <remap from="rgb/camera_info" to="/$(arg namespace_ir)/camera_info"/>
        <remap from="depth/image_rect" to="/$(arg namespace_vis)/camera/depth/image_rect_raw"/>
    </node>

    <!-- RVIZ -->
    <node pkg="rviz" type="rviz" name="rviz" args="-d $(find gas_cam)/rviz/default_visualization.rviz"/>
</launch>