mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-09-16 00:00:20 +08:00
ros: tested bumblebee stereo camera with libviso2 and libfovis, added launch file demo_stereo.launch
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@1838 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -1,47 +1,86 @@
|
||||
<launch>
|
||||
<!-- 6DOF stereo demo: download a bag example from http://projects.csail.mit.edu/stata/downloads.php.
|
||||
You will need to remove the transform /combined_odometry from the /tf messages:
|
||||
$ rosbag filter 2011-01-20-07-18-45.bag out.bag 'topic != "/tf" or topic == "/tf" and m.transforms[0].header.frame_id != "/odom_combined"'
|
||||
Run the example:
|
||||
$ roslaunch rtabmap demo_stereo.launch
|
||||
$ rosbag play -.-clock out.bag (replace -.- by double-dashes)
|
||||
-->
|
||||
|
||||
<param name="use_sim_time" type="bool" value="True"/>
|
||||
|
||||
<node pkg="camera1394stereo" type="camera1394stereo_node" name="camera1394stereo_node" output="screen" >
|
||||
<param name="video_mode" value="format7_mode3" />
|
||||
<param name="format7_color_coding" value="raw16" />
|
||||
<param name="bayer_pattern" value="bggr" />
|
||||
<param name="bayer_method" value="" />
|
||||
<param name="stereo_method" value="Interlaced" />
|
||||
<param name="camera_info_url_left" value="" />
|
||||
<param name="camera_info_url_right" value="" />
|
||||
</node>
|
||||
|
||||
<arg name="pi/2" value="1.5707963267948966" />
|
||||
<arg name="optical_rotate" value="0 0 0 -$(arg pi/2) 0 -$(arg pi/2)" />
|
||||
<node pkg="tf" type="static_transform_publisher" name="camera_base_link"
|
||||
args="$(arg optical_rotate) base_link stereo_camera 100" />
|
||||
|
||||
<!-- Run the ROS package stereo_image_proc -->
|
||||
<group ns="/stereo_camera" >
|
||||
<node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc">
|
||||
</node>
|
||||
</group>
|
||||
|
||||
<!-- Run the ROS package stereo_image_proc for image rectification and disparity computation -->
|
||||
<group ns="/wide_stereo">
|
||||
<group ns="/stereo_camera">
|
||||
<node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager" output="screen"/>
|
||||
<node pkg="nodelet" type="nodelet" name="disparity" args="load stereo_image_proc/disparity standalone_nodelet"/>
|
||||
<node pkg="nodelet" type="nodelet" name="disparity2depth" args="load rtabmap/disparity_to_depth standalone_nodelet"/>
|
||||
</group>
|
||||
|
||||
<!-- Odometry: Run the viso2_ros package -->
|
||||
<!-- Odometry: Choose between viso2_ros fovis_ros and homemade package -->
|
||||
<!--
|
||||
<node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer" output="screen">
|
||||
<remap from="stereo" to="/wide_stereo"/>
|
||||
<remap from="stereo" to="/stereo_camera"/>
|
||||
<remap from="image" to="image_rect"/>
|
||||
<param name="base_link_frame_id" value="/base_footprint"/>
|
||||
<param name="base_link_frame_id" value="/base_link"/>
|
||||
<param name="odom_frame_id" value="/odom"/>
|
||||
<param name="ref_frame_change_method" value="1"/>
|
||||
</node>
|
||||
|
||||
-->
|
||||
<node pkg="fovis_ros" type="fovis_stereo_odometer" name="stereo_odometer" >
|
||||
<remap from="/stereo/left/image" to="/stereo_camera/left/image_rect" />
|
||||
<remap from="/stereo/right/image" to="/stereo_camera/right/image_rect" />
|
||||
<remap from="/stereo/left/camera_info" to="/stereo_camera/left/camera_info" />
|
||||
<remap from="/stereo/right/camera_info" to="/stereo_camera/right/camera_info" />
|
||||
<remap from="odometry" to="stereo_odometer/odometry" />
|
||||
</node>
|
||||
<!--
|
||||
<node pkg="rtabmap" type="visual_odometry" name="visual_odometry" output="screen">
|
||||
<remap from="rgb/image" to="stereo_camera/left/image_rect_color"/>
|
||||
<remap from="depth/image" to="stereo_camera/depth"/>
|
||||
<remap from="rgb/camera_info" to="stereo_camera/left/camera_info"/>
|
||||
<remap from="odom" to="/stereo_odometer/odometry"/>
|
||||
|
||||
<param name="frame_id" type="string" value="base_link"/>
|
||||
|
||||
<param name="Odom/Type" type="string" value="6"/>
|
||||
<param name="Odom/NearestNeighbor" type="string" value="3"/>
|
||||
<param name="Odom/MinInliers" type="string" value="10"/>
|
||||
<param name="Odom/MaxDepth" type="string" value="3"/>
|
||||
<param name="Odom/NNDR" type="string" value="0.8"/>
|
||||
<param name="Odom/WordsRatio" type="string" value="0.5"/>
|
||||
<param name="Odom/LocalHistory" type="string" value="1000"/>
|
||||
<param name="Odom/InlierDistance" type="string" value="0.02"/>
|
||||
<param name="GFTT/MaxCorners" type="string" value="400"/>
|
||||
<param name="BRIEF\Bytes" type="string" value="16"/>
|
||||
</node>
|
||||
-->
|
||||
<group ns="rtabmap">
|
||||
|
||||
<!-- Visual SLAM (robot side) -->
|
||||
<!-- args: "delete_db_on_start" and "udebug" -->
|
||||
<node name="rtabmap" pkg="rtabmap" type="rtabmap" output="screen" args="--delete_db_on_start">
|
||||
<param name="subscribe_depth" type="bool" value="true"/>
|
||||
<param name="subscribe_laserScan" type="bool" value="true"/>
|
||||
<param name="subscribe_laserScan" type="bool" value="false"/>
|
||||
|
||||
<remap from="rgb/image" to="/wide_stereo/left/image_rect"/>
|
||||
<remap from="rgb/camera_info" to="/wide_stereo/left/camera_info"/>
|
||||
<remap from="rgb/image" to="/stereo_camera/left/image_rect_color"/>
|
||||
<remap from="rgb/camera_info" to="/stereo_camera/left/camera_info"/>
|
||||
|
||||
<remap from="depth/image" to="/wide_stereo/depth"/>
|
||||
<remap from="depth/image" to="/stereo_camera/depth"/>
|
||||
|
||||
<remap from="odom" to="/stereo_odometer/odometry"/>
|
||||
<remap from="scan" to="/base_scan"/>
|
||||
|
||||
<param name="frame_id" type="string" value="/base_footprint"/>
|
||||
<param name="frame_id" type="string" value="/base_link"/>
|
||||
<param name="queue_size" type="int" value="30"/>
|
||||
|
||||
<param name="Rtabmap/TimeThr" type="string" value="700"/>
|
||||
@@ -52,31 +91,47 @@
|
||||
<param name="RGBD/LocalLoopDetectionTime" type="string" value="false"/>
|
||||
<param name="LccBow/MinInliers" type="string" value="10"/>
|
||||
<param name="LccBow/InlierDistance" type="string" value="0.05"/>
|
||||
|
||||
<!-- Uncomment to force 3dof loop closure constraint using -->
|
||||
<!-- the 2d scans (set ScanMatchingSize=1 to correct odometry with laser) -->
|
||||
<!--
|
||||
<param name="LccIcp/Type" type="string" value="2"/>
|
||||
<param name="LccIcp2/CorrespondenceRatio" type="string" value="0.3"/>
|
||||
<param name="LccIcp2/MaxFitness" type="string" value="5"/>
|
||||
<param name="RGBD/ScanMatchingSize" type="string" value="0"/>
|
||||
-->
|
||||
|
||||
</node>
|
||||
|
||||
<!-- Visualisation (client side) -->
|
||||
<node pkg="rtabmap" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap)/launch/config/rgbd_gui.ini" output="screen">
|
||||
<param name="subscribe_depth" type="bool" value="true"/>
|
||||
<param name="subscribe_laserScan" type="bool" value="true"/>
|
||||
<param name="subscribe_laserScan" type="bool" value="false"/>
|
||||
<param name="queue_size" type="int" value="30"/>
|
||||
|
||||
<remap from="rgb/image" to="/wide_stereo/left/image_rect"/>
|
||||
<remap from="rgb/camera_info" to="/wide_stereo/left/camera_info"/>
|
||||
<remap from="depth/image" to="/wide_stereo/depth"/>
|
||||
<remap from="rgb/image" to="/stereo_camera/left/image_rect_color"/>
|
||||
<remap from="rgb/camera_info" to="/stereo_camera/left/camera_info"/>
|
||||
<remap from="depth/image" to="/stereo_camera/depth"/>
|
||||
|
||||
<remap from="scan" to="/base_scan"/>
|
||||
<remap from="odom" to="/stereo_odometer/odometry"/>
|
||||
</node>
|
||||
</group>
|
||||
|
||||
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find rtabmap)/launch/config/rgbd.rviz"/>
|
||||
|
||||
<!-- sync cloud with odometry and voxelize the point cloud (for fast visualization in rviz) -->
|
||||
<node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager" output="screen"/>
|
||||
<node pkg="nodelet" type="nodelet" name="data_odom_sync" args="load rtabmap/data_odom_sync standalone_nodelet">
|
||||
<remap from="rgb/image_in" to="camera/rgb/image_rect_color"/>
|
||||
<remap from="depth/image_in" to="camera/depth_registered/image_raw"/>
|
||||
<remap from="rgb/camera_info_in" to="camera/depth_registered/camera_info"/>
|
||||
<remap from="odom_in" to="rtabmap/odom"/>
|
||||
|
||||
<remap from="rgb/image_out" to="data_odom_sync/image"/>
|
||||
<remap from="depth/image_out" to="data_odom_sync/depth"/>
|
||||
<remap from="rgb/camera_info_out" to="data_odom_sync/camera_info"/>
|
||||
<remap from="odom_out" to="odom_sync"/>
|
||||
|
||||
<param name="queue_size" type="int" value="30"/>
|
||||
</node>
|
||||
<node pkg="nodelet" type="nodelet" name="points_xyzrgb" args="load rtabmap/point_cloud_xyzrgb standalone_nodelet">
|
||||
<remap from="rgb/image" to="data_odom_sync/image"/>
|
||||
<remap from="depth/image" to="data_odom_sync/depth"/>
|
||||
<remap from="rgb/camera_info" to="data_odom_sync/camera_info"/>
|
||||
<remap from="cloud" to="voxel_cloud" />
|
||||
|
||||
<param name="queue_size" type="int" value="10"/>
|
||||
<param name="voxel_size" type="double" value="0.01"/>
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,82 @@
|
||||
<launch>
|
||||
<!-- 6DOF stereo demo: download a bag example from http://projects.csail.mit.edu/stata/downloads.php.
|
||||
You will need to remove the transform /combined_odometry from the /tf messages:
|
||||
$ rosbag filter 2011-01-20-07-18-45.bag out.bag 'topic != "/tf" or topic == "/tf" and m.transforms[0].header.frame_id != "/odom_combined"'
|
||||
Run the example:
|
||||
$ roslaunch rtabmap demo_stereo.launch
|
||||
$ rosbag play -.-clock out.bag (replace -.- by double-dashes)
|
||||
-->
|
||||
|
||||
<param name="use_sim_time" type="bool" value="True"/>
|
||||
|
||||
<!-- Run the ROS package stereo_image_proc for image rectification and disparity computation -->
|
||||
<group ns="/wide_stereo">
|
||||
<node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager" output="screen"/>
|
||||
<node pkg="nodelet" type="nodelet" name="disparity" args="load stereo_image_proc/disparity standalone_nodelet"/>
|
||||
<node pkg="nodelet" type="nodelet" name="disparity2depth" args="load rtabmap/disparity_to_depth standalone_nodelet"/>
|
||||
</group>
|
||||
|
||||
<!-- Odometry: Run the viso2_ros package -->
|
||||
<node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer" output="screen">
|
||||
<remap from="stereo" to="/wide_stereo"/>
|
||||
<remap from="image" to="image_rect"/>
|
||||
<param name="base_link_frame_id" value="/base_footprint"/>
|
||||
<param name="odom_frame_id" value="/odom"/>
|
||||
<param name="ref_frame_change_method" value="1"/>
|
||||
</node>
|
||||
|
||||
<group ns="rtabmap">
|
||||
|
||||
<!-- Visual SLAM (robot side) -->
|
||||
<!-- args: "delete_db_on_start" and "udebug" -->
|
||||
<node name="rtabmap" pkg="rtabmap" type="rtabmap" output="screen" args="--delete_db_on_start">
|
||||
<param name="subscribe_depth" type="bool" value="true"/>
|
||||
<param name="subscribe_laserScan" type="bool" value="true"/>
|
||||
|
||||
<remap from="rgb/image" to="/wide_stereo/left/image_rect"/>
|
||||
<remap from="rgb/camera_info" to="/wide_stereo/left/camera_info"/>
|
||||
|
||||
<remap from="depth/image" to="/wide_stereo/depth"/>
|
||||
|
||||
<remap from="odom" to="/stereo_odometer/odometry"/>
|
||||
<remap from="scan" to="/base_scan"/>
|
||||
|
||||
<param name="frame_id" type="string" value="/base_footprint"/>
|
||||
<param name="queue_size" type="int" value="30"/>
|
||||
|
||||
<param name="Rtabmap/TimeThr" type="string" value="700"/>
|
||||
<param name="Rtabmap/DetectionRate" type="string" value="1"/>
|
||||
<param name="SURF/HessianThreshold" type="string" value="600"/>
|
||||
<param name="LccBow/MaxDepth" type="string" value="0"/>
|
||||
<param name="RGBD/LocalLoopDetectionSpace" type="string" value="false"/>
|
||||
<param name="RGBD/LocalLoopDetectionTime" type="string" value="false"/>
|
||||
<param name="LccBow/MinInliers" type="string" value="10"/>
|
||||
<param name="LccBow/InlierDistance" type="string" value="0.05"/>
|
||||
|
||||
<!-- Uncomment to force 3dof loop closure constraint using -->
|
||||
<!-- the 2d scans (set ScanMatchingSize=1 to correct odometry with laser) -->
|
||||
<!--
|
||||
<param name="LccIcp/Type" type="string" value="2"/>
|
||||
<param name="LccIcp2/CorrespondenceRatio" type="string" value="0.3"/>
|
||||
<param name="LccIcp2/MaxFitness" type="string" value="5"/>
|
||||
<param name="RGBD/ScanMatchingSize" type="string" value="0"/>
|
||||
-->
|
||||
|
||||
</node>
|
||||
|
||||
<!-- Visualisation (client side) -->
|
||||
<node pkg="rtabmap" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap)/launch/config/rgbd_gui.ini" output="screen">
|
||||
<param name="subscribe_depth" type="bool" value="true"/>
|
||||
<param name="subscribe_laserScan" type="bool" value="true"/>
|
||||
<param name="queue_size" type="int" value="30"/>
|
||||
|
||||
<remap from="rgb/image" to="/wide_stereo/left/image_rect"/>
|
||||
<remap from="rgb/camera_info" to="/wide_stereo/left/camera_info"/>
|
||||
<remap from="depth/image" to="/wide_stereo/depth"/>
|
||||
|
||||
<remap from="scan" to="/base_scan"/>
|
||||
<remap from="odom" to="/stereo_odometer/odometry"/>
|
||||
</node>
|
||||
</group>
|
||||
|
||||
</launch>
|
||||
Reference in New Issue
Block a user