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.
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).
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 emptymapStep
- distance between map images, if you keep 0.0 it is automatically set to 1.0mstart
- set to True to start mapping, when your mapping is finished you have to publish this action again with start = false to save the mapmapName
- name of the map under which it is saved intohome/.ros
folderSaveImgsForViz
- 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 startendPos
- currently not working keep as istraversals
- currently not working keep as isnullCmd
- set to true if you want to skip recorded commands with zero velocityimagePub
- 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.
- 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.