Commit 8f6997f0 authored by Jean Meurice's avatar Jean Meurice
Browse files

Readme update

parent 45b8f01d
Pipeline #336476 passed with stage
in 48 seconds
...@@ -9,7 +9,15 @@ To use the different sub-project as maven dependency, add the following to your ...@@ -9,7 +9,15 @@ To use the different sub-project as maven dependency, add the following to your
```xml ```xml
<dependency> <dependency>
<groupId>montisim</groupId> <groupId>montisim</groupId>
<artifactId>sub-project-name</artifactId> <artifactId>*sub-project*</artifactId>
<version>${revision}</version> <version>${revision}</version>
</dependency> </dependency>
``` ```
`*sub-project*` can be any of the following:
- `environment`
- `eesimulator`
- `vehicle`
- `eecomponents`
- `simulator`
{ {
"model": "TODO", "name": "TestVehicle",
"name": "UnnamedCar", "body": {
"properties": { "mass": 1642.0,
"body": { "length": 4.971,
"mass": 1642.0, "width": 1.87,
"length": 4.971, "height": 1.383,
"width": 1.87, "center_of_gravity_height": 0.34575
"height": 1.383, },
"center_of_gravity_height": 0.34575 "wheels": {
}, "diameter": 0.6612,
"wheels": { "width": 0.255,
"diameter": 0.6612, "front_wheel_axis_offset": 1.0,
"width": 0.255, "max_turning_angle": 30.0,
"front_wheel_axis_offset": 1.0, "front_track_width": 1.57988,
"max_turning_angle": 30.0, "back_track_dist": 1.60274,
"front_track_width": 1.57988, "wheelbase": 2.812,
"back_track_dist": 1.60274, "wheelbase_offset": 0.0
"wheelbase": 2.812,
"front_wheels_depth": 1.406,
"back_wheels_depth": 1.406
}
}, },
"powertrain": { "powertrain": {
"type": "electrical", "type": "electrical",
"traction": "rear", "traction": "rear",
"braking": "rear", "braking": "front",
"max_braking_force": 5000.0, "max_braking_force": 5000.0,
"motor": { "motor": {
"motor_efficiency": 0.7, "motor_efficiency": 0.7,
...@@ -50,8 +46,6 @@ ...@@ -50,8 +46,6 @@
"DefaultBus" "DefaultBus"
], ],
"physical_value_name": "steering", "physical_value_name": "steering",
"min": -30.0,
"max": 30.0,
"change_rate": 60.0, "change_rate": 60.0,
"sensor": { "sensor": {
"type": "sensor", "type": "sensor",
...@@ -79,8 +73,6 @@ ...@@ -79,8 +73,6 @@
"DefaultBus" "DefaultBus"
], ],
"physical_value_name": "braking", "physical_value_name": "braking",
"min": 0.0,
"max": 1.0,
"change_rate": 10.0, "change_rate": 10.0,
"sensor": { "sensor": {
"type": "sensor", "type": "sensor",
...@@ -108,8 +100,6 @@ ...@@ -108,8 +100,6 @@
"DefaultBus" "DefaultBus"
], ],
"physical_value_name": "gas", "physical_value_name": "gas",
"min": -0.5,
"max": 1.0,
"change_rate": "Infinity", "change_rate": "Infinity",
"sensor": { "sensor": {
"type": "sensor", "type": "sensor",
...@@ -195,9 +185,6 @@ ...@@ -195,9 +185,6 @@
"type": "constant_bus", "type": "constant_bus",
"name": "DefaultBus", "name": "DefaultBus",
"priority": {}, "priority": {},
"buses": [
"DefaultBus"
],
"mode": "instant", "mode": "instant",
"rate": 0.0 "rate": 0.0
}, },
...@@ -213,5 +200,9 @@ ...@@ -213,5 +200,9 @@
0 0
] ]
} }
],
"start_coords": [
0.0,
0.0
] ]
} }
\ No newline at end of file
# README
- Link to documentation
- How to include in other projects
# Documentation
- Introduction
- How to build
- Structure Overview
- Link to commons documentation
## Environment
- World
- Osm
- Pathfinding
## EESimulator
- EESimulator/Structure
- Components/Component Manager
- Discrete Events system/Events
- Messages/Types
- EE Setup / Validation
- Creating new components
- Buses, Bridges
- Sensors, Actuators
## Vehicle
- Structure
- DynamicObject/PhysicalValues
- Physics Model
- PowerTrain
- Builder/Config/Properties
## eecomponents
- Navigation
- Autopilots
## Simulator
- Simulator/Loop
- Vehicle Configs
## Debug Visualization
- Viewer, SimulationRunner/Control
- Renderers
\ No newline at end of file
...@@ -69,10 +69,10 @@ public class Actuator extends EEComponent implements Updatable { ...@@ -69,10 +69,10 @@ public class Actuator extends EEComponent implements Updatable {
delta = Math.signum(delta) * maxChange; delta = Math.signum(delta) * maxChange;
} }
val += delta; val += delta;
if (val > properties.max) if (val > actuatedValue.getMax())
val = properties.max; val = actuatedValue.getMax();
if (val < properties.min) if (val < actuatedValue.getMin())
val = properties.min; val = actuatedValue.getMin();
//actuatedValue.set(isDouble ? Double.valueOf(val) : Float.valueOf((float)val)); //actuatedValue.set(isDouble ? Double.valueOf(val) : Float.valueOf((float)val));
actuatedValue.set(Double.valueOf(val)); actuatedValue.set(Double.valueOf(val));
} }
......
...@@ -18,15 +18,11 @@ public class ActuatorProperties extends BusUserProperties { ...@@ -18,15 +18,11 @@ public class ActuatorProperties extends BusUserProperties {
public String physical_value_name; public String physical_value_name;
public double min;
public double max;
public double change_rate; public double change_rate;
@JsonEntry("sensor") @JsonEntry("sensor")
public Optional<SensorProperties> sensorProperties; public Optional<SensorProperties> sensorProperties;
public ActuatorProperties(double minValue, double maxValue, double changeRate) { public ActuatorProperties(double changeRate) {
this.max = maxValue;
this.min = minValue;
this.change_rate = changeRate; this.change_rate = changeRate;
} }
...@@ -44,12 +40,6 @@ public class ActuatorProperties extends BusUserProperties { ...@@ -44,12 +40,6 @@ public class ActuatorProperties extends BusUserProperties {
return this; return this;
} }
public ActuatorProperties setRange(double minValue, double maxValue) {
this.min = minValue;
this.max = maxValue;
return this;
}
public ActuatorProperties setChangeRate(double changeRate) { public ActuatorProperties setChangeRate(double changeRate) {
this.change_rate = changeRate; this.change_rate = changeRate;
return this; return this;
......
{
"config": {
"name": "TestVehicle",
"body": {
"mass": 1642.0,
"length": 4.971,
"width": 1.87,
"height": 1.383,
"center_of_gravity_height": 0.34575
},
"wheels": {
"diameter": 0.6612,
"width": 0.255,
"front_wheel_axis_offset": 1.0,
"max_turning_angle": 30.0,
"front_track_width": 1.57988,
"back_track_dist": 1.60274,
"wheelbase": 2.812,
"wheelbase_offset": 0.0
},
"powertrain": {
"type": "electrical",
"traction": "rear",
"braking": "front",
"max_braking_force": 5000.0,
"motor": {
"motor_efficiency": 0.7,
"regen_efficiency": 0.5,
"motor_peek_torque": 450.0
},
"battery": {
"type": "infinite",
"capacity": 1.8E8,
"critical_charge": 10.0
},
"transmission_ratio": 9.0
},
"physics": {
"type": "rigidbody"
},
"components": [
{
"type": "actuator",
"name": "SteeringActuator",
"priority": {},
"buses": [
"DefaultBus"
],
"physical_value_name": "steering",
"min": -30.0,
"max": 30.0,
"change_rate": 60.0,
"sensor": {
"type": "sensor",
"name": "UnnamedComponent",
"priority": {},
"buses": [
"DefaultBus"
],
"update_interval": [
0,
100000000
],
"read_time": [
0,
1000000
],
"send_only_changed": false
}
},
{
"type": "actuator",
"name": "BrakingActuator",
"priority": {},
"buses": [
"DefaultBus"
],
"physical_value_name": "braking",
"min": 0.0,
"max": 1.0,
"change_rate": 10.0,
"sensor": {
"type": "sensor",
"name": "UnnamedComponent",
"priority": {},
"buses": [
"DefaultBus"
],
"update_interval": [
0,
100000000
],
"read_time": [
0,
1000000
],
"send_only_changed": false
}
},
{
"type": "actuator",
"name": "GasActuator",
"priority": {},
"buses": [
"DefaultBus"
],
"physical_value_name": "gas",
"min": -0.5,
"max": 1.0,
"change_rate": "Infinity",
"sensor": {
"type": "sensor",
"name": "UnnamedComponent",
"priority": {},
"buses": [
"DefaultBus"
],
"update_interval": [
0,
100000000
],
"read_time": [
0,
1000000
],
"send_only_changed": false
}
},
{
"type": "sensor",
"name": "TrueVelocitySensor",
"priority": {},
"buses": [
"DefaultBus"
],
"physical_value_name": "true_velocity",
"update_interval": [
0,
100000000
],
"read_time": [
0,
10000000
],
"send_only_changed": false
},
{
"type": "sensor",
"name": "TruePositionSensor",
"priority": {},
"buses": [
"DefaultBus"
],
"physical_value_name": "true_position",
"update_interval": [
0,
100000000
],
"read_time": [
0,
10000000
],
"send_only_changed": false
},
{
"type": "sensor",
"name": "TrueCompassSensor",
"priority": {},
"buses": [
"DefaultBus"
],
"physical_value_name": "true_compass",
"update_interval": [
0,
100000000
],
"read_time": [
0,
10000000
],
"send_only_changed": false
},
{
"type": "navigation",
"name": "Navigation",
"priority": {},
"buses": [
"DefaultBus"
]
},
{
"type": "constant_bus",
"name": "DefaultBus",
"priority": {},
"mode": "instant",
"rate": 0.0
},
{
"type": "java_autopilot",
"name": "TestAutopilot",
"priority": {},
"buses": [
"DefaultBus"
],
"compute_time": [
0,
0
]
}
],
"start_coords": [
0.0,
0.0
]
},
"state": {
"eesystem": {
"components": {
"SteeringActuator": {
"sensor": {
"nextUpdate": [
243,
210000000
]
},
"targetValue": -56.69885566204579
},
"BrakingActuator": {
"sensor": {
"nextUpdate": [
243,
210000000
]
},
"targetValue": 1.0
},
"GasActuator": {
"sensor": {
"nextUpdate": [
243,
210000000
]
},
"targetValue": "Infinity"
},
"TrueVelocitySensor": {
"logic": {
"nextUpdate": [
243,
210000000
]
}
},
"TruePositionSensor": {
"logic": {
"nextUpdate": [
243,
210000000
]
}
},
"TrueCompassSensor": {
"logic": {
"nextUpdate": [
243,
210000000
]
}
},
"Navigation": {
"targets": [
[
-63.83,
-171.96
]
],
"currentPath": {
"trajectoryX": [
18,
0.0,
-2.3721876315154202,
-2.1798136749816006,
4.211962552465172,
4.289310779669538,
3.1923722851743537,
-9.68962336796794,
-18.338561497475773,
-23.091961640246605,
-42.70325305754577,
-45.76905551645384,
-49.706783445404504,
-76.86304284074316,
-92.37487821783468,
-107.28902274852298,
-76.17394045318929,
-63.41763696847143,
-63.83
],
"trajectoryY": [
18,
0.0,
-0.12404716846665131,
-3.8028664914396786,
-3.4692817115581356,
-7.083116827073201,
-8.372977976211862,
-11.419718966323348,
-13.64361749913033,
-15.689604149597187,
-30.64532178345498,
-33.9255721190885,
-38.32889121431496,
-75.87941794250301,
-97.71810153550507,
-114.73092531183404,
-155.4727464348806,
-171.6345266987817,
-171.96
]
},
"currentPos": [
-55.21891446465979,
-156.55535838326972
]
},
"DefaultBus": {},
"TestAutopilot": {
"currentVelocity": 0.16412682919938976,
"currentPosition": [
-55.21891446465979,
-156.55535838326972
],
"currentCompass": -0.5307416229571662,
"newTrajX": [
3,
-76.17394045318929,
-63.41763696847143,
-63.83
],
"trajX": [
3,
-76.17394045318929,
-63.41763696847143,
-63.83
],
"trajY": [
3,
-155.4727464348806,
-171.6345266987817,
-171.96
],
"lastTime": [
0,
130000000
],
"currSeg": {
"posStart": [
-76.17394045318929,
-155.4727464348806
],
"posEnd": [
-63.41763696847143,
-171.6345266987817
],
"dir": [
0.6195546219961837,