Wiki

keyframe_mapper is an application available in ccny_rgbd for graph-based offline SLAM. It also servers as an online map server which can save, load, and visualize PointCloud maps. It requires a stream of registered depth and rgb images, as well as a CameraInfo matrix. These topics can be generated using rgbd_image_proc in conjunctions with ccny_openni_launch, or any compatible driver. It further requires the pose of the camera to be calculated in some fixed frame, which can be done via visual_odometry.

keyframe_mapper supports the following file input formats:

keyframe_mapper supports the following file output formats:

Here are some examples of 3D maps in different formats (click for larger image).

Pcd Map Octomap, without color

Octomap, with color Octomap, with color

ROS API

Subscribed Topics

/rgbd/rgb (sensor_msgs/Image)

/rgbd/depth (sensor_msgs/Image) /rgbd/info (sensor_msgs/CameraInfo)

Published Topics

keyframes (sensor_msgs/PointCloud2)

keyframe_poses (visualization_msgs/Marker) keyframe_associations (visualization_msgs/Marker)

Parameters

General parameters

~queue_size (int, default: 5)

~fixed_frame (string, default: "odom") ~pcd_map_res (double, default: 0.01) ~octomap_res (double, default: 0.05) ~octomap_with_color (bool, default: true) ~kf_dist_eps (double, default: 0.10) ~kf_angle_eps (double, default: 0.174)

Graph parameters

~graph/n_keypoints (int, default: 200)

~graph/max_ransac_iterations (int, default: 2000) ~graph/n_ransac_candidates (int, default: 15) ~graph/k_nearest_neighbors (int, default: 15) ~graph/min_ransac_inliers (int, default: 30) ~graph/max_corresp_dist_desc (double, default: 1.0) ~graph/max_corresp_dist_eucl (double, default: 0.03) ~graph/save_ransac_results (bool, default: false) ~graph/ransac_results_path (string, default: $HOME)

Transforms

Required tf Transforms

camera_link[incoming image frame]

Services

publish_keyframe (ccny_rgbd/PublishKeyframe)

publish_keyframes (ccny_rgbd/PublishKeyframes) save_keyframes (ccny_rgbd/Save) load_keyframes (ccny_rgbd/Load) save_pcd_map (ccny_rgbd/Save) save_octomap (ccny_rgbd/Save) add_manual_keyframe (ccny_rgbd/AddManualKeyframe) generate_graph (ccny_rgbd/GenerateGraph) solve_graph (ccny_rgbd/SolveGraph)

Usage

First, launch the device and image processing via ccny_openni_launch.

Note: You can use any launcher, as long as it outputs a registered depth and rgb image, and the corresponding CameraInfo (see API above).

roslaunch ccny_openni_launch openni.launch 

Next, launch vo+mapping.launch, which starts the visual odometry and mapping interfaces.

roslaunch ccny_rgbd vo+mapping.launch

You can visualize the current list of keyframes using rviz

rosrun rviz rviz
rosservice call /publish_keyframes ".*"

Once you have finished gathering data, call the services to generate the graph and solve it:

rosservice call /generate_graph
rosservice call /solve_graph

Once that is done, you can republish the frames to rviz, or save them to disk, for example:

rosservice call /save_keyframes "$HOME/ros/my_keyframe_sequence"

Or you can save the entire map as a pcd file:

rosservice call /save_pcd_map "$HOME/ros/my_map.pcd"

Once you have the keyframes saved, you can load them in the keyframe_mapper without running the rest of the system. For example:

roscore
rosrun ccny_rgbd keyframe_mapper_node
rosservice call /load_keyframes "$HOME/ros/my_keyframe_sequence"
rosservice call /publish_keyframes ".*"
etc

Wiki: ccny_rgbd/keyframe_mapper (last edited 2013-06-19 14:22:17 by AsukiKono)