felixendres / rgbdslam_v2

RGB-D SLAM for ROS
GNU General Public License v3.0
935 stars 399 forks source link

GUI doesnt seem to work #89

Closed joedavid-tuni closed 6 years ago

joedavid-tuni commented 6 years ago

I am trying to get the RGBDslam GUI to work with kinect but it quite doesnt.

The kinect (version 3)seems to be working fine and I get the feed in Rviz and also echo on the camera topics.

Im using the freenect package alongside. The GUI however cant seem to get the feed

rgbdslam launch file

<!-- This file shows the most important parameters in their default settings,
     to make them easily available for beginners.

     The openni driver has to be started seperately, e.g. with "roslaunch openni_launch openni.launch" -->
<launch>

  <node pkg="rgbdslam" type="rgbdslam" name="rgbdslam" cwd="node" required="true" output="screen"> 
    <!-- Input data settings-->
    <param name="config/topic_image_mono"              value="/camera/rgb/image_color"/> 
    <param name="config/topic_image_depth"             value="/camera/depth_registered/sw_registered/image_rect_raw"/>
    <param name="config/topic_points"                  value=""/> <!--if empty, pointcloud will be reconstructed from image and depth -->

    <!-- These are the default values of some important parameters -->
    <param name="config/feature_extractor_type"        value="ORB"/><!-- also available: SIFT, SIFTGPU, SURF, SURF128 (extended SURF), ORB. -->
    <param name="config/feature_detector_type"         value="ORB"/><!-- also available: SIFT, SURF, GFTT (good features to track), ORB. -->
    <param name="config/detector_grid_resolution"      value="3"/><!-- detect on a 3x3 grid (to spread ORB keypoints and parallelize SIFT and SURF) -->
    <param name="config/max_keypoints"                 value="600"/><!-- Extract no more than this many keypoints -->
    <param name="config/max_matches"                   value="300"/><!-- Keep the best n matches (important for ORB to set lower than max_keypoints) -->

    <param name="config/min_sampled_candidates"        value="4"/><!-- Frame-to-frame comparisons to random frames (big loop closures) -->
    <param name="config/predecessor_candidates"        value="4"/><!-- Frame-to-frame comparisons to sequential frames-->
    <param name="config/neighbor_candidates"           value="4"/><!-- Frame-to-frame comparisons to graph neighbor frames-->
    <param name="config/ransac_iterations"             value="100"/>
    <param name="config/cloud_creation_skip_step"      value="2"/><!-- subsample the images' pixels (in both, width and height), when creating the cloud (and therefore reduce memory consumption) -->

    <param name="config/cloud_display_type"            value="POINTS"/><!-- Show pointclouds as points (as opposed to TRIANGLE_STRIP) -->
    <param name="config/pose_relative_to"              value="largest_loop"/><!-- optimize only a subset of the graph: "largest_loop" = Everything from the earliest matched frame to the current one. Use "first" to optimize the full graph, "inaffected" to optimize only the frames that were matched (not those inbetween for loops) -->
    <param name="config/backend_solver"                value="pcg"/><!-- pcg is faster and good for continuous online optimization, cholmod and csparse are better for offline optimization (without good initial guess)-->
    <param name="config/optimizer_skip_step"           value="1"/><!-- optimize only every n-th frame -->
  </node>
</launch>

freenect launch file:

