Commit Graph

215 Commits (9867aeb1a3391e3c2a86a52ca123c4df10c97acd)

Author SHA1 Message Date
Holger Rapp 2803b7bb49 Include what you use. (#214) 2016-12-06 16:23:33 +01:00
Damon Kohler cff972ddf2 Optionally read /tf from bag in place of a URDF. (#213) 2016-12-06 08:36:08 +01:00
Damon Kohler c3a319cabf Cleanups and preparation for handling /tf topic. (#206) 2016-12-01 11:45:25 +01:00
Damon Kohler 42440452b6 Adds multi-trajectory support to offline mapping. (#204) 2016-11-30 16:48:03 +01:00
Wolfgang Hess 78c14d50d2 Cleanup. (#203) 2016-11-30 16:15:43 +01:00
Damon Kohler 946c979a71 Adds offline SLAM; build maps as fast as possible. (#201) 2016-11-30 15:09:31 +01:00
Damon Kohler c57075f67d Injects tf buffer into Node. (#200) 2016-11-30 11:04:54 +01:00
Damon Kohler 6260c53107 Pulls out reading from URDF file to tf buffer. (#199) 2016-11-29 15:19:58 +01:00
Damon Kohler 141bf26dbb Pulls out sensor data wiring into main. (#198) 2016-11-29 13:28:11 +01:00
Damon Kohler 102fb4ef4e Pulls out TrajectoryState into MapBuilderBridge. (#197) 2016-11-29 11:10:52 +01:00
Damon Kohler 33271f0290 Moves TfBridge into SensorBridge. (#195) 2016-11-28 14:50:04 +01:00
Damon Kohler 0d1e248f5f Support multiple simultaneous trajectories. (#194) 2016-11-28 12:52:34 +01:00
Wolfgang Hess 43c4bacde3 Add additional 3D backpack data. (#191) 2016-11-28 10:58:36 +01:00
Damon Kohler 94fc589141 Pulls out node.h/cc (#189) 2016-11-25 14:49:42 +01:00
Damon Kohler 012beb5c0c Pulls out GetOccupancyGrid to MapBuilderBridge. (#187) 2016-11-25 14:13:04 +01:00
Damon Kohler 500b83ff0d Partially pulls out MapBuilderBridge. (#186) 2016-11-25 12:35:22 +01:00
Damon Kohler 516c86fa5a Improve parameter names. (#185) 2016-11-25 11:31:57 +01:00
Damon Kohler e5b63e377a Fix trajectory start/stop bug and some cleanups. (#184) 2016-11-25 09:37:11 +01:00
Wolfgang Hess 4f6f0dc684 Simplify configuration. (#183)
Logging loop closure matches is now the default.
2016-11-23 12:38:03 +01:00
Damon Kohler 479694963c Improves parameter names and fixes #40. (#181) 2016-11-22 15:39:35 +01:00
Damon Kohler ca5b7d1bff New Cartographer API, removes SensorBridgeOptions. (#180) 2016-11-21 13:12:05 +01:00
Damon Kohler d09c33e8f8 New Cartographer API. (#178) 2016-11-21 10:56:50 +01:00
Damon Kohler 797ee08c5b Fixes Catkin CMake for building libraries. (#177) 2016-11-18 09:33:52 +01:00
Holger Rapp 31d5787544 Track Cartographer API. (#175) 2016-11-17 18:28:27 +01:00
Wolfgang Hess d0343919b3 Fix crashing bug on node termination. (#173) 2016-11-17 17:02:27 +01:00
Damon Kohler 965490f611 Adds configuration files test. (#172) 2016-11-17 12:41:02 +01:00
Damon Kohler 12ea8386bb Updates CMake. (#171) 2016-11-17 11:49:59 +01:00
Holger Rapp 5046bc02cc Adapt to new Cartographer API. (#169)
And write by-floor X-Rays in the asset writer.
2016-11-17 02:17:52 -08:00
Damon Kohler 2ec6001f96 New Cartographer API. (#157) 2016-11-15 14:47:45 +01:00
Atsushi Watanabe 22d8573bd0 Fixes urdfdom_headers version compatibility (#162)
Urdf changed their shared ptr type from boost to std. This PR detects which version of urdf is installed and uses the correct ptr type.
2016-11-08 00:21:34 -08:00
Wolfgang Hess d0edcb5f95 Use function to convert submap pose to ROS message. (#153) 2016-10-27 18:00:18 +02:00
Wolfgang Hess 76212e1c79 Simplify SubmapToProto use. (#152) 2016-10-27 17:00:33 +02:00
Wolfgang Hess a1eb540ffa Add support for multiple consecutive trajectories. (#151)
When the /finish_trajectory service is called, a new trajectory
is started with the same sensor configuration. This enables
"pause and resume".
2016-10-27 15:36:15 +02:00
Thiago de Freitas 7d95852192 Set INCLUDE_DIRS in catking_package (#147) 2016-10-26 17:46:46 +02:00
Wolfgang Hess f100950244 Improve publishing of poses. (#149)
When a new scan matched point cloud is published, its timestamp is used for
publishing corresponding transforms. Further transforms are stamped with
::ros::Time::now().

If configured to publish odom, the two published transforms are combined into
one tf message.
2016-10-26 13:31:51 +02:00
Stefan Kohlbrecher ec2d54ef84 Sets stamped_transform timestamp to ros::Time::now() (#143) 2016-10-26 12:40:19 +02:00
Wolfgang Hess 094e319d4a Cartographer API changes. (#146) 2016-10-26 09:18:01 +02:00
Holger Rapp 92678fa4fd Adds a binary that runs over trajectory and data to create assets of all point data. (#142) 2016-10-25 14:47:42 +02:00
Holger Rapp 16f192aeb9 Write the trajectory on exporting. (#134)
And some refactorings around writing assets.
2016-10-20 14:09:05 +02:00
Wolfgang Hess af78dcbe55 Fix constness of Submaps to match the new API. (#136) 2016-10-20 12:01:56 +02:00
Wolfgang Hess b8d9ac585e Remove direct use of sensor::Collator. (#132)
Collating the sensor data is now handled by the MapBuilder.
2016-10-19 17:55:20 +02:00
Holger Rapp e4abb77835 Use pkg-config to find yaml-cpp. (#130)
Fixes #117.
2016-10-19 17:33:41 +02:00
Holger Rapp a3010b7611 Check for pcl_conversions library at configuration time. (#131)
Fixes #118.
2016-10-19 17:10:22 +02:00
Wolfgang Hess 0289ece55d Unify to AddLaserFan for both 2D and 3D. (#129) 2016-10-19 15:25:19 +02:00
Holger Rapp ccbf9ef1be Adapt to changes in cartographer and write PLY files on exporting. (#128)
Also use reflectivity in the 'PointsBatch'es created in 'WriteAssets'.
In the online case, we throw away reflectivities during SLAMing to save
on memory, so there will be none.
2016-10-19 15:02:34 +02:00
Damon Kohler b63611b2c3 Updated to work with new APIs. (#125) 2016-10-18 18:04:46 +02:00
Damon Kohler caa77c8588 Removes templating on data type. (#122) 2016-10-17 16:39:29 +02:00
Damon Kohler d1707853af Moves SensorCollator into sensor package. (#113) 2016-10-17 10:58:18 +02:00
Holger Rapp 53df586f69 Write XRays for 3D runs when finalizing a trajectory. (#116)
* Write XRays for 3D runs when finalizing a trajectory.
2016-10-14 17:02:09 +02:00
Wolfgang Hess 8d36c633b8 Updates use of LaserFan following cartographer. (#114)
This follows changes from googlecartographer/cartographer#62 and
googlecartographer/cartographer#64.
2016-10-14 12:41:00 +02:00
Wolfgang Hess 4557d9fd12 Use the simplified ToLaserFan3D function. (#112) 2016-10-13 15:31:47 +02:00
Holger Rapp 90872f3697 Update cMakeLists.txt. (#111) 2016-10-13 15:10:02 +02:00
Damon Kohler 0a76d10546 Moves SensorData struct into Cartographer. (#110) 2016-10-13 14:38:00 +02:00
Holger Rapp bc3a4978f2 We do not use ZLIB anymore. (#104) 2016-10-13 12:31:28 +02:00
Holger Rapp 9ac88abcfc Fix compile warnings and add a clarifying comment. (#105) 2016-10-13 11:44:19 +02:00
Holger Rapp be7ce01463 Use Cartographer's cmake functions for ROS projects. (#100)
- Move sources from <project>/src into project/project and fix includes.
- Add autogenerated CMakeFiles for ROS projects. The python script is
  not yet fully updated to be used for keeping the files updated without
  manual intervention though.
- Build everything with -fPIC, so we can create shared libraries.
2016-10-12 17:50:37 +02:00
Wolfgang Hess 0e8d219eef Fix the IMU orientation in the 2D backpack URDF. (#103) 2016-10-12 17:27:17 +02:00
Wolfgang Hess 61183d5dbc Improve the 2D backpack URDF. (#96) 2016-10-11 15:12:23 +02:00
Wolfgang Hess 2631799820 Tiny formatting changes. (#93) 2016-10-11 09:54:40 +02:00
Damon Kohler d4825af3d4 Moves sensor data transformation into SensorBridge. (#88)
* Pulls out TfBridge.
* SensorBridge has its own options.
* SensorBridge is now responsible for transforming the sensor data into the tracking frame.
* Constant odometry covariance is no longer optional.
2016-10-10 16:15:17 +02:00
Damon Kohler 2a040bc755 Directly use Eigen representations of IMU data. (#91) 2016-10-10 13:29:37 +02:00
Damon Kohler a02dfa084a Renames SensorDataProducer to SensorBridge. (#90) 2016-10-10 10:58:27 +02:00
Wolfgang Hess 1418902493 Do not republish unchanged scan matched point clouds. (#84)
Before, republishing the point clouds at high frequency caused unnecessary
computational load.

This also fixes an issue seen in RViz:
After replaying a bag, point clouds with the same timestamp were continued to
be published. These were never dropped by the PointCloud2 display leading to
excessive memory consumption and bad visualization performance.
2016-10-06 15:11:17 +02:00
Damon Kohler f4e89a070e Small fixes. (#83) 2016-10-05 17:27:21 +02:00
Wolfgang Hess 965d70fbee Also write a YAML file for the final map. (#81)
This allows the saved map to be served by map_server.
2016-10-05 15:30:25 +02:00
Wolfgang Hess 6fd405c78d Add support for finishing and writing 2D maps. (#80)
When receiving a FinishTrajectory call, the Cartographer nodes catches up on
computing loop closures, runs a final optimization, and when in 2D writes out
a PGM map similar to map_saver.
2016-10-05 12:28:29 +02:00
Wolfgang Hess 2128f32d87 Tunes the 3D backpack demo. (#79) 2016-10-04 16:01:46 +02:00
Damon Kohler e1aaf65ac3 Adds PR2 demo and script for dropping TF frames. (#77) 2016-09-30 15:09:31 +02:00
Damon Kohler 3a413028d9 Adds Revo LDS demo. (#76)
* Adds Revo LDS demo.
2016-09-30 14:25:28 +02:00
Damon Kohler ab381d5e6c Adds 3D demo bag docs. (#75)
* Improves consistency across documentation.
2016-09-30 11:25:43 +02:00
Wolfgang Hess ccf77d55e2 Move the ScopedRosLogSink to a separate file. (#74) 2016-09-30 10:20:11 +02:00
Wolfgang Hess d48034df46 Simplify OccupancyGrid publishing. (#73)
The publish_occupancy_grid option is removed, and the publisher always
created in 2D. Only when subscribed to, we start computing OccupancyGrids.
Adds documentation for published topics where this is now documented.
2016-09-29 17:06:48 +02:00
Wolfgang Hess 0fda88b8d6 Move NodeOptions and OccupancyGrid building. (#72)
Constructing NodeOptions and nav_msgs::OccupancyGrids
is moved out of the ROS node implementation file.
2016-09-29 15:45:24 +02:00
Damon Kohler 337607692a Fixes wstool invocation to match wstool docs. (#71)
* Simplifies CMake installation configuration.
2016-09-28 14:36:22 +02:00
Wolfgang Hess 0e15fb9a87 Quickly skip over data at the beginning. (#70)
Sensor data that precedes the published tf transforms can likely never be
transformed, so it should be skipped without delay.
2016-09-27 16:39:25 +02:00
Wolfgang Hess 9103b846ff Do not drop data when falling behind. (#68)
Dropping data significantly harms quality of SLAM. This change means that
all data will be kept. If the system falls behind only for a short period
of time this is preferable. Publishing of the pose and submaps does not
work in this case and needs improvement.
2016-09-26 16:06:58 +02:00
Wolfgang Hess 87a2437d04 Simplify the 3D configuration file. (#67) 2016-09-22 15:41:00 +02:00
Damon Kohler 1525dbdbc7 Pulls out RViz support into a separate package. (#66) 2016-09-20 10:30:21 +02:00
Damon Kohler 534f0119c4 Transforms odometry into the tracking frame. (#65) 2016-09-20 08:42:56 +02:00
Damon Kohler 45d18d53eb Fixes #63 (#64) 2016-09-19 10:44:29 +02:00
Wolfgang Hess 1bd2c5fb9a Make the published frame configurable. (#61)
This fixes #59.
2016-09-16 14:29:30 +02:00
Damon Kohler e576d72dfc Makes topic names relative. (#60)
* Fixes #58
2016-09-16 13:45:17 +02:00
Damon Kohler 3592b13871 Adds an option for constant odometry variance. (#56) 2016-09-15 13:42:05 +02:00
Wolfgang Hess 15e9638ce7 Remove TurtleBot related configuration and cleanup. (#55)
TurtleBot related configuration moves to a new repository
cartographer_turtlebot.

package.xml files got cleaned up and changed to version 2.
2016-09-15 12:05:03 +02:00
Wolfgang Hess 0e26c9feac 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.
2016-09-13 17:33:41 +02:00
Damon Kohler 70f40c6ef2 Adds publishing of the scan matched point could. (#53) 2016-09-09 14:20:10 +02:00
Wolfgang Hess f4d69a738b Fix configuration files. (#52)
Fixes configuration files to work with the latest code changes.
Also removes the remapping from turtlebot.launch which does not
seem to be useful so far.
2016-09-08 18:12:03 +02:00
Damon Kohler 9003b19343 Uses MapBuilder and cleans up some configurations. (#51) 2016-09-08 17:01:21 +02:00
Wolfgang Hess 0cd8f047ed Build cartographer_ros with -O3. (#50)
Most importantly this should fix #41. Before the ROS integration was built
unoptimized which caused performance issues.
2016-09-08 15:23:19 +02:00
Holger Rapp 569826debf Refactored the node for easier code reuse. (#49) 2016-09-07 15:00:57 +02:00
Holger Rapp a2567ab0ab Use WallTimer to always publish pose and submaps. (#47)
This makes the publishing independent from the inflow of sensor data and
is more in line with how the ROS world works.

Fixes #44.
2016-09-02 13:25:43 +02:00
Wolfgang Hess 32be55f42c Add support for publishing nav_msgs/OccupanyGrid messages. (#31)
Adds an option publish_occupancy_grid (disabled by default) which continuously
computes and publishes OccupancyGrid in a background thread. Only the 2D case is
currently supported.

And small code style and typo fixes.
2016-08-30 13:54:31 +02:00
Stefan Kohlbrecher 058958e38c Adds lua parameter for setting transform wait time (#33) 2016-08-30 11:31:54 +02:00
Wolfgang Hess cfd09abccf Sets up Travis CI. (#34) 2016-08-30 08:33:45 +02:00
Damon Kohler a8759d314e Small namespace cleanup. 2016-08-25 11:53:57 +02:00
Damon Kohler 008b5ef377 Adds sensor data rate logging. (#26)
Fixes a few CMakeLists.txt errors.
Strips slashes from sensor data frames in case the data is provided
using tf instead of tf2.
2016-08-24 16:24:32 +02:00
Rohan Agrawal 428cd6f62d Adds basic odometry integration (#20)
Adds an 'expect_odometry_data' option to the configuration. When enabled,
listens to the '/odom' topic, which must provide odometry that is taken
into account for SLAM.

Also renames the 'provide_odom' option to 'provide_odom_frame'.
2016-08-24 11:47:09 +02:00
Wolfgang Hess c5ac8e70b5 Configure the Cartographer node without rosparam. (#21)
Configuration of Cartographer's ROS integration is now
entirely handled by Lua. The path and basename of the
configuration are given by command line flags.
The node is listening to default topic names which are
expected to be remapped as needed.
2016-08-12 17:14:08 +02:00
Wolfgang Hess 935a4f24ee Fix typos. (#22) 2016-08-12 17:11:33 +02:00
Wolfgang Hess ede110e71b Add launch files for running demos. (#23)
This adds two launch files for running 2D and 3D demos.
A bag filename is expected as an argument and is played
back using simulation time while showing the result in a
preconfigured RViz window.
2016-08-12 17:11:16 +02:00
Wolfgang Hess df1b66935b Drop the leading slash in turtlebot.urdf frame_ids. (#19)
In tf2, frame_ids should not start with a slash:
http://wiki.ros.org/tf2/Migration
2016-08-10 16:13:38 +02:00
Wolfgang Hess 5439e9ba36 Fix the submap transformation in the RViz plugin. (#13)
Removes the SceneManagerListener and instead computes the transform
when a new submap list is received. The second part of the transform
is also updated when a new texture is received.

Also simplifies the drawing code a bit by using a triangle strip.
2016-08-10 12:31:19 +02:00
Wolfgang Hess cb9220ec32 Rename to local/global map frame. (#16)
Changes the confusingly named GetOdometryToMapTransform() function
to GetLocalToGlobalTransform(), since it is transforming from the
local SLAM map frame to the global SLAM map frame.
2016-08-10 12:17:13 +02:00
Wolfgang Hess d8a4c07464 Simplify the Rviz submap texture update logic. (#12) 2016-08-05 14:23:30 +02:00
Wolfgang Hess d2b583ddf7 Fix support for 2D SLAM without IMU. (#11)
Do not subscribe to the IMU topic and expect IMU data
if expect_imu_data is set to false in the Lua configuration.
2016-08-05 12:21:41 +02:00
Wolfgang Hess e88742b3cb Cleanup of the RViz submaps plugin. (#10)
Uses a more concise name to show in RViz.
Moves updating the z fading out of the SceneManagerListener.
(to be removed in a future PR)
Simplifies SubmapsDisplay::processMessage() and
DrawableSubmap::Transform().
2016-08-05 11:50:22 +02:00
Wolfgang Hess 916b4fbac3 Fixes bug not displaying all submaps in RViz. (#9)
The 'version_' member of a DrawableSubmap is now properly initialized.
The redundant 'submap_id' in the SubmapQuery response is removed.
The missing slot for reset() is added.
2016-08-04 17:59:03 +02:00
Wolfgang Hess abd503d6f8 Publish correct transforms from SLAM. (#7) 2016-08-04 16:48:08 +02:00
Wolfgang Hess 7ead7400d4 Change the RViz plugin to use MessageFilterDisplay. (#6) 2016-08-04 15:58:41 +02:00
Wolfgang Hess 5497e9c343 Fix draw ordering issue of the RViz visualization. (#5)
Instead of drawing into a offscreen texture and blitting the
result as an overlay (which shows up on top of everything else)
we directly draw to the RViz scene. To get proper X-rays one
should use a 0.5 gray background for now.

Also fixes the configuration to enable 3D mapping from a bag.
2016-08-04 14:38:55 +02:00
Wolfgang Hess b89d9a51a5 Rename and cleanup. (#4)
Merges 3d_mapping.lua into backpack_3d.lua. Renames launch files to be
consistent. Fixes a typo.
2016-08-04 10:04:53 +02:00
Wolfgang Hess 558768f4e3 Fixes pose publishing to include/exclude odom frame. (#3)
Changes the pose publishing to always publish the odom to map transform.
Either expects or provides (configurable) the odom to tracking transform.
Also cleans up the RViz plugin code a bit.
2016-08-03 16:56:20 +02:00
Damon Kohler 3e179972da Changes build instructions to use Catkin. (#2)
Uses eth-asl repos for Ceres.
Adds missing package dependency.
2016-08-03 16:31:24 +02:00
Wolfgang Hess 961afb6817 Add code to allow offline processing of 2D Cartographer bags. (#1)
* Add code to allow offline processing of 2D Cartographer bags.

Fixes waiting for transforms to be published, adds support for multi-echo
laser scans, sets default values for the submap topic and query for the
RViz plugin.
2016-08-03 14:54:45 +02:00
Damon Kohler aabd51e029 Renames google_cartographer* to cartographer_ros*. 2016-08-03 12:57:56 +02:00