]> defiant.homedns.org Git - ros_wild_thumper.git/commitdiff
added hector, cartographer launch
authorErik Andresen <erik@vontaene.de>
Sun, 12 Mar 2017 10:27:32 +0000 (11:27 +0100)
committerErik Andresen <erik@vontaene.de>
Sun, 12 Mar 2017 10:27:32 +0000 (11:27 +0100)
config/cartographer.lua [new file with mode: 0644]
config/costmap_common_params.yaml
launch/cartographer.launch [new file with mode: 0644]
launch/hector.launch [new file with mode: 0644]

diff --git a/config/cartographer.lua b/config/cartographer.lua
new file mode 100644 (file)
index 0000000..fdc1de6
--- /dev/null
@@ -0,0 +1,52 @@
+-- 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.
+
+include "map_builder.lua"
+
+options = {
+  map_builder = MAP_BUILDER,
+  map_frame = "map",
+  tracking_frame = "base_imu_link",
+  published_frame = "base_link",
+  odom_frame = "odom",
+  provide_odom_frame = false,
+  use_odometry = true,
+  use_laser_scan = true,
+  use_multi_echo_laser_scan = false,
+  num_point_clouds = 0,
+  lookup_transform_timeout_sec = 0.2,
+  submap_publish_period_sec = 0.3,
+  pose_publish_period_sec = 5e-3,
+}
+
+MAP_BUILDER.use_trajectory_builder_2d = true
+
+TRAJECTORY_BUILDER_2D.laser_min_range = 0.4
+TRAJECTORY_BUILDER_2D.laser_max_range = 3.5
+TRAJECTORY_BUILDER_2D.laser_missing_echo_ray_length = 2.0
+TRAJECTORY_BUILDER_2D.use_imu_data = true
+TRAJECTORY_BUILDER_2D.motion_filter.max_time_seconds = 0.3
+TRAJECTORY_BUILDER_2D.motion_filter.max_distance_meters = 0.2
+TRAJECTORY_BUILDER_2D.motion_filter.max_angle_radians = math.rad(3.)
+TRAJECTORY_BUILDER_2D.ceres_scan_matcher.translation_weight = 70
+TRAJECTORY_BUILDER_2D.ceres_scan_matcher.rotation_weight = 300
+
+TRAJECTORY_BUILDER_2D.submaps.resolution = 0.035
+TRAJECTORY_BUILDER_2D.submaps.num_laser_fans = 120
+SPARSE_POSE_GRAPH.optimize_every_n_scans = 120
+SPARSE_POSE_GRAPH.constraint_builder.min_score = 0.82
+SPARSE_POSE_GRAPH.constraint_builder.sampling_ratio = 1.
+SPARSE_POSE_GRAPH.constraint_builder.ceres_scan_matcher.covariance_scale = 3e-5
+
+return options
index 566291241a7ace3e40b29f20fbe6bc3088a9d6a0..998b0be7ab845f2edbf450984c8b9c9b364084e6 100644 (file)
@@ -4,7 +4,7 @@ obstacle_layer:
   observation_sources: laser_scan_sensor
   obstacle_range: 2.5
   raytrace_range: 3.0
-  laser_scan_sensor: {sensor_frame: camera_depth_frame, data_type: LaserScan, topic: scan, marking: true, clearing: true}
+  laser_scan_sensor: {data_type: LaserScan, topic: scan, marking: true, clearing: true}
 
 inflation_layer:
   inflation_radius: 0.20
diff --git a/launch/cartographer.launch b/launch/cartographer.launch
new file mode 100644 (file)
index 0000000..5c2eb9e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<launch>
+       <param name="/use_sim_time" value="true" />
+
+       <param name="robot_description" command="$(find xacro)/xacro.py $(find wild_thumper)/urdf/wild_thumper.urdf.xacro"/>
+
+       <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
+
+       <node name="cartographer_node" pkg="cartographer_ros" type="cartographer_node" args="-configuration_directory $(find wild_thumper)/config -configuration_basename cartographer.lua" output="screen">
+       </node>
+
+       <node name="rviz" pkg="rviz" type="rviz" required="true" args="-d $(find cartographer_ros)/configuration_files/demo_2d.rviz" />
+       <node name="playbag" pkg="rosbag" type="play" args="--clock $(arg bag_filename)" />
+</launch>
diff --git a/launch/hector.launch b/launch/hector.launch
new file mode 100644 (file)
index 0000000..82cd102
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<launch>
+       <arg name="use_sim_time" default="false" />
+       <param name="/use_sim_time" value="$(arg use_sim_time)"/>
+
+       <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping">
+               <param name="pub_map_odom_transform" value="true"/>
+               <param name="map_frame" value="map" />
+               <param name="base_frame" value="base_link" />
+               <param name="odom_frame" value="odom" />
+               <param name="map_resolution" value="0.01" />
+               <param name="map_update_angle_thresh" value="0.436" />
+               <param name="laser_max_dist" value="10.0" />
+       </node>
+</launch>