<!-- Entry point for using OpenNI devices -->
<launch>

  <!-- "camera" should uniquely identify the device. All topics are pushed down
       into the "camera" namespace, and it is prepended to tf frame ids. -->
  <arg name="camera" default="camera" />
  <arg name="rgb_frame_id"   default="$(arg camera)_rgb_optical_frame" />
  <arg name="depth_frame_id" default="$(arg camera)_depth_optical_frame" />

  <arg name="data_skip" default="0" />

  <!-- device_id can have the following formats:
         "B00367707227042B": Use device with given serial number
         "#1"              : Use first device found
    -->
  <arg name="device_id" default="#1" />

  <!-- By default, calibrations are stored openni_launch  to file://${ROS_HOME}/camera_info/${NAME}.yaml,
       where ${NAME} is of the form "[rgb|depth]_[serial#]", e.g. "depth_B00367707227042B".
       See camera_info_manager docs for calibration URL details. -->
  <arg name="rgb_camera_info_url"   default="" />
  <arg name="depth_camera_info_url" default="" />

  <!-- Use OpenNI's factory-calibrated depth->RGB registration? -->
  <arg name="depth_registration" default="false" />

  <!-- Arguments for remapping all device namespaces -->
  <arg name="rgb"              default="rgb" />
  <arg name="ir"               default="ir" />
  <arg name="depth"            default="depth" />
  <arg name="depth_registered" default="depth_registered" />
  <arg name="projector"        default="projector" />

  <!-- Optionally suppress loading the driver nodelet and/or publishing the default tf
       tree. Useful if you are playing back recorded raw data from a bag, or are
       supplying a more accurate tf tree from calibration. -->
  <arg name="load_driver" default="true" />
  <arg name="publish_tf" default="true" />
  <!-- Processing Modules -->
  <arg name="rgb_processing"                  default="true"/>
  <arg name="ir_processing"                   default="true"/>
  <arg name="depth_processing"                default="true"/>
  <arg name="depth_registered_processing"     default="true"/>
  <arg name="disparity_processing"            default="true"/>
  <arg name="disparity_registered_processing" default="true"/>
  <arg name="hw_registered_processing"        default="true" />
  <arg name="sw_registered_processing"        default="true" />

  <!-- Disable bond topics by default -->
  <arg name="bond" default="false" /> <!-- DEPRECATED, use respawn arg instead -->
  <arg name="respawn" default="$(arg bond)" />

  <!-- Worker threads for the nodelet manager -->
  <arg name="num_worker_threads" default="4" />

  <!-- enable libfreenect debug logging -->
  <arg name="libfreenect_debug" default="false" />

  <!-- enable diagnostics support for freenect_camera -->
  <arg name="enable_rgb_diagnostics" default="false" />
  <arg name="enable_ir_diagnostics" default="false" />
  <arg name="enable_depth_diagnostics" default="false" />
  <arg name="diagnostics_max_frequency" default="30.0" />
  <arg name="diagnostics_min_frequency" default="30.0" />
  <arg name="diagnostics_tolerance" default="0.05" />
  <arg name="diagnostics_window_time" default="5.0" />

  <!-- Push down all topics/nodelets into "camera" namespace -->
  <group ns="$(arg camera)">

    <!-- Start nodelet manager in provided namespace -->
    <arg name="manager" value="$(arg camera)_nodelet_manager" />
    <arg name="debug" default="false" /> <!-- Run manager in GDB? -->
    <include file="$(find rgbd_launch)/launch/includes/manager.launch.xml">
      <arg name="name"                value="$(arg manager)" />
      <arg name="debug"               value="$(arg debug)" />
      <arg name="num_worker_threads"  value="$(arg num_worker_threads)" />
    </include>

    <!-- Load driver -->
    <include if="$(arg load_driver)"
         file="$(find freenect_launch)/launch/includes/device.launch.xml">
      <!-- Could really use some syntactic sugar for this -->
      <arg name="manager"                   value="$(arg manager)" />
      <arg name="device_id"                 value="$(arg device_id)" />
      <arg name="rgb_frame_id"              value="$(arg rgb_frame_id)" />
      <arg name="depth_frame_id"            value="$(arg depth_frame_id)" />
      <arg name="rgb_camera_info_url"       value="$(arg rgb_camera_info_url)" />
      <arg name="depth_camera_info_url"     value="$(arg depth_camera_info_url)" />
      <arg name="depth_registration"        value="$(arg depth_registration)" />
      <arg name="data_skip"                 value="$(arg data_skip)" />
      <arg name="rgb"                       value="$(arg rgb)" />
      <arg name="ir"                        value="$(arg ir)" />
      <arg name="depth"                     value="$(arg depth)" />
      <arg name="depth_registered"          value="$(arg depth_registered)" />
      <arg name="projector"                 value="$(arg projector)" />
      <arg name="respawn"                   value="$(arg respawn)" />
      <arg name="libfreenect_debug"         value="$(arg libfreenect_debug)" />
      <arg name="enable_rgb_diagnostics"    value="$(arg enable_rgb_diagnostics)" />
      <arg name="enable_ir_diagnostics"     value="$(arg enable_ir_diagnostics)" />
      <arg name="enable_depth_diagnostics"  value="$(arg enable_depth_diagnostics)" />
      <arg name="diagnostics_max_frequency" value="$(arg diagnostics_max_frequency)" />
      <arg name="diagnostics_min_frequency" value="$(arg diagnostics_min_frequency)" />
      <arg name="diagnostics_tolerance"     value="$(arg diagnostics_tolerance)" />
      <arg name="diagnostics_window_time"   value="$(arg diagnostics_window_time)" />
    </include>

    <!-- Load standard constellation of processing nodelets -->
    <include file="$(find rgbd_launch)/launch/includes/processing.launch.xml">
      <arg name="manager"                         value="$(arg manager)" />
      <arg name="rgb"                             value="$(arg rgb)" />
      <arg name="ir"                              value="$(arg ir)" />
      <arg name="depth"                           value="$(arg depth)" />
      <arg name="depth_registered"                value="$(arg depth_registered)" />
      <arg name="projector"                       value="$(arg projector)" />
      <arg name="respawn"                         value="$(arg respawn)" />
      <arg name="rgb_processing"                  value="$(arg rgb_processing)" />
      <arg name="ir_processing"                   value="$(arg ir_processing)" />
      <arg name="depth_processing"                value="$(arg depth_processing)" />
      <arg name="depth_registered_processing"     value="$(arg depth_registered_processing)" />
      <arg name="disparity_processing"            value="$(arg disparity_processing)" />
      <arg name="disparity_registered_processing" value="$(arg disparity_registered_processing)" />
      <arg name="hw_registered_processing"        value="$(arg hw_registered_processing)" />
      <arg name="sw_registered_processing"        value="$(arg sw_registered_processing)" />
    </include>

  </group> <!-- camera -->

  <!-- Load reasonable defaults for the relative pose between cameras -->
  <include if="$(arg publish_tf)"
       file="$(find rgbd_launch)/launch/kinect_frames.launch">
    <arg name="camera" value="$(arg camera)" />
  </include>

</launch>

NOTE: I've also tried using it with the openni_launch package but to no avail.