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

RVIZ, multiple cameras (kinects), same global frame [closed]

asked 2017-05-08 12:57:25 -0500

jacksonkr_ gravatar image

updated 2017-05-08 13:14:45 -0500

I have 2 kinects (v1 1414) running from the same launch file. I can access both in rviz but I have to switch Global Options > Fixed Frame from kinect1_link to kinect2_link.

#Question

How can I make both cameras be viewed in the same Fixed Frame ?

Launch file:

<launch>

    <arg name="camera1_id" default="#1" />
    <arg name="camera2_id" default="#2" />

    <arg name="camera1_name" default="kinect1" />
    <arg name="camera2_name" default="kinect2" />

  <!-- Launching first kinect-->
    <include file="$(find freenect_launch)/launch/freenect.launch">
        <arg name="device_id" value="$(arg camera1_id)" />
        <arg name="camera" value="$(arg camera1_name)" />
        <!--arg name="depth_registration" value="$(arg depth_registration)" /-->
     </include>

 <!-- Launching second kinect-->
    <include file="$(find freenect_launch)/launch/freenect.launch">
        <arg name="device_id" value="$(arg camera2_id)" />
        <arg name="camera" value="$(arg camera2_name)" />
     </include>

  </launch>
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by NEngelhard
close date 2017-05-09 04:56:15.189523

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-05-08 14:44:25 -0500

jacksonkr_ gravatar image

I needed to setup a new frame "multi_map" in my launch file which I set as the "fixed frame" in rviz:

<node pkg="tf" type="static_transform_publisher" name="kinect1_tf"
    args="0.0 0.0 0.0 0 0 0 1 multi_map kinect1_link 100" />

<node pkg="tf" type="static_transform_publisher" name="kinect2_tf"
    args="0.0 0.0 0.0 0 0 0 1 multi_map kinect2_link 100" />

You have to modify the args to get your camera images to display where you want them. You can find more info about that at http://wiki.ros.org/tf#static_transfo... under item 6.3

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-08 12:57:25 -0500

Seen: 750 times

Last updated: May 08 '17