Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@matlabbe
Last active May 8, 2020 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matlabbe/5731ce3b2bc25ec5e0295a80c9f5f671 to your computer and use it in GitHub Desktop.
Save matlabbe/5731ce3b2bc25ec5e0295a80c9f5f671 to your computer and use it in GitHub Desktop.
<launch>
<!-- stereo_20Hz directory -->
<arg name="dir" default="$(env HOME)/Downloads/stereo_20Hz" />
<!-- Choose visualization -->
<arg name="rviz" default="false" />
<arg name="rtabmapviz" default="true" />
<arg name="rate" default="20" />
<arg name="ground_is_obstacle" default="false"/>
<arg name="align_with_ground" default="false"/>
<!-- Run stereo_sequence_publisher to publish synchronized images -->
<node name="stereo_pub" pkg="bag_tools" type="stereo_sequence_publisher.py" output="screen">
<param name="image_dir_left" value="$(arg dir)/left"/>
<param name="image_dir_right" value="$(arg dir)/right"/>
<param name="file_pattern" value="*.jpg"/>
<param name="camera_info_file_left" value="$(arg dir)/stereo_20Hz_ros_left.yaml"/>
<param name="camera_info_file_right" value="$(arg dir)/stereo_20Hz_ros_right.yaml"/>
<param name="frequency" value="$(arg rate)"/>
<remap from="/stereo_camera/left/image_color" to="/stereo_camera/left/image_raw" />
<remap from="/stereo_camera/right/image_color" to="/stereo_camera/right/image_raw" />
<remap from="/stereo_camera/left/camera_info" to="/stereo_camera/left/camera_info" />
<remap from="/stereo_camera/right/camera_info" to="/stereo_camera/right/camera_info" />
</node>
<!-- Run the ROS package stereo_image_proc for image rectification -->
<group ns="/stereo_camera" >
<node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc"/>
</group>
<!-- rotate camera so z axis is up and x forward. -->
<arg name="pi/2" value="1.5707963267948966" />
<node pkg="tf" type="static_transform_publisher" name="camera_base_link" args="0 0 0 -$(arg pi/2) 0 -$(arg pi/2) camera_link stereo_20Hz_left 100" />
<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
<arg name="rtabmap_args" value="--delete_db_on_start --Vis/EstimationType 1 --Vis/MinInliers 15 --SURF/HessianThreshold 100 --Grid/3DGroundIsObstacle $(arg ground_is_obstacle) --Odom/AlignWithGround $(arg align_with_ground)" />
<arg name="stereo" value="true" />
<arg name="rviz" value="$(arg rviz)" />
<arg name="rtabmapviz" value="$(arg rtabmapviz)" />
</include>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment