velodyne icon indicating copy to clipboard operation
velodyne copied to clipboard

Run Vdump from bash script no password and have it close after preset amount of time

Open Rotoslider opened this issue 3 years ago • 1 comments

I would like a way to capture 1 pcap file from my velodyne vlp-16 after running for 6 minutes. Currently I have a desktop icon that I double click. rosrun velodyne_driver vdump pcap- eth0 It prompts for a password. I would like to not have to type the password since its a portable rig and not easy to type on. I also need to hit Control C to close. I would like it to shut down and close the terminal after 6 minutes with no interaction. Is there a way to do this? Last item is to be able to append the time stamp into the filename.

thanks in advance

Rotoslider avatar Mar 05 '21 21:03 Rotoslider

I figured out how to add the date to the base name. And how to make it run for x number of seconds. If you add date +%y_%m_%d_%H_%M after the base name it will put a time stamp in the filename. I took out seconds since I did not need them. Adding -G 360 to the script in vdump will make it run for 360 seconds. But if -C is small it will still split files to the size of the value in -C I have not found a good way to run without sudo I can shutdown the terminal after a set time with pkill. If I kill it too quick it messes up the file save. I'm sure there is a better way but not sure yet. Also i I wait a while it seems like the value of the filesize changes like its still recording to the file. I know -G is a loop record time but if I set -W to 1 I would think it would stop but I guess its still looping.

Rotoslider avatar Mar 08 '21 00:03 Rotoslider