Skip to content
/ pfvtr Public

Multidimensional Particle Filtering for Visual Teach and Repeat

Notifications You must be signed in to change notification settings

Zdeeno/pfvtr

Repository files navigation

Particle-filtered Visual Teach and Repeat Navigation

Overview

This ROS package allows a robot to be taught a path through an environment using a monocular uncalibrated camera.
PFVTR exploits the foundations of Bearnav.
The whole method is described in paper.
The neural network used by the PFVTR is described here.

Diagram

First start

Once built, to run the system use roslaunch pfvtr jackal.launch.
Inside the launch file, set required variables at the top of the file, pointing to topics which are required by the framework (odometry, camera, controller, cmd_vel).

Usage

We recommend using tmux and we prepared a tmux launch script start_session.sh for you which sources the package in multiple windows.
Our package requires input images of width 512 so there is a window resize in the tmux which uses standart resizing ROS node. You just need to run it with parameters based on your camera resolution.
The first window is made for the main launch file. The second and third windows are for mapping and repeating.

Once the package is running, you can begin mapping by publishing a message to the mapmaker module:
rostopic pub /pfvtr/mapmaker/goal [tab][tab]
There are multiple parameters in the action command:

  • sourceMap - this is for continual mapping you can leave it empty
  • mapStep - distance between map images, if you keep 0.0 it is automatically set to 1.0m
  • start - set to True to start mapping, when your mapping is finished you have to publish this action again with start = false to save the map
  • mapName - name of the map under which it is saved into home/.ros folder
  • SaveImgsForViz - by default the framework saves only the image representations in latent space, if you want to save also jpg images set this to true

To replay a map, run:
rostopic pub /pfvtr/repeater/goal [tab][tab]
This action has also multiple parameters:

  • startPos - how far in the map you want to start repeating - usually keep 0.0 beacause you want to repeat from start
  • endPos - currently not working keep as is
  • traversals - currently not working keep as is
  • nullCmd - set to true if you want to skip recorded commands with zero velocity
  • imagePub - lookaround window sets how many images are used for visual feedback, we use 1 (3 images) or 2 (5 images)
  • mapName - name of the map you want to repeat (you can fill in multiple maps of the SAME trajectory divided by "," - see continous mapping in the article)

You can use the visualisation script src/gui/particle_viz.py, which publishes images showing position of the particles.

Important

  • We use time synchronization for odometry and camera topics! You won't be able to record a map if your topics have a very different timestamp.
  • The robot is repeating the action commands from mapping phase so at the initial position there is command with 0 velocity, you have to push the robot little bit to start repeating. You also should not stop completelly during mapping because of this. You cant set nullCmd to true if you want to avoid this behaviour.
  • Keep in mind that this is not production code it can yield some errors eventhough it is working properly. We also suggest to relaunch the code between the traversals.

About

Multidimensional Particle Filtering for Visual Teach and Repeat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published