Skip to content

Instantly share code, notes, and snippets.

@aemarkov
Created January 30, 2020 13:17
Show Gist options
  • Save aemarkov/2ab804a19a6724df65d95a523896f4c5 to your computer and use it in GitHub Desktop.
Save aemarkov/2ab804a19a6724df65d95a523896f4c5 to your computer and use it in GitHub Desktop.
ROS .launch-file to record bag with pointcloud from Velodyne LiDAR with SLAM using ZED-camera
<?xml version="1.0"?>
<launch>
<arg name="is_record_odom" default="true"/>
<arg name="is_record_velodyne" default="true"/>
<arg name="bags_directory" value="/home/nvidia/bags"/>
<!-- ZED-camera SLAM -->
<include file="$(find zed_wrapper)/launch/zed.launch" if="$(eval is_record_odom)"/>
<!-- LiDAR -->
<include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch" if="$(eval is_record_velodyne)"/>
<!-- Move LiDAR to the ZED frame. Insert your values-->
<node pkg="tf" type="static_transform_publisher"
name="lidar_to_zed"
args="0 0 0 -1.57 0 0 zed_camera_center velodyne 10"
if="$(eval is_record_velodyne)"/>
<!-- Record bag -->
<node name="bag_record" pkg="rosbag" type="record"
args="record -o $(arg bags_directory)/bag /rosout /tf /zed/odom /zed/pose /zed/path_map /velodyne_points"
if="$(eval is_record_velodyne or is_record_odom)"/>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment