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
```xml
<dependency>
<groupId>montisim</groupId>
<artifactId>sub-project-name</artifactId>
<artifactId>*sub-project*</artifactId>
<version>${revision}</version>
</dependency>
```
`*sub-project*` can be any of the following:
- `environment`
- `eesimulator`
- `vehicle`
- `eecomponents`
- `simulator`
{
"model": "TODO",
"name": "UnnamedCar",
"properties": {
"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,
"front_wheels_depth": 1.406,
"back_wheels_depth": 1.406
}
"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": "rear",
"braking": "front",
"max_braking_force": 5000.0,
"motor": {
"motor_efficiency": 0.7,
......@@ -50,8 +46,6 @@
"DefaultBus"
],
"physical_value_name": "steering",
"min": -30.0,
"max": 30.0,
"change_rate": 60.0,
"sensor": {
"type": "sensor",
......@@ -79,8 +73,6 @@
"DefaultBus"
],
"physical_value_name": "braking",
"min": 0.0,
"max": 1.0,
"change_rate": 10.0,
"sensor": {
"type": "sensor",
......@@ -108,8 +100,6 @@
"DefaultBus"
],
"physical_value_name": "gas",
"min": -0.5,
"max": 1.0,
"change_rate": "Infinity",
"sensor": {
"type": "sensor",
......@@ -195,9 +185,6 @@
"type": "constant_bus",
"name": "DefaultBus",
"priority": {},
"buses": [
"DefaultBus"
],
"mode": "instant",
"rate": 0.0
},
......@@ -213,5 +200,9 @@
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 {
delta = Math.signum(delta) * maxChange;
}
val += delta;
if (val > properties.max)
val = properties.max;
if (val < properties.min)
val = properties.min;
if (val > actuatedValue.getMax())
val = actuatedValue.getMax();
if (val < actuatedValue.getMin())
val = actuatedValue.getMin();
//actuatedValue.set(isDouble ? Double.valueOf(val) : Float.valueOf((float)val));
actuatedValue.set(Double.valueOf(val));
}
......
......@@ -18,15 +18,11 @@ public class ActuatorProperties extends BusUserProperties {
public String physical_value_name;
public double min;
public double max;
public double change_rate;
@JsonEntry("sensor")
public Optional<SensorProperties> sensorProperties;
public ActuatorProperties(double minValue, double maxValue, double changeRate) {
this.max = maxValue;
this.min = minValue;
public ActuatorProperties(double changeRate) {
this.change_rate = changeRate;
}
......@@ -44,12 +40,6 @@ public class ActuatorProperties extends BusUserProperties {
return this;
}
public ActuatorProperties setRange(double minValue, double maxValue) {
this.min = minValue;
this.max = maxValue;
return this;
}
public ActuatorProperties setChangeRate(double changeRate) {
this.change_rate = changeRate;
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,
-0.7849535466275479
],
"normal": [
0.7849535466275479,
0.6195546219961837
],
"relPos": [
20.9550259885295,
-1.0826119483891148
],
"length": 20.589473521507255,
"projPos": 13.832583293752995,
"orthoPos": 15.7779847329159,
"dist": 15.7779847329159,
"projDistToEnd": 6.75689022775426
},
"nextSeg": {
"posStart": [
-63.41763696847143,
-171.6345266987817
],
"posEnd": [
-63.83,
-171.96
],
"dir": [
-0.7849535466275561,
-0.6195546219961732
],
"normal": [
0.6195546219961732,
-0.7849535466275561
],
"relPos": [
8.198722503811638,
15.079168315511993
],
"length": 0.5253343122025901,
"projPos": -15.777984732915808,
"orthoPos": -6.756890227754472,
"dist": 6.756890227754472,
"projDistToEnd": 16.3033190451184
},
"relPos": [
0.0,
0.0