]> defiant.homedns.org Git - ros_wild_thumper.git/blobdiff - scripts/record_pid_run.sh
pid tuning with fixes
[ros_wild_thumper.git] / scripts / record_pid_run.sh
diff --git a/scripts/record_pid_run.sh b/scripts/record_pid_run.sh
new file mode 100755 (executable)
index 0000000..5d4c991
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# go
+rostopic pub -1 cmd_vel geometry_msgs/Twist '[0.3, 0, 0]' '[0, 0, 0]' > /dev/null &
+
+sleep 1
+
+# start record
+rostopic echo /odom/twist/twist/linear/x > /tmp/velocity.txt &
+echoid=$!
+
+# done record
+sleep 15
+kill $echoid
+
+# stop
+rostopic pub -1 cmd_vel geometry_msgs/Twist '[0, 0, 0]' '[0, 0, 0]' > /dev/null &
+
+# print info
+$(rospack find wild_thumper)/scripts/get_velocity.py /tmp/velocity.txt