Move scripts
This commit is contained in:
25
scripts/convertlogtimestamp.sh
Executable file
25
scripts/convertlogtimestamp.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env sh
|
||||
# Converts ROS2 log data timestamps from stdin to more readable format
|
||||
# Reads lines from stdin, pipe input to this script
|
||||
|
||||
|
||||
while IFS= read -r string; do
|
||||
timestr=`echo $string | egrep -o "\[[0-9]+\.[0-9]+\]"`
|
||||
if [[ ! $timestr ]] then
|
||||
continue
|
||||
fi
|
||||
timestamp=${timestr#"["}
|
||||
timestamp=${timestamp%"]"}
|
||||
sec=`echo $timestamp | cut -d "." -f 1`
|
||||
nano=`echo $timestamp | cut -d "." -f 2`
|
||||
#nanos=$(( $nano / 1000000000 ))
|
||||
#sec=$(( $nanos + $sec ))
|
||||
timestamp=`date -d @"$sec" +"%Y-%m-%d-%H:%M:%S"`
|
||||
#printf 'Got sec:"%s"\n' "$sec"
|
||||
#printf 'Got nano:"%s"\n' "$nano"
|
||||
#printf 'Got timestamp:"%s"\n' "$timestamp"
|
||||
#head=`echo $string | awk -F'$timestr' '{print $1}'`
|
||||
#tail=`echo $string | awk -F'$timestr' '{print $2}'`
|
||||
#printf '%s[%s]%s\n' "$head" "$timestamp" "$tail"
|
||||
echo "${string/"$timestr"/"[${timestamp}.${nano}]"}"
|
||||
done
|
||||
20
scripts/gen-docs.sh
Executable file
20
scripts/gen-docs.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env sh
|
||||
# generates docs
|
||||
|
||||
pushd ..
|
||||
|
||||
pushd src/robot_controller/
|
||||
doxygen
|
||||
popd
|
||||
|
||||
pushd src/lite6_controller/
|
||||
doxygen
|
||||
popd
|
||||
|
||||
pushd src/axidraw_controller/
|
||||
doxygen
|
||||
popd
|
||||
|
||||
make html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user