-
Notifications
You must be signed in to change notification settings - Fork 32
Generating Your Own Dataset
Chahat Deep Singh edited this page May 15, 2020
·
4 revisions
Note: This simulator setup is derived from the University of Zurich group. Source: RPG Davis Simulator
Tested to ROS-Kinetic
and ROS-Melodic
.
PATH_to_ROS_WS=~/prg_ws
cd $PATH_to_ROS_WS/src
git clone https://github.com/prgumd/EVDodgeNet
cp -r EVDodgeNet/simulator/* $PATH_to_ROS_WS/src
cd $PATH_to_ROS_WS/src
git clone https://github.com/catkin/catkin_simple
Install OpenEXR (Source)
sudo apt install libopenexr-dev
cd $PATH_to_ROS_WS/src
wget http://excamera.com/files/OpenEXR-1.2.0.tar.gz -O - | tar -xz
cd OpenEXR-1.2.0
sudo python setup.py install
cd $PATH_to_ROS_WS/src
sudo apt-get install blender
(Works with Blender 2.71
to 2.79
only)
sudo apt install python3-dev python3-numpy python3-yaml
If you want to manually change the path for numpy
and yaml
, please change it in scripts/prepare_dataset.py
.
catkin build dvs_simulator_py
echo $PATH_to_ROS_WS/devel/setup.bash >> ~/.bashrc
source ~/.bashrc
echo $PATH_to_ROS_WS/devel/setup.zsh >> ~/.zshrc
source ~/.zshrc
Enter the blender file name (not the entire path) to the launch files
Note: The blender file MUST be present in the $PATH_to_ROS_WS/src/rpg_davis_simulator/datasets/scenes/
folder.
- Edit line
7
and8
:
vim $PATH_to_ROS_WS/src/rpg_davis_simulator/launch/PRG_render.launch
- Edit line
6
:
vim $PATH_to_ROS_WS/src/rpg_davis_simulator/launch/PRG_simulate.launch
roslaunch dvs_simulator_py PRGFlow_render.launch
roslaunch dvs_simulator_py PRGFlow_simulate.launch
rosnode kill -a
cd ~/prg-sim_ws/rpg_davis_simulator/datasets/rosbags
Check $PATH_to_ROS_WS/src/rpg_davis_simulator/datasets/rosbags/
folder
BAG_FILE='<Bag_File_Name_in rosbags folder>' #Excluding '.bag'
mkdir -p $BAG_File\/frames
python ../../scripts/bag_to_images.py --output_dir=$BAG_FILE/frames --image_topic=/dvs/image_raw --bag_file=$BAG_FILE\.bag
rostopic echo -b $BAG_FILE\.bag -p /dvs/pose >> $BAG_FILE\/$BAG_FILE\_pose.csv
-
/dvs/events
: event stream -
/dvs/camera_info
: camera calibration -
/dvs/pose
: groundtruth transformationT_w_cam
(transforms points from camera frame to world frame) -
/dvs/image_raw
: intensity image (grayscale, 8bits) -
/dvs/depth_map
: depth map (32bits floating-point)