Gazebo-ROS plugins used by the drive team. Included plugins:
Camera plugin used to generate labeled ground truth for the detection of traffic signs in images. It is intended to be added to .sdf files generated by drive_sim_road_generation. The output format is folder of image files and a .csv file containing the bounding boxes of signs in each of the images. Multiple signs in one image are handled by adding multiple rows for the same image in the .csv.
-
Install Gazebo 8
NOTE TO ROS USERS: Gazebo 7 is usually installed with the ros-distribution-full packages (including kinetic). Use the following commands to remove it and switch to Gazebo 8 (replace kinetic by your distribution) after adding the LCAS package repository to your sources
sudo apt-get remove ros-kinetic-gazebo* sudo apt-get update sudo apt-get install ros-kinetic-gazebo8*
-
Clone drive_sim_road_generation and follow the instructions there to generate a .sdf file that can be used in Gazebo 8.
NOTE: the keyframe_plugin build location has to remain in your GAZEBO_PLUGIN_PATH at all times when generating labels.
-
Run the python script to insert the plugin into the generated .sdf file
python scripts/insert_label_plugin.py your_world_file_location -o your_output_folder
Replace your_world_file_location by the location of the generated world file and your_output_folder by the desired output folder of the plugin.
-
Launch the simulation with:
roslaunch drive_gazebo_plugins sign_label_plugin.launch world:=your_sdf_file_location
replacing your_sdf_file_location with the full path to the edited .sdf file.
NOTE: Currently, the plugin will not start before there is at least one subscriber to the camera topic. Therefore, it is advised to run a roscore in advance and subscribe anything to that topic (a simple listener, rviz or image_view is sufficient)
-
Optional: you can view the generated images by running:
python scripts/draw_bounding_boxes.py your_output_folder/ground_truth.csv
replacing your_output_folder by the previously set output folder of the plugin.