From 0e26c9feac33cc8a86159aeb2ac270d312a9670c Mon Sep 17 00:00:00 2001 From: Wolfgang Hess Date: Tue, 13 Sep 2016 17:33:41 +0200 Subject: [PATCH] Add support for 2D SLAM with a depth camera. (#54) This changes the URDF and timeout for the TurtleBot configuration, and adds a Dockerfile with everything that is needed to run 2D SLAM with a depth camera. Verified to work on a TurtleBot 2 with an ASUS Xtion. And tiny style fixes. --- .../configuration_files/turtlebot.lua | 2 +- cartographer_ros/package.xml | 2 +- cartographer_ros/urdf/backpack_2d.urdf | 42 +++++++++---------- cartographer_ros/urdf/backpack_3d.urdf | 40 +++++++++--------- cartographer_ros/urdf/turtlebot.urdf | 39 +++++++++++------ cartographer_turtlebot/Dockerfile | 23 ++++++++++ 6 files changed, 93 insertions(+), 55 deletions(-) create mode 100644 cartographer_turtlebot/Dockerfile diff --git a/cartographer_ros/configuration_files/turtlebot.lua b/cartographer_ros/configuration_files/turtlebot.lua index 0e76314..150839b 100644 --- a/cartographer_ros/configuration_files/turtlebot.lua +++ b/cartographer_ros/configuration_files/turtlebot.lua @@ -28,7 +28,7 @@ options = { horizontal_laser_max_range = 30., horizontal_laser_missing_echo_ray_length = 5., num_lasers_3d = 0, - lookup_transform_timeout_sec = 0.01, + lookup_transform_timeout_sec = 0.2, submap_publish_period_sec = 0.3, pose_publish_period_sec = 5e-3, } diff --git a/cartographer_ros/package.xml b/cartographer_ros/package.xml index 8597fcd..6f2fb2a 100644 --- a/cartographer_ros/package.xml +++ b/cartographer_ros/package.xml @@ -74,6 +74,6 @@ rosunit - + diff --git a/cartographer_ros/urdf/backpack_2d.urdf b/cartographer_ros/urdf/backpack_2d.urdf index 33842d3..dcb4181 100644 --- a/cartographer_ros/urdf/backpack_2d.urdf +++ b/cartographer_ros/urdf/backpack_2d.urdf @@ -16,62 +16,62 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - + + + - - - + + + diff --git a/cartographer_ros/urdf/backpack_3d.urdf b/cartographer_ros/urdf/backpack_3d.urdf index 9b6a538..ac12ede 100644 --- a/cartographer_ros/urdf/backpack_3d.urdf +++ b/cartographer_ros/urdf/backpack_3d.urdf @@ -16,62 +16,62 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - + + - - - + + + diff --git a/cartographer_ros/urdf/turtlebot.urdf b/cartographer_ros/urdf/turtlebot.urdf index dcaa328..56258a8 100644 --- a/cartographer_ros/urdf/turtlebot.urdf +++ b/cartographer_ros/urdf/turtlebot.urdf @@ -16,38 +16,53 @@ - + - + - + - + - + - + - + - + - + + + + - - - + + + + + + + + + + + + + + + diff --git a/cartographer_turtlebot/Dockerfile b/cartographer_turtlebot/Dockerfile new file mode 100644 index 0000000..ab34cb5 --- /dev/null +++ b/cartographer_turtlebot/Dockerfile @@ -0,0 +1,23 @@ +# 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. + +FROM cartographer_ros_image +RUN apt-get update && apt-get install -y \ + ros-indigo-depthimage-to-laserscan \ + ros-indigo-kobuki \ + ros-indigo-kobuki-core \ + ros-indigo-openni2-launch \ + ros-indigo-turtlebot-bringup \ + tmux \ + && rm -rf /var/lib/apt/lists/*