I have tried to document everything in the file itself with comments.
config.ini- configuration file for several different scripts... The most important part is thetxtfilename, as the rest has gotten a bit scrambled in the debugging process.event_simulator_2d_plane.py- warp class necessary for the entire project... probably most important fileloss_plot_figs.ipynb- file to view the generated loss plotsloss_plots_h5.py- generates the data needed for the loss plotsring_loss.py- generates the annular loss data (do this after running theloss_plots_h5.pyscript)utils/extract_events_from_rosbag.py- I think I got this from GitHub I can't even remember now but it goes from.bagto.txt
I used this repo setup in Docker. I used docker compose to set up ros then I used a Dockerfile to make it Kinetic ros with this image.
If using real data, skip down to the next section.
Here's the general process I followed to generate the rosbags:
- Generate
mkvfile with blender - Use ffmpeg to make a folder of images from that video
- Run something like the following in that docker container:
ssim
roscd esim_ros
python scripts/generate_stamps_file.py -i /root/evodo/plane_depth_2_pitch_-5_roll_15/imgs_wavy/ -r 1200
rosrun esim_ros esim_node \
--data_source=2 \
--path_to_output_bag=/root/evodo/plane_depth_2_pitch_-5_roll_15/plane_depth_2_pitch_-5_roll_15_wavy.bag \
--path_to_data_folder=/root/evodo/plane_depth_2_pitch_-5_roll_15/imgs_wavy/ \
--ros_publisher_frame_rate=30 \
--exposure_time_ms=10.0 \
--use_log_image=1 \
--log_eps=0.1 \
--contrast_threshold_pos=0.2 \
--contrast_threshold_neg=0.2
- Run
loss_plots_h5.py. This will generate the warped histograms. - Run
ring_loss.py. This will calculate the loss and ring masks. - View results using
loss_plot_figs.ipynb.