forked from udacity/self-driving-car
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added launch files for new ROS bag recording method
- Loading branch information
1 parent
064c9bf
commit adf1bb6
Showing
11 changed files
with
539 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(udacity_launch) | ||
|
||
## Find catkin macros and libraries | ||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) | ||
## is used, also find other catkin packages | ||
find_package(catkin REQUIRED) | ||
catkin_package() | ||
|
||
|
||
############# | ||
## Install ## | ||
############# | ||
|
||
# all install targets should use catkin DESTINATION variables | ||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html | ||
|
||
## Mark executable scripts (Python etc.) for installation | ||
## in contrast to setup.py, you can choose the destination | ||
# install(PROGRAMS | ||
# scripts/my_python_script | ||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
|
||
## Mark executables and/or libraries for installation | ||
# install(TARGETS auro_resources auro_resources_node | ||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
|
||
## Mark cpp header files for installation | ||
# install(DIRECTORY include/${PROJECT_NAME}/ | ||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
# FILES_MATCHING PATTERN "*.h" | ||
# PATTERN ".svn" EXCLUDE | ||
# ) | ||
|
||
## Mark other files for installation (e.g. launch and bag files, etc.) | ||
# install(FILES | ||
# # myfile1 | ||
# # myfile2 | ||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
# ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
Dataset download | ||
================ | ||
Downlaod either the content of folders as needed or to donwload the | ||
whole folder you can directly download the compressed file | ||
|
||
Example: Contents of udacity-dataset-2-1 or udacity-dataset-2-1.tar.bz2 | ||
|
||
To utilize compressed image topics | ||
================================= | ||
You need the install the dependecy | ||
$sudo apt-get install ros-indigo-image-transport* | ||
|
||
To play back data | ||
================= | ||
copy the udacity_launch packagae to you catkin workspace, | ||
compile and source so that it is reachable. | ||
|
||
cd udacity-dataset-2-1 | ||
rosbag play --clock *.bag | ||
roslaunch udacity_launch bag_play.launch | ||
#For visulization | ||
roslaunch udacity_launch rviz.launch | ||
|
||
To log data in sperate bagfiles and compressed image | ||
==================================================== | ||
roslaunch udacity_launch logging.launch bagPath:="/media/Data/UdacitySDC/udacity-datasetN" | ||
|
||
|
||
|
||
To convert existing log to sperate bagfiles and compressed image | ||
================================================================ | ||
rosbag play --clock old_single_huge_bagfile.bag | ||
roslaunch udacity_launch logging.launch republish_raw2compressed_images:=true bagPath:="/media/Data/UdacitySDC/udacity-datasetN" | ||
|
||
|
||
Compressed bagfiles | ||
================================================================ | ||
Each of the bagfiles are already compressed, so there is no benefit | ||
of compressing the folders to compressed file other than having a single file | ||
for the whole folder. | ||
The bagfiles decompress on the fly and may cause slower performance and you | ||
may want to decompress them before you run, size would increase by around 10% only. | ||
|
||
$rosbag decompress *.bag | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Author: Jit Ray Chowdhury ([email protected]) | ||
Last Update: 10-9-2019 | ||
Description: Launch logging of all usefull topics organized in speprarate bag files (logging.launch) | ||
--> | ||
<launch> | ||
<param name="use_sim_time" value="true"/> | ||
|
||
|
||
<include file="$(find scu_launch)/config/global_parameters.xml" /> | ||
<arg name="velodyne_packet2pointcloud" default="false" /> | ||
<arg name="velodyne_packets2pointcloud" default="false" /> | ||
<arg name="camera_compressed_to_full" default="true" /> | ||
<arg name="ackermann_cmd_from_trajectory_follow" default="true" /> | ||
|
||
<!-- velodyne_packet2pointcloud --> | ||
<node pkg="velodyne_decoder" type="velodyne_decoder_node" name="velodyne_decoder" if="$(arg velodyne_packet2pointcloud)" > | ||
<remap from="velodyne_point_cloud" to="velodyne_points" /> | ||
<param name="min_range" value="0.3"/> | ||
<param name="max_range" value="150"/> | ||
<param name="frequency" value="20"/> | ||
<param name="publish_point_cloud" value="true"/> | ||
</node> | ||
<!-- velodyne_packets2pointcloud --> | ||
<node pkg="velodyne_pointcloud" type="cloud_node" name="velodyne_pointcloud" if="$(arg velodyne_packets2pointcloud)" > | ||
<param name="min_range" value="0.3"/> | ||
<param name="max_range" value="150"/> | ||
<param name="calibration" value="$(find velodyne_pointcloud)/params/VLP16db.yaml"/> | ||
</node> | ||
<!-- camera_compressed_to_full --> | ||
<node pkg="image_transport" type="republish" name="republish_center_camera" | ||
args="compressed in:=/center_camera/image_color raw out:=/center_camera/image_color" if="$(arg camera_compressed_to_full)"/> | ||
<node pkg="image_transport" type="republish" name="republish_right_camera" | ||
args="compressed in:=/right_camera/image_color raw out:=/right_camera/image_color" if="$(arg camera_compressed_to_full)"/> | ||
<node pkg="image_transport" type="republish" name="republish_left_camera" | ||
args="compressed in:=/left_camera/image_color raw out:=/left_camera/image_color" if="$(arg camera_compressed_to_full)"/> | ||
|
||
|
||
|
||
|
||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Author: Jit Ray Chowdhury ([email protected]) | ||
Last Update: 10-9-2019 | ||
Description: Launch logging of all usefull topics organized in speprarate bag files (logging.launch) | ||
--> | ||
<launch> | ||
<!-- Destination bag file path and its folder structure --> | ||
<arg name="bagPath" default="/media/Data/UdacitySDC/udacity-dataset1" /> | ||
<arg name="bagIdentifier" default="udacity-dataset" /> | ||
|
||
<!-- 'dataType' specifies which type of data we want to collect --> <!-- 1 to record else 0 --> | ||
<!--Sensors--> | ||
|
||
<arg name="record_velodyne_pointcloud" default="0" /> | ||
<arg name="record_velodyne_packet" default="1" /> | ||
<arg name="record_camera_images" default="1" /> | ||
<arg name="record_vehicle" default="1" /> | ||
<arg name="record_can_interface" default="1" /> | ||
<arg name="record_tf" default="1" /> | ||
<arg name="record_diagnostics" default="1" /> | ||
|
||
<arg name="republish_raw2compressed_images" default="0" /> | ||
|
||
|
||
|
||
|
||
<!-- RECORDING NODES --> | ||
|
||
<!--Sensors--> | ||
|
||
<!-- Records velodyne PointCloud --> | ||
<group if="$(arg record_velodyne_pointcloud)"> | ||
<node name="record_velodyne_pointcloud" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_sensor_velodyne_pointcloud | ||
/velodyne_points | ||
/velodyne_point_cloud" | ||
output="screen"/> | ||
</group> | ||
<!-- Records velodyne Packets --> | ||
<group if="$(arg record_velodyne_packet)"> | ||
<node name="record_velodyne_packet" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_sensor_velodyne_packet | ||
/velodyne_packets | ||
/velodyne_packet" | ||
output="screen"/> | ||
</group> | ||
|
||
<!-- Records the camera images --> | ||
<group if="$(arg record_camera_images)"> | ||
<!-- compress images --> | ||
<node pkg="image_transport" type="republish" name="republish_center_camera" | ||
args="raw in:=/center_camera/image_color compressed out:=/center_camera/image_color" if="$(arg republish_raw2compressed_images)" /> | ||
<node pkg="image_transport" type="republish" name="republish_right_camera" | ||
args="raw in:=/right_camera/image_color compressed out:=/right_camera/image_color" if="$(arg republish_raw2compressed_images)" /> | ||
<node pkg="image_transport" type="republish" name="republish_left_camera" | ||
args="raw in:=/left_camera/image_color compressed out:=/left_camera/image_color" if="$(arg republish_raw2compressed_images)" /> | ||
|
||
<node name="record_camera_center" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_sensor_camera_center | ||
/center_camera/image_color/compressed | ||
/center_camera/image_color/camera_info | ||
" | ||
output="screen"/> | ||
<node name="record_camera_left" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_sensor_camera_left | ||
/left_camera/image_color/compressed | ||
/left_camera/image_color/camera_info | ||
" | ||
output="screen"/> | ||
<node name="record_camera_right" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_sensor_camera_right | ||
/right_camera/image_color/compressed | ||
/right_camera/image_color/camera_info | ||
" | ||
output="screen"/> | ||
</group> | ||
|
||
<!--IO--> | ||
<!-- Records vehicle msgs --> | ||
<group if="$(arg record_vehicle)"> | ||
<node name="record_vehicle" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_io_vehicle | ||
/vehicle/brake_info_report | ||
/vehicle/brake_report | ||
/vehicle/dbw_enabled | ||
/vehicle/filtered_accel | ||
/vehicle/fuel_level_report | ||
/vehicle/gear_report | ||
/vehicle/gps/fix | ||
/vehicle/gps/time | ||
/vehicle/gps/vel | ||
/vehicle/imu/data_raw | ||
/vehicle/joint_states | ||
/vehicle/misc_1_report | ||
/vehicle/sonar_cloud | ||
/vehicle/steering_report | ||
/vehicle/surround_report | ||
/vehicle/suspension_report | ||
/vehicle/throttle_info_report | ||
/vehicle/throttle_report | ||
/vehicle/tire_pressure_report | ||
/vehicle/twist_controller/parameter_descriptions | ||
/vehicle/twist_controller/parameter_updates | ||
/vehicle/wheel_speed_report | ||
" | ||
output="screen"/> | ||
</group> | ||
|
||
<!-- Records can interface --> | ||
<group if="$(arg record_can_interface)"> | ||
<node name="record_can_interface" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_io_can_interface | ||
/can_bus_dbw/can_rx | ||
" | ||
output="screen"/> | ||
</group> | ||
|
||
|
||
|
||
|
||
<!--Diagnostics and tf--> | ||
<!-- Records the transforms --> | ||
<group if="$(arg record_tf)"> | ||
<node name="record_tf" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_tf | ||
/tf | ||
/tf_static | ||
" | ||
output="screen"/> | ||
</group> | ||
|
||
<group if="$(arg record_diagnostics)"> | ||
<node name="record_diagnostics" pkg="rosbag" type="record" args=" | ||
--split | ||
--size=3999 | ||
-o $(arg bagPath)/$(arg bagIdentifier)_diagnostics | ||
/diagnostics | ||
/diagnostics_agg | ||
/diagnostics_toplevel_state" | ||
output="screen"/> | ||
</group> | ||
</launch> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Author: Jit Ray Chowdhury ([email protected]) | ||
Last Update: 10-9-2019 | ||
Description: Launch logging of all usefull topics organized in speprarate bag files (logging.launch) | ||
--> | ||
<launch> | ||
<!-- may need sudo apt-get install ros-indigo-image-transport* | ||
check with rosrun image_transport list_transports | ||
https://coderwall.com/p/qewf6g/how-to-extract-images-from-a-rosbag-file-and-convert-them-to-video | ||
--> | ||
<!-- | ||
<node pkg="image_transport" type="republish" name="republish" | ||
args="compressed in:=/sensors/camera/image_rect_color out:=/sensors/camera/image_rect_color_bag" /> | ||
--> | ||
|
||
<node pkg="image_view" type="video_recorder" name="video_recorder" output="screen" > | ||
<param name="stamped_filename" value="false" /> | ||
<param name="fps" value="30" /> | ||
<param name="codec" value="I420" /> | ||
<!-- | ||
<param name="encoding" value="bgr8" /> | ||
--> | ||
<remap from="image" to="/sensors/camera/image_rect_color"/> | ||
<param name="image_transport" type="string" value="compressed"/> | ||
</node> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Author: Jit Ray Chowdhury ([email protected]) | ||
Last Update: 10-9-2019 | ||
Description: Launch logging of all usefull topics organized in speprarate bag files (logging.launch) | ||
--> | ||
<launch> | ||
|
||
<!-- rviz --> | ||
<arg name="rviz" default="true" /> | ||
<arg name="rviz_file" default="$(find udacity_launch)/rviz/disp.rviz" /> | ||
<node pkg="rviz" type="rviz" name="$(anon rviz)" args="-d $(arg rviz_file)" output="screen" if="$(arg rviz)"/> | ||
|
||
</launch> |
Oops, something went wrong.