Browse Source

Add demo launch files to use with bags. (#8)

Also improves the launch files for the 3 configurations with
a TurtleBot instead of a demo bag.
Wolfgang Hess 9 years ago
parent
commit
4635ed06ae

+ 0 - 4
cartographer_turtlebot2/CMakeLists.txt

@@ -58,10 +58,6 @@ install(DIRECTORY launch/
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch/
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch/
 )
 )
 
 
-install(DIRECTORY urdf/
-  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/urdf/
-)
-
 install(DIRECTORY configuration_files/
 install(DIRECTORY configuration_files/
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/configuration_files/
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/configuration_files/
 )
 )

+ 43 - 0
cartographer_turtlebot2/launch/demo_depth_camera_2d.launch

@@ -0,0 +1,43 @@
+<!--
+  Copyright 2016 The Cartographer Authors
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<launch>
+  <param name="/use_sim_time" value="true" />
+
+  <node name="cartographer_node" pkg="cartographer_ros"
+      type="cartographer_node" args="
+          -configuration_directory
+              $(find cartographer_turtlebot2)/configuration_files
+          -configuration_basename turtlebot2_2d.lua"
+      output="screen" />
+
+  <node name="flat_world_imu_node" pkg="cartographer_turtlebot2"
+      type="flat_world_imu_node" output="screen">
+    <remap from="imu_in" to="/mobile_base/sensors/imu_data_raw" />
+    <remap from="imu_out" to="/imu" />
+  </node>
+
+  <node name="squash_depth_camera" pkg="depthimage_to_laserscan"
+      type="depthimage_to_laserscan">
+    <remap from="image" to="/camera/depth/image_raw" />
+  </node>
+
+  <node name="rviz" pkg="rviz" type="rviz" required="true"
+      args="-d $(find cartographer_turtlebot2
+          )/configuration_files/demo_turtlebot2.rviz" />
+  <node name="playbag" pkg="rosbag" type="play"
+      args="--clock $(arg bag_filename)" />
+</launch>

+ 58 - 0
cartographer_turtlebot2/launch/demo_depth_camera_3d.launch

@@ -0,0 +1,58 @@
+<!--
+  Copyright 2016 The Cartographer Authors
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<launch>
+  <param name="/use_sim_time" value="true" />
+
+  <node name="cartographer_node" pkg="cartographer_ros"
+      type="cartographer_node" args="
+          -configuration_directory
+              $(find cartographer_turtlebot2)/configuration_files
+          -configuration_basename turtlebot2_3d.lua"
+      output="screen" />
+
+  <node name="flat_world_imu_node" pkg="cartographer_turtlebot2"
+      type="flat_world_imu_node" output="screen">
+    <remap from="imu_in" to="/mobile_base/sensors/imu_data_raw" />
+    <remap from="imu_out" to="/imu" />
+  </node>
+
+  <node pkg="nodelet" type="nodelet" name="image_processing_manager"
+        args="manager" />
+  <node pkg="nodelet" type="nodelet" name="metricizer"
+        args="load depth_image_proc/convert_metric image_processing_manager">
+    <remap from="image_raw" to="/camera/depth/image_raw" />
+    <remap from="image" to="/image" />
+  </node>
+  <node pkg="nodelet" type="nodelet" name="rectifier"
+        args="load image_proc/rectify image_processing_manager">
+    <remap from="image_mono" to="/image" />
+    <remap from="camera_info" to="/camera/depth/camera_info" />
+    <remap from="image_rect" to="/image_rect" />
+  </node>
+  <node pkg="nodelet" type="nodelet" name="cloudifier"
+        args="load depth_image_proc/point_cloud_xyz image_processing_manager">
+    <remap from="camera_info" to="/camera/depth/camera_info" />
+    <remap from="image_rect" to="/image_rect" />
+    <remap from="points" to="/points2" />
+  </node>
+
+  <node name="rviz" pkg="rviz" type="rviz" required="true"
+      args="-d $(find cartographer_turtlebot2
+          )/configuration_files/demo_turtlebot2.rviz" />
+  <node name="playbag" pkg="rosbag" type="play"
+      args="--clock $(arg bag_filename)" />
+</launch>

+ 5 - 1
cartographer_turtlebot2/launch/demo_turtlebot2.launch → cartographer_turtlebot2/launch/demo_lidar_2d.launch

@@ -22,12 +22,16 @@
           -configuration_directory
           -configuration_directory
               $(find cartographer_turtlebot2)/configuration_files
               $(find cartographer_turtlebot2)/configuration_files
           -configuration_basename turtlebot2_2d.lua"
           -configuration_basename turtlebot2_2d.lua"
-      output="screen" />
+      output="screen">
+    <remap from="scan" to="/laser_scan" />
+  </node>
+
   <node name="flat_world_imu_node" pkg="cartographer_turtlebot2"
   <node name="flat_world_imu_node" pkg="cartographer_turtlebot2"
       type="flat_world_imu_node" output="screen">
       type="flat_world_imu_node" output="screen">
     <remap from="imu_in" to="/mobile_base/sensors/imu_data_raw" />
     <remap from="imu_in" to="/mobile_base/sensors/imu_data_raw" />
     <remap from="imu_out" to="/imu" />
     <remap from="imu_out" to="/imu" />
   </node>
   </node>
+
   <node name="rviz" pkg="rviz" type="rviz" required="true"
   <node name="rviz" pkg="rviz" type="rviz" required="true"
       args="-d $(find cartographer_turtlebot2
       args="-d $(find cartographer_turtlebot2
           )/configuration_files/demo_turtlebot2.rviz" />
           )/configuration_files/demo_turtlebot2.rviz" />

+ 2 - 2
cartographer_turtlebot2/launch/turtlebot2.launch

@@ -17,8 +17,7 @@
 <launch>
 <launch>
   <arg name="configuration_basename" />
   <arg name="configuration_basename" />
 
 
-  <param name="robot_description"
-    textfile="$(find cartographer_turtlebot2)/urdf/turtlebot2.urdf" />
+  <include file="$(find turtlebot_bringup)/launch/minimal.launch" />
 
 
   <node name="cartographer_node" pkg="cartographer_ros"
   <node name="cartographer_node" pkg="cartographer_ros"
       type="cartographer_node" args="
       type="cartographer_node" args="
@@ -28,6 +27,7 @@
       output="screen">
       output="screen">
     <remap from="points2" to="/camera/depth/points" />
     <remap from="points2" to="/camera/depth/points" />
   </node>
   </node>
+
   <node name="flat_world_imu_node" pkg="cartographer_turtlebot2"
   <node name="flat_world_imu_node" pkg="cartographer_turtlebot2"
       type="flat_world_imu_node" output="screen">
       type="flat_world_imu_node" output="screen">
     <remap from="imu_in" to="/mobile_base/sensors/imu_data_raw" />
     <remap from="imu_in" to="/mobile_base/sensors/imu_data_raw" />

+ 5 - 7
cartographer_turtlebot2/launch/turtlebot2_depth_camera_2d.launch

@@ -15,13 +15,11 @@
 -->
 -->
 
 
 <launch>
 <launch>
-  <include file="$(find turtlebot_bringup)/launch/minimal.launch" />
-  <include file="$(find openni2_launch)/launch/openni2.launch" />
-
-  <node name="squash_depth_camera" pkg="depthimage_to_laserscan"
-      type="depthimage_to_laserscan">
-    <remap from="image" to="/camera/depth/image_raw" />
-  </node>
+  <include file="$(find turtlebot_bringup)/launch/3dsensor.launch" />
+  <!-- We override the parameter here to remove the leading slash which should
+       not be there according to tf2 naming rules. -->
+  <param name="/depthimage_to_laserscan/output_frame_id"
+      value="camera_depth_frame" />
 
 
   <include file="$(find cartographer_turtlebot2)/launch/turtlebot2.launch">
   <include file="$(find cartographer_turtlebot2)/launch/turtlebot2.launch">
     <arg name="configuration_basename" value="turtlebot2_2d.lua" />
     <arg name="configuration_basename" value="turtlebot2_2d.lua" />

+ 2 - 4
cartographer_turtlebot2/launch/turtlebot2_depth_camera_3d.launch

@@ -15,10 +15,8 @@
 -->
 -->
 
 
 <launch>
 <launch>
-  <param name="/camera/driver/data_skip" value="2" />
-
-  <include file="$(find turtlebot_bringup)/launch/minimal.launch" />
-  <include file="$(find openni2_launch)/launch/openni2.launch" />
+  <param name="/camera/driver/data_skip" value="1" />
+  <include file="$(find turtlebot_bringup)/launch/3dsensor.launch" />
 
 
   <include file="$(find cartographer_turtlebot2)/launch/turtlebot2.launch">
   <include file="$(find cartographer_turtlebot2)/launch/turtlebot2.launch">
     <arg name="configuration_basename" value="turtlebot2_3d.lua" />
     <arg name="configuration_basename" value="turtlebot2_3d.lua" />

+ 1 - 3
cartographer_turtlebot2/launch/turtlebot2_urg_lidar_2d.launch

@@ -15,9 +15,7 @@
 -->
 -->
 
 
 <launch>
 <launch>
-  <include file="$(find turtlebot_bringup)/launch/minimal.launch" />
-
-  <param name="urg_node/frame_id" value="horizontal_laser_link" />
+  <param name="urg_node/frame_id" value="plate_top_link" />
   <node name="urg_node" pkg="urg_node" type="urg_node" />
   <node name="urg_node" pkg="urg_node" type="urg_node" />
 
 
   <include file="$(find cartographer_turtlebot2)/launch/turtlebot2.launch">
   <include file="$(find cartographer_turtlebot2)/launch/turtlebot2.launch">

+ 0 - 68
cartographer_turtlebot2/urdf/turtlebot2.urdf

@@ -1,68 +0,0 @@
-<!--
-  Copyright 2016 The Cartographer Authors
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<robot name="cartographer_turtlebot2">
-  <material name="orange">
-    <color rgba="1.0 0.5 0.2 1" />
-  </material>
-  <material name="gray">
-    <color rgba="0.2 0.2 0.2 1" />
-  </material>
-  <material name="green">
-    <color rgba="0.2 0.4 0.2 1" />
-  </material>
-
-  <link name="horizontal_laser_link">
-    <visual>
-      <origin xyz="0.0 0.0 0.0" />
-      <geometry>
-        <cylinder length="0.09" radius="0.03" />
-      </geometry>
-      <material name="gray" />
-    </visual>
-  </link>
-
-  <link name="base_link">
-    <visual>
-      <origin xyz="0. 0. 0." />
-      <geometry>
-        <box size="0.03 0.4 0.8" />
-      </geometry>
-      <material name="green" />
-    </visual>
-  </link>
-
-  <link name="camera_link" />
-  <link name="base_footprint" />
-
-  <joint name="horizontal_laser_link_joint" type="fixed">
-    <parent link="base_link" />
-    <child link="horizontal_laser_link" />
-    <origin xyz="0. 0. 0.6" />
-  </joint>
-
-  <joint name="camera_link_joint" type="fixed">
-    <parent link="base_link" />
-    <child link="camera_link" />
-    <origin xyz="0.15 0. 0.6" />
-  </joint>
-
-  <joint name="base_link_base_footprint_joint" type="fixed">
-    <parent link="base_footprint" />
-    <child link="base_link" />
-    <origin xyz="0. 0. 0." />
-  </joint>
-</robot>