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

How to get kinect + gmapping on an erratic to generate 2D maps?

asked 2011-07-25 09:07:09 -0600

Kamilion gravatar image

updated 2016-10-24 08:33:45 -0600

ngrennan gravatar image

I've picked up a used Videre erratic and mounted a kinect and a EEEPC 1215N on it for a poor man's turtlebot while I wait for mine to ship out. I'm a newbie to ROS, and I've only been using it for about a month.

I've been trying to follow this tutorial: http://www.ros.org/wiki/turtlebot_nav...

I initially tried to start with this tutorial and had serious problems once I found it was 2 years out of date. http://www.ros.org/wiki/2dnav_erratic...

I can't afford a real lidar unit myself, so I'm trying to use Kinect line-scans for now. I found another answer on how to modify the launch file for pointcloud_to_laserscan to publish a /scan topic:

<launch>
  <!-- kinect and frame ids -->
  <include file="$(find openni_camera)/launch/openni_node.launch"/>

  <!-- openni manager -->
  <node pkg="nodelet" type="nodelet" name="openni_manager" output="screen" respawn="true" args="manager"/>

  <!-- throttling -->
  <node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager">
    <param name="max_rate" value="2"/>
    <remap from="cloud_in" to="/camera/depth/points"/>
    <remap from="cloud_out" to="cloud_throttled"/>
  </node>

  <!-- fake laser -->
  <node pkg="nodelet" type="nodelet" name="kinect_laser" args="load pointcloud_to_laserscan/CloudToScan openni_manager">
    <param name="output_frame_id" value="/openni_depth_frame"/>
    <remap from="cloud" to="cloud_throttled"/>
  </node>
</launch>

I am navigating the robot around with erratic_keyboard_teleop and monitoring it with rviz with a map view that never receives a map, a point cloud view that works, a laser scan view that works, and two image viewers from the depth and rgb of the kinect.

I have map_saver running.

RXGraph running

As far as I can tell, I have good /odom data, but the problem comes when I run

rosrun gmapping slam_gmapping scan:=scan

EDIT: At first I was trying to run gmapping as above, but now I'm using:

roscore
roslaunch erratic_player erratic_base.launch
roslaunch pointcloud_to_laserscan kinect_lidar.launch
roslaunch microstrain_3dmgx2_imu microstrain_3dmgx2.launch
roslaunch robot_pose_ekf robot_pose_ekf.launch
roslaunch erratic_navigation slam_gmapping.launch
roslaunch erratic_navigation move_base_slam.launch

(This seems to be the same thing as roslaunch turtlebot_navigation gmapping_demo.launch but for the erratic's parameters instead)

When it's running I get the same output, either way:

[ WARN] [1311627824.060790164]: MessageFilter [target=/odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_notifier] rosconsole logger to DEBUG for more information.
[DEBUG] [1311627826.169033381]: MessageFilter [target=/odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=/openni_depth_frame, stamp=1311627823.147122)
[DEBUG] [1311627826.169353004]: MessageFilter [target=/odom ]: Added message in frame /openni_depth_frame at time 1311627826.048, count now 5
[DEBUG] [1311627826.705492297]: MessageFilter [target=/odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=/openni_depth_frame, stamp=1311627823.777645)
[DEBUG] [1311627826.705995564]: MessageFilter [target=/odom ]: Added message in frame /openni_depth_frame at time 1311627826.616, count now 5
[DEBUG] [1311627827.280777392]: MessageFilter [target=/odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=/openni_depth_frame, stamp=1311627824.308159)
[DEBUG] [1311627827.281022133]: MessageFilter [target=/odom ]: Added message in frame /openni_depth_frame at time 1311627827.148, count now 5
[DEBUG ...
(more)
edit retag flag offensive close merge delete

Comments

2 Answers

Sort by ยป oldest newest most voted
0

answered 2011-09-02 11:57:01 -0600

kwc gravatar image

no activity > 1 month, closing

edit flag offensive delete link more
1

answered 2011-07-25 09:13:44 -0600

mmwise gravatar image

You need to launch more than gmapping to create a map. please look at the launch files in turtlebot_navigation, specifically gmapping_demo.launch

edit flag offensive delete link more

Comments

Okay, I've looked in there, and it references two other launch files; one of them for the turtlebot base and the other for a single slam_gmapping node. the move_base stuff seems to be turtlebot specific and it looks like the erratic_player does that stuff with /cmd_vel
Kamilion gravatar image Kamilion  ( 2011-07-25 09:41:36 -0600 )edit
The comment for the main launch say <!--- Run Move Base and Robot Pose EKF --> but i was told I needed either gmapping or robot_pose_ekf running, not both. Is this incorrect?
Kamilion gravatar image Kamilion  ( 2011-07-25 09:43:53 -0600 )edit
can you open up rxconsole and see anymore info from gmapping.. another thing that you can try is running the slam gmapping for the erratic that is in the ua-ros-pkg: http://www.ros.org/wiki/erratic_navigation
mmwise gravatar image mmwise  ( 2011-07-25 12:29:10 -0600 )edit
you need either gmapping or amcl, both require robot_pose_ekf.
tfoote gravatar image tfoote  ( 2011-07-25 14:48:07 -0600 )edit
Okay, I've updated the post to provide more data. I'm using the erratic_navigation packages now, since after study they seem to be almost the same move_base and gmapping launch files as turtlebot_navigation.
Kamilion gravatar image Kamilion  ( 2011-07-26 09:16:51 -0600 )edit
when using robot_pose_ekf it outputs a frame odom_combined and you need to set the odom frame to odom_combined in gmapping <param name="odom_frame" value="odom_combined"/>
mmwise gravatar image mmwise  ( 2011-07-26 09:36:49 -0600 )edit
same log message: [DEBUG] [1311716358.432537280]: MessageFilter [target=/odom_combined ]: Added message in frame laser at time 1311716358.359, count now 5 [DEBUG] [1311716358.529903011]: MessageFilter [target=/odom_combined ]: Removed oldest message because buffer is full, count now 5 (frame_id=lase
Kamilion gravatar image Kamilion  ( 2011-07-26 09:40:18 -0600 )edit

Question Tools

Stats

Asked: 2011-07-25 09:07:09 -0600

Seen: 2,016 times

Last updated: Sep 02 '11