chicagoedt / revo_robot

Code for EDT's IGVC entry, Revo.
http://www.igvc.org/
20 stars 23 forks source link

convert bagged camera_raw data to compressed format for viewing and line_detection performance #21

Closed bsubei closed 9 years ago

bsubei commented 9 years ago

bagging image_raw results in:

  1. choppy framerate and missed frames in the bag.
  2. humongous file rosbag file sizes (>10GB)
  3. a ridiculously large amount of data for line_detector to handle
bsubei commented 9 years ago

turns out the camera drivers publish a compressed image message we can subscribe to. Initial testing reveals rosbag file size was decreased by a factor of >10 !!!

bsubei commented 9 years ago

this is how to display a compressed image message named /camera/iamge_raw/compressed: rosrun image_view image_view image:=/camera/image_raw _image_transport:=compressed

You have to change the _image_transport parameter to compressed...

bsubei commented 9 years ago

updated camera_setup wiki page to include this

bsubei commented 9 years ago

turns out using a compressed image means some changes need to be made in line_detector. Even after changing the message type to CompressedImage, the function that converts from a ROS image type to openCV image type imgmsg_to_cv2 in cv_bridge is complaining about the image not having an encoding attribute... Need to look into how to use cv_bridge with compressed images

bsubei commented 9 years ago

this looks promising

it doesn't use cv_bridge at all

bsubei commented 9 years ago

after reading image_transport docs, I need to go over the compressed_image_transport docs

bsubei commented 9 years ago

from now on, we should bag only compressed images. There's no need to bother with stupid raw format

bsubei commented 9 years ago

all that's left is to convert all the raw_image rosbags into compressed format. This can be done by running the bags, running the image_transport republish node (to convert to compressed), and then rosbag record those compressed images

bsubei commented 9 years ago

this was done already and is on my local SSD, as well as a flash drive. We need to find a permanent place for these. Something like a rosbag drive