Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
5f65df69
Commit
5f65df69
authored
8 years ago
by
bbartels
Browse files
Options
Downloads
Patches
Plain Diff
groundStation: Add script for batch setting of PID constants
parent
97c96676
No related branches found
No related tags found
1 merge request
!4
Batch setpid
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
groundStation/scripts/parameters.txt
+27
-0
27 additions, 0 deletions
groundStation/scripts/parameters.txt
groundStation/scripts/setpid_batch.sh
+17
-0
17 additions, 0 deletions
groundStation/scripts/setpid_batch.sh
with
44 additions
and
0 deletions
groundStation/scripts/parameters.txt
0 → 100644
+
27
−
0
View file @
5f65df69
lat p 1.0
lat i 1.0
lat d 1.0
long p 1.0
long i 1.0
long d 1.0
height p 1.0
height i 1.0
height d 1.0
pitch p 1.0
pitch i 1.0
pitch d 1.0
roll p 1.0
roll i 1.0
roll d 1.0
yaw p 1.0
yaw i 1.0
yaw d 1.0
pitchv p 1.0
pitchv i 1.0
pitchv d 1.0
rollv p 1.0
rollv i 1.0
rollv d 1.0
yawv p 1.0
yawv i 1.0
yawv d 1.0
This diff is collapsed.
Click to expand it.
groundStation/scripts/setpid_batch.sh
0 → 100644
+
17
−
0
View file @
5f65df69
#!/bin/bash
# Use default filename if it wasn't given at the command line
if
[
$#
-eq
0
]
;
then
filename
=
"parameters.txt"
else
filename
=
$1
fi
# Define the regular expression used for grep to define accepted line
regex
=
'(lat|long|height|pitch|roll|yaw|pitchv|rollv|yawv) (p|i|d) ([-+]?[0-9]*\.?[0-9]+)'
# the awk program to assemble the correct pieces of the string for a ./Cli call
awk_prog
=
'{print "./Cli setpid" " " "--" $1 " " "-" $2 " " $3}'
# Search, parse, and execute ./Cli commands
grep
-E
"
$regex
"
$filename
|
awk
"
$awk_prog
"
| bash
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment