Coder Social home page Coder Social logo

particle_filter's Introduction

Particle Filter Localization

This code implements the MCL algorithm for the RACECAR.

YouTube Demo

For high efficiency in Python, it uses Numpy arrays and RangeLibc for fast 2D ray casting.

Installation

To run this, you need to ensure that both the map_server ROS package, and the python wrappers for RangeLibc are installed.

For the map server:

sudo apt-get update
rosdep install -r --from-paths src --ignore-src --rosdistro kinetic -y

For RangeLibc:

sudo pip install cython
git clone http://github.com/kctess5/range_libc
cd range_libc/pywrappers
# on VM
./compile.sh
# on car - compiles GPU ray casting methods
./compile_with_cuda.sh

Usage

The majority of parameters you might want to tweak are in the launch/localize.launch file. You may have to modify the "odometry_topic" or "scan_topic" parameters to match your environment.

roslaunch particle_filter localize.launch

Once the particle filter is running, you can visualize the map and other particle filter visualization message in RViz. Use the "2D Pose Estimate" tool from the RViz toolbar to initialize the particle locations.

See launch/localize.launch for docs on available parameters and arguments.

The "range_method" parameter determines which RangeLibc ray casting method to use. The default is cddt because it is fast and has a low initialization time. The fastest option on the CPU is "glt" but it has a slow startup. The fastest version if you have can compile RangeLibc with CUDA enabled is "rmgpu". See this performance comparison chart:

Range Method Performance Comparison

Docs

This code is the staff solution to the lab guide found in the /docs folder. A mathematical derivation of MCL is available in that guide.

There is also documentation on RangeLibc in the /docs folder.

The code itself also contains comments describing purpose of each method.

Cite

This library accompanies the following publication.

@article{walsh17,
    author = {Corey Walsh and 
              Sertac Karaman},
    title  = {CDDT: Fast Approximate 2D Ray Casting for Accelerated Localization},
    volume = {abs/1705.01167},
    url    = {http://arxiv.org/abs/1705.01167},
    year   = {2017}}

particle_filter's People

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

particle_filter's Issues

Rosbag suitable for this project?

Could you please provide a rosbag which can be used for this project? After all, the project is based on ROS. It is convenient for a newbie if there is a rosbag for it. Isn't is the core concept of ROS? So if having a bag, can you share the URL or link? Thank you so much!

Using Particle filter with stereo depth scans

I am trying to use stereo depth cameras and convert the depth images into fake laser scans to the Particle Filter.
the depth image ofcourse is just in the front so the view is quite constrained.
I get a 1280 ranges with step angles of 0.6 degrees for HD720P and 672 for VGA
I believe I should be downsampling by smaller factor to compensate for the constrained view. However if I Try to make the angle step too low in the configuration file (4 to be exact) it spits out a bunch of

error: invalid argument

between iterations messages.
Is this supposed to be happening?
Also, is there a limit to how low we can go with the angle step for downsampling?

Particle filter failed

When I tried running particle_filter.launch, I got this issue
[Particle_filter-7] process has died [pid 19303, exit code -11, cmd /home/nvidia/f110_ws/src/labs/particle_filter/src/particle_filter.py __name:=Particle_filter __log:=/home/nvidia/.ros/log/d6031876-28f7-11e9-addb-00044ba518a5/Particle_filter-7.log].
log file: /home/nvidia/.ros/log/d6031876-28f7-11e9-addb-00044ba518a5/Particle_filter-7*.log
[ WARN] [1549338074.654533721, 1531430588.597950101]: MessageFilter [target=map ]: Dropped 100.00% of messages so far. Please turn the [ros.rviz.message_notifier] rosconsole logger to DEBUG for more information.

Please help me out. Thank you.

Map to base_link?

The code in python gives a TF from Map to Base_link. Shouldn't it be map to odom?

error threw if use my own map

process[map_server-1]: started with pid [18093]
process[Particle_filter-2]: started with pid [18094]
('getting map from service: ', 'static_map')
Traceback (most recent call last):
File "/home/botkit/catkin_ws2/src/botkit/localization/particle_filter/src/particle_filter.py", line 679, in
pf = ParticleFiler()
File "/home/botkit/catkin_ws2/src/botkit/localization/particle_filter/src/particle_filter.py", line 103, in init
self.get_omap()
File "/home/botkit/catkin_ws2/src/botkit/localization/particle_filter/src/particle_filter.py", line 139, in get_omap
oMap = range_libc.PyOMap(map_msg)
File "/RangeLibc.pyx", line 156, in range_libc.PyOMap.cinit (RangeLibc.cpp:3060)
IndexError: index 832 is out of bounds for axis 1 with size 832

Very high CPU usage

Hi, when I run the filter with CPU(i7-8750) only, the node eats almost 100% CPU. Is that normal??

Better than AMCL

This package should replace AMCL, the localization is much better and less complicated code.

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.