Difference between revisions of "ROS Hood Teleop Script"
From wikidb
(→References) |
(→Notes) |
||
Line 30: | Line 30: | ||
== Notes == | == Notes == | ||
− | * " | + | * "motor_control_hc" is too long for a pgrep pattern. Didn't see that coming. |
* A kill -9 (SIGKILL) will not dump output buffers. SIGINT (interrupt form keyboard) will. | * A kill -9 (SIGKILL) will not dump output buffers. SIGINT (interrupt form keyboard) will. | ||
Revision as of 17:33, 29 December 2015
Script
#!/bin/bash DATE=$(date '+%Y%m%dT%H%M') LOGDIR=~/log case "$1" in start) echo START roscore > $LOGDIR/roscore$DATE.log & sleep 5 pgrep -a roscore rosrun phidgets motor_control_hc > $LOGDIR/motors$DATE.log & sleep 5 pgrep -a motor_control ;; stop) echo STOP killall -SIGINT motor_control_hc killall -SIGINT roscore killall -SIGINT rosmaster ;; esac echo DONE
Notes
- "motor_control_hc" is too long for a pgrep pattern. Didn't see that coming.
- A kill -9 (SIGKILL) will not dump output buffers. SIGINT (interrupt form keyboard) will.