Ask Your Question
0

How to run rgbdslam on gazebo environment?

asked 2012-09-12 05:40:40 -0500

sam gravatar image

updated 2014-01-28 17:13:38 -0500

ngrennan gravatar image

My launch file:

  <launch>

    <!-- start up empty world -->
    <include file="$(find gazebo_worlds)/launch/simple_world.launch"/>

    <!-- start up robot -->
    <include file="$(find pr2_gazebo)/pr2.launch"/>

    <!-- Tug Arms For Navigation -->
    <node name="tuckarm" pkg="pr2_tuckarm" type="tuck_arms.py" args="-l t -r t" />

    <!-- for visualization -->
    <node pkg="rviz" type="rviz" name="rviz" args="-d $(find pr2_build_map_gazebo_demo)/rviz/build_map.vcg"/>

    <!-- dynamic map generation -->
    <node name="gmapping_node" pkg="gmapping" type="slam_gmapping" respawn="false" >
      <remap to="base_scan" from="scan"/>
      <param name="odom_frame" value="odom_combined" />
    </node>
    <!-- for PR2 teleop -->
    <include file="$(find pr2_teleop)/teleop_keyboard.launch"/>
  </launch>

I try to run:

  sam@/home/sam/code/ros/slam$ roslaunch rgbdslam kinect+rgbdslam.launch 
  ... logging to /home/sam/.ros/log/a4924062-fceb-11e1-b239-00120ebbd636/roslaunch-sam-System-Product-Name-10191.log
  Checking log directory for disk usage. This may take awhile.
  Press Ctrl-C to interrupt
  Done checking log file disk usage. Usage is <1GB.

  started roslaunch server http://sam-System-Product-Name:54997/

  SUMMARY
  ========

  PARAMETERS
   * /rosdistro
   * /openni_node1/use_indices
   * /rgbdslam/config/topic_image_mono
   * /openni_node1/depth_registration
   * /openni_node1/image_time_offset
   * /openni_node1/depth_frame_id
   * /openni_node1/depth_mode
   * /openni_node1/debayering
   * /rosversion
   * /openni_node1/projector_depth_baseline
   * /openni_node1/rgb_frame_id
   * /openni_node1/depth_rgb_translation
   * /openni_node1/depth_time_offset
   * /openni_node1/image_mode
   * /openni_node1/shift_offset
   * /openni_node1/device_id
   * /rgbdslam/config/topic_image_depth
   * /openni_node1/depth_rgb_rotation

  NODES
    /
      openni_node1 (openni_camera/openni_node)
      kinect_base_link (tf/static_transform_publisher)
      kinect_base_link1 (tf/static_transform_publisher)
      kinect_base_link2 (tf/static_transform_publisher)
      kinect_base_link3 (tf/static_transform_publisher)
      rgbdslam (rgbdslam/rgbdslam)

  ROS_MASTER_URI=http://localhost:11311

  core service [/rosout] found
  process[openni_node1-1]: started with pid [10209]
  process[kinect_base_link-2]: started with pid [10210]
  process[kinect_base_link1-3]: started with pid [10218]
  process[kinect_base_link2-4]: started with pid [10225]
  process[kinect_base_link3-5]: started with pid [10226]
  process[rgbdslam-6]: started with pid [10249]
  bool g2o::HyperGraphActionLibrary::registerAction(g2o::HyperGraphElementAction*): creating collection for "writeGnuplot"
  bool g2o::HyperGraphActionLibrary::registerAction(g2o::HyperGraphElementAction*): creating collection for "draw"
  SOLVER FACTORY WARNING: Overwriting Solver _creator pcg
  SOLVER FACTORY WARNING: Overwriting Solver _creator pcg3_2
  SOLVER FACTORY WARNING: Overwriting Solver _creator pcg6_3
  SOLVER FACTORY WARNING: Overwriting Solver _creator pcg7_3
  Initializing Node...
  [ INFO] [1347463889.446227314]: Connected to roscore
  [ WARN] [1347463889.495273123]: Cannot use concurrent node construction with SiftGPU matcher! 'concurrent_node_construction' was set to false. Everything should work fine, but the CPU-threading won't happen (because you are using the GPU instead).
  [ WARN] [1347463889.495310761]: Cannot use concurrent edge construction with SiftGPU matcher! 'concurrent_edge_construction' was set to false. Everything should work fine, but the CPU-threading won't happen (because you are using the GPU instead).
  [ INFO] [1347463889.612529297]: Listening to /camera/rgb/image_color and /camera/depth/image
  [ INFO] [1347463889.612577246]: SIFTGPU is to be used
  [ INFO] [1347463889.612615001]: SIFTGPU is to be used as extractor, creating SURF descriptor extractor as fallback.
  [ INFO] [1347463889.844371991]: [/openni_node1] No devices connected.... waiting for devices to be connected
  [ INFO] [1347463890.846078666, 733.741000000]: [/openni_node1] No devices connected.... waiting for devices to be connected
  [ INFO] [1347463891.847666108, 734.545000000]: [/openni_node1] No devices connected.... waiting for devices to be connected
  [ INFO] [1347463892.849301017, 735.345000000]: [/openni_node1] No devices connected.... waiting for devices to be connected

How to solve it?

Thank you~

edit retag flag offensive close merge delete

Comments

How is that working out for you?

Felix Endres gravatar image Felix Endres  ( 2012-09-24 11:22:05 -0500 )edit

What's 'working out' means?

sam gravatar image sam  ( 2012-09-25 16:56:45 -0500 )edit

Mapping a simulator? I only ever mapped reality, so I wonder whether it worked or went crazy because many features might match each other perfectly.

Felix Endres gravatar image Felix Endres  ( 2012-10-02 03:05:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-09-12 06:16:40 -0500

dejanpan gravatar image

If you want to run this in Gazebo then you have to make rgbdslam subscribe to the simulated Kinect and not the real device. That is, you have to comment out the following line in rgbdslam kinect+rgbdslam.launch:

<include file="$(find openni_camera)/launch/openni_node.launch"/>.

And you have to make sure that you start the simulated Kinect and that the mapping of the topics is correct.

D.

edit flag offensive delete link more

Comments

When I run gazebo+PR2+rgbdslam,they appears so many topics. How to find the one which should be mapping? Is there any topic list I should mapping? Thank you~

sam gravatar image sam  ( 2012-09-12 21:45:48 -0500 )edit

Kinect topics shall either be in /kinect_head or /camera namespaces, e.g. kinect_head/depth_registered/points.

dejanpan gravatar image dejanpan  ( 2012-09-13 06:56:13 -0500 )edit

rostopic list is helpful for that. You could, e.g., grep the output for image_color

Felix Endres gravatar image Felix Endres  ( 2012-09-24 11:21:26 -0500 )edit

My question is mapping topics. I don't know which topic should map to which topic. Where can I get the list. I know I can use rostopic, but it gives me too many topics that confuse me. Thank you~

sam gravatar image sam  ( 2012-09-25 16:56:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-09-12 05:40:40 -0500

Seen: 739 times

Last updated: Sep 12 '12