Skip to content
Snippets Groups Projects
Unverified Commit 23491376 authored by braught2's avatar braught2 Committed by GitHub
Browse files

Add files via upload

parent 96814b8a
No related branches found
No related tags found
No related merge requests found
{
"unsafeSet": "",
"initialSet": [
[
0,
-0.2,
0
],
[
0,
0.2,
0
]
],
"timeHorizon": 10,
"directory": "examples/curve_controller_hybrid",
"initialVertex": 0,
"deterministic": true,
"variables": [
"vx",
"vy",
"dist"
],
"vertex": [
"0",
"1",
"2"
],
"edge": [
[
"0",
"0"
],
[
"1",
"0"
],
[
"2",
"0"
],
[
"0",
"1"
],
[
"1",
"1"
],
[
"2",
"1"
],
[
"0",
"2"
],
[
"1",
"2"
],
[
"2",
"2"
]
],
"guards": [
"And(dist < 10,And((dist > 2),And(dist < 2,state != move_over)))",
"And(dist < 10,And((dist > 2),And(dist < 2,state != move_over)))",
"And(dist < 10,And((dist > 2),And(dist < 2,state != move_over)))",
"dist < 10",
"dist < 10",
"dist < 10",
"And(dist < 10,state == move_over)",
"And(dist < 10,state == move_over)",
"And(dist < 10,state == move_over)"
],
"resets": [
"vy=vy - 5;vx= vx + 5;{",
"vy=vy - 5;vx= vx + 5;{",
"vy=vy - 5;vx= vx + 5;{",
"vx=vx - 5;{",
"vx=vx - 5;{",
"vx=vx - 5;{",
"vx = vx + 5",
"vx = vx + 5",
"vx = vx + 5"
]
}
\ No newline at end of file
enum modes {Normal,Sat_low,Sat_high};
struct State {
double tau;
double yf;
double thetaf;
enum modes mode;
};
struct State P(struct State s) {
double tau = s.tau;
double yf = s.yf;
double thetaf = s.theta;
enum modes state = s.mode;
if (s.mode==Normal) {
if (-0.155914*yf-thetaf <= -0.60871) {
state=Sat_low;
}
if (-0.155914*yf-thetaf >= 0.60871) {
state=Sat_high;
}
}
if (s.mode ==Sat_low) {
if (-0.155914*yf-thetaf >= -0.60871) {
state=Normal;
}
}
if (s.mode == Sat_high) {
if (-0.155914*yf-thetaf <= 0.60871) {
state=Normal;
}
}
}
s.mode = state;
return s;
}
{
"unsafeSet": "",
"initialSet": [[0,-0.2,0, "Normal"],[0,0.2,0, "Normal"]],
"timeHorizon": 10,
"directory": "examples/curve_controller_hybrid",
"initialVertex":0,
"deterministic":true
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment