GithubHelp home page GithubHelp logo

khronos's Introduction

Khronos

Khronos

Khronos is a unified approach that can reason about short-term dynamics and long-term changes when performing online metric-semantic simultaneous mapping and localization (SLAM) in dynamic environments. A few instances from Khronos’ spatio-temporal map, representing the scene state at all times, are shown above. Short-term dynamics (left) are shown in magenta and compared against observed human actions over the corresponding time interval. Both humans and inanimate objects (the cart) are detected. Long-term changes (right) are shown for three time instances of the same scene. The earliest instance is at time 0:20 (top right). While the robot is moving through the hallways, a chair is removed and a red cooler is placed on top of the table; these changes are detected as the robot revisits and closes the loop at time 1:52 (bottom right). Lastly, the cooler is removed again, which is detected by the robot at time 3:35.

This project was supported by Amazon, the ARL DCIST program, the ONR RAPID program, and the Swiss National Science Foundation (SNSF) grant No. 214489.

Table of Contents

Credits

Setup

Examples

Contributing

Paper

If you use this code in your work, please cite the following paper:

Lukas Schmid, Marcus Abate, Yun Chang, and Luca Carlone, "Khronos: A Unified Approach for Spatio-Temporal Metric-Semantic SLAM in Dynamic Environments", in Robotics: Science and Systems, 2024. [ ArXiv | Video ]

@inproceedings{Schmid2024Khronos,
title={Khronos: A Unified Approach for Spatio-Temporal Metric-Semantic SLAM in Dynamic Environments},
author={Lukas Schmid and Marcus Abate and Yun Chang and Luca Carlone},
year={2024},
booktitle = "Proc. of Robotics: Science and Systems",
}

Video

An overview of Khronos is available on YouTube:

Khronos Youtube Video

Setup

Installation

Setup a catkin workspace:

sudo apt install python3-catkin-tools python3-vcstool python3-tk
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
catkin config --extend /opt/ros/$ROS_DISTRO
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGTSAM_TANGENT_PREINTEGRATION=OFF -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF -DOPENGV_BUILD_WITH_MARCH_NATIVE=OFF
catkin config --merge-devel

Install system dependencies:

sudo apt install ros-$ROS_DISTRO-gtsam libgoogle-glog-dev nlohmann-json3-dev

Get Khronos and all source dependencies:

cd ~/catkin_ws/src
git clone [email protected]:MIT-SPARK/Khronos.git khronos
# Use `https.rosinstall` if you do not have ssh key setup with github.com.
vcs import . < khronos/install/ssh.rosinstall

Build:

catkin build khronos_ros

Download datasets

Download the simulated datsets used in our paper here.

The khronos_office.bag dataset is the longer of the two and contains the most changes and dynamic objects.

Optionally, run rosbag decompress khronos_office.bag to unpack the rosbag for faster runtime.

Examples

Run Khronos

Open uhumans2_khronos.launch and modify the bag path to the tesse_cd office rosbag.

Run the following in commandline:

source ~/catkin_ws/devel/setup.bash
roslaunch khronos_ros uhumans2_khronos.launch

RVIZ will launch automatically for real-time visualization. You should see the method build an incremental background mesh, detect and segment static and dynamic objects, and generate object nodes. The following image shows the human motion detection (left red), a segmented static chair object and associated scene-graph node (right blue), and a segmented dynamic object and associated node (center yellow):

Khronos Beginning

Use the right side panel of rviz to toggle different visualization options to see each component of the method, including inpus, object/motion detection, factor graph, scene graph, and backend visuals. Most of these are disabled by default.

At the end of rosbag playback, Khronos will have a fully completed scene reconstruction with objects, dynamics, and changes:

Khronos End

After the rosbag has completed playback and the method is finished, call the following rosservice to guarantee that output is saved before termination:

rosservice call /khronos_node/experiment/finish_mapping_and_save

You can now terminate Khronos.

To run Khronos with the apartment dataset, change the dataset from tesse_cd_office to tesse_cd_apartment and change the rosbag path accordingly. You can then run the launch file as before.

Visualize 4D map

To visualize the spatio-temporal map of the scene after running Khronos, run the following in commandline:

roslaunch khronos_ros 4d_visualizer.launch

The visualizer will load the map located (by default) in output/tmp. If you save the map elsewhere, be sure to modify the path in 4d_visualizer.launch.

Khronos 4D Map

You can play forward or backward, and see Khronos' estimate of the state of the scene at each timestamp, with current or future knowledge. As an example, fix the query time to 0 and play forward on robot time mode to see how Khronos' understanding of the initial state of the scene evolves over time.

Contributing

This is an open-source project and pull requests for features and fixes are very welcome! We follow the Feature-Branch-Workflow and the google C++ style guide. To adhere to this, please setup the auto formatter and linter for khronos as follows:

roscd khronos
pip install pre-commit
pre-commit install

khronos's People

Contributors

marcusabate avatar schmluk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

khronos's Issues

`develop` branch for some of the dependencies are not public

Thanks for your great work.

When cloning the dependencies:

vcs import . < khronos/install/ssh.rosinstall

It seems that the develop branches for some of the dependencies are not public yet.

Could not checkout ref 'develop': fatal: invalid reference: develop

Gflags error when running [roslaunch khronos_ros uhumans2_khronos.launch]

Hi,
Glad to see your fantastic work. I succeeded to compile the project and wanted to run a demo by running roslaunch khronos_ros uhumans2_khronos.launch and I met these errors.

ERROR: unknown command line flag 'minloglevel'
ERROR: unknown command line flag 'v'
ERROR: unknown command line flag 'alsologtostderr'
ERROR: unknown command line flag 'colorlogtostderr'
ERROR: unknown command line flag 'v'

I found the reason maybe the function google:ParseCommandLineFlags(&argc, &argv, true) can't parse the flags defined in gflags, but I can not fix it. Do you have any ideas? Thanks a lot.

here are more information about my ros enviroment
ubuntu 20.04
ros-noetic
libgoogle-glog-dev=0.4.0-1build1
libgflags-dev=2.2.2-1build1

OpenSet implementation and realtime questions

Hi, thank you for sharing this amazing work! In section VI-C, you mention changing the segmentation input from GT to Openset. I have a question about the Openset labels: are they pre-detected or detected online? If it's the latter, can it operate in real-time? It would be great if you could share the implementation details for this part.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.