Skip to content

Commit

Permalink
Merge pull request #3 from MO-RISE/pipline
Browse files Browse the repository at this point in the history
Pipeline
  • Loading branch information
TedSjoblom authored May 4, 2023
2 parents e68b26f + 3d53d60 commit c590c5a
Show file tree
Hide file tree
Showing 24 changed files with 660 additions and 17 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,32 @@ Output minimized example:
}
```

## Docker compose example

```yml
crowsnest-processor-radar-0:
image: ghcr.io/mo-rise/crowsnest-processor-opendlv-radar:0.1.17
container_name: cw-radar-processor-0
restart: unless-stopped
network_mode: "host"
deploy:
resources:
limits:
memory: 1024M
environment:
- CLUON_CID=65
- CLUON_ENVELOPE_ID=1201
- MQTT_BROKER_HOST=localhost
- MQTT_BROKER_PORT=1883
- MQTT_BASE_TOPIC=CROWSNEST/SEAHORSE/RADAR/0/SWEEP
- RADAR_MIN_READING_WEIGHT=0
- RADAR_SWEEP_ANGULAR_SUBSETTING=4
- RADAR_SWEEP_RADIAL_SUBSETTING=4
- RADAR_MAX_UPDATE_FREQUENCY=1
```
## Development setup
To setup the development environment:
Expand Down
25 changes: 25 additions & 0 deletions brefv/envelope.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# generated by datamodel-codegen:
# filename: envelope.json
# timestamp: 2023-04-28T09:01:04+00:00

from __future__ import annotations

from datetime import datetime
from typing import Any, Dict, List, Union

from pydantic import BaseModel, Extra, Field


class Envelope(BaseModel):
class Config:
extra = Extra.forbid

sent_at: datetime = Field(
...,
description='Date and time when the message was sent from the application processing the sensor data, expressed according to the ISO 8601 standard.',
examples=['2021-10-07T20:20:39.345+00:00'],
title='Sent at',
)
message: Union[float, str, bool, Dict[str, Any], List[Any]] = Field(
..., description='The message contained by this envelope.', title='Message'
)
3 changes: 3 additions & 0 deletions brefv/messages/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# generated by datamodel-codegen:
# filename: messages
# timestamp: 2023-04-28T09:01:10+00:00
11 changes: 11 additions & 0 deletions brefv/messages/angle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# generated by datamodel-codegen:
# filename: angle.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Field


class Angle(BaseModel):
__root__: float = Field(..., description='Angular reading [deg]', title='Angle')
13 changes: 13 additions & 0 deletions brefv/messages/angle_rate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# generated by datamodel-codegen:
# filename: angle_rate.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Field


class AngleRate(BaseModel):
__root__: float = Field(
..., description='Angular rate reading [deg/min]', title='Angle rate'
)
19 changes: 19 additions & 0 deletions brefv/messages/angular_velocity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: angular_velocity.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class AngularVelocity(BaseModel):
__root__: List[float] = Field(
...,
description="Angular velocity [Yaw-rate, Pitch-rate, Roll-rate] (rad/s) of a body with respect to the body's BF frame of reference.",
max_items=3,
min_items=3,
title='Angular Velocity',
)
19 changes: 19 additions & 0 deletions brefv/messages/attitude.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: attitude.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class Attitude(BaseModel):
__root__: List[float] = Field(
...,
description="Attitude [Yaw, Pitch, Roll] (radians) of a body with respect to the body's NED frame of reference.",
max_items=3,
min_items=3,
title='Attitude',
)
25 changes: 25 additions & 0 deletions brefv/messages/error_ellipse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# generated by datamodel-codegen:
# filename: error_ellipse.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Field


class ErrorEllipse(BaseModel):
semi_major_axis: float = Field(
...,
description="Semi-major axis of the GNSS sensor's error ellipse for 1 standard deviation",
title='Semi-major axis',
)
semi_minor_axis: float = Field(
...,
description="Semi-minor axis of the GNSS sensor's error ellipse for 1 standard deviation",
title='Semi-minor axis',
)
azimuth: float = Field(
...,
description="Azimuth of the semi-major axis of the GNSS sensor's error ellipse with respect to True North in degrees",
title='Azimuth',
)
19 changes: 19 additions & 0 deletions brefv/messages/force.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: force.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class Force(BaseModel):
__root__: List[float] = Field(
...,
description="Force [Fx, Fy, Fz] (N) acting on a body with respect to the body's BF frame of reference.",
max_items=3,
min_items=3,
title='Force',
)
19 changes: 19 additions & 0 deletions brefv/messages/linear_velocity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: linear_velocity.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class LinearVelocity(BaseModel):
__root__: List[float] = Field(
...,
description="Linear velocity [Vx, Vy, Vz] (m/s) of a body with respect to the body's BF frame of reference.",
max_items=3,
min_items=3,
title='Linear Velocity',
)
19 changes: 19 additions & 0 deletions brefv/messages/location.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: location.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class Location(BaseModel):
__root__: List[float] = Field(
...,
description='A location [x, y, z] [m] relative to a body´s geometric center, expressed in the BF frame of reference',
max_items=3,
min_items=3,
title='Location',
)
19 changes: 19 additions & 0 deletions brefv/messages/moment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: moment.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class Moment(BaseModel):
__root__: List[float] = Field(
...,
description="Moment [Mx, My, Mz] (Nm) acting on a body and with respect to the body's BF frame of reference.",
max_items=3,
min_items=3,
title='Moment',
)
22 changes: 22 additions & 0 deletions brefv/messages/playback.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# generated by datamodel-codegen:
# filename: playback.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Field


class PlaybackCommand(BaseModel):
playback_speed: float = Field(
...,
description='Reverse is number under zero. Zero is paused. Above zero is moving forward and 1 is seen as normal speed',
title='Playback speed',
)
start_from: Optional[float] = Field(
None,
description='Start frame where position from where the playback will start or continue from',
title='Start from',
)
18 changes: 18 additions & 0 deletions brefv/messages/point_cloud.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# generated by datamodel-codegen:
# filename: point_cloud.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class PointCloud(BaseModel):
__root__: List = Field(
...,
description='A cloud of 3D points as a list of (x,y,z) tuples [m] in a right-handed, cartesian frame of reference.',
examples=[[0.0, 0.0, 0.0], [0.0, 1.0, 0.0]],
title='Point cloud',
)
17 changes: 17 additions & 0 deletions brefv/messages/pose.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# generated by datamodel-codegen:
# filename: pose.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Extra

from . import attitude, position


class Pose(BaseModel):
class Config:
extra = Extra.forbid

position: position.Position
attitude: attitude.Attitude
19 changes: 19 additions & 0 deletions brefv/messages/position.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: position.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class Position(BaseModel):
__root__: List[float] = Field(
...,
description='Position [longitude, latitude, altitude] [degrees, degrees, m] of a body with respect to the WGS84 frame of reference. Altitude is the height of the body above the WGS84 ellipsoid.',
max_items=3,
min_items=3,
title='Position',
)
19 changes: 19 additions & 0 deletions brefv/messages/rotation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: rotation.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from typing import List

from pydantic import BaseModel, Field


class Rotation(BaseModel):
__root__: List[float] = Field(
...,
description='A rotation [roll, pitch, yaw] [radians] expressed in the BF frame of reference given as Euler angles according to the YPR convention',
max_items=3,
min_items=3,
title='Rotation',
)
13 changes: 13 additions & 0 deletions brefv/messages/rpm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# generated by datamodel-codegen:
# filename: rpm.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Field


class RPM(BaseModel):
__root__: float = Field(
..., description='RPM reading [Revolution Per Minute]', title='RPM'
)
11 changes: 11 additions & 0 deletions brefv/messages/speed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# generated by datamodel-codegen:
# filename: speed.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Field


class Speed(BaseModel):
__root__: float = Field(..., description='Speed reading [knots]', title='Speed')
17 changes: 17 additions & 0 deletions brefv/messages/twist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# generated by datamodel-codegen:
# filename: twist.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Extra

from . import angular_velocity, linear_velocity


class Twist(BaseModel):
class Config:
extra = Extra.forbid

linear_velocity: linear_velocity.LinearVelocity
angular_velocity: angular_velocity.AngularVelocity
17 changes: 17 additions & 0 deletions brefv/messages/wrench.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# generated by datamodel-codegen:
# filename: wrench.json
# timestamp: 2023-04-28T09:01:10+00:00

from __future__ import annotations

from pydantic import BaseModel, Extra

from . import force, moment


class Wrench(BaseModel):
class Config:
extra = Extra.forbid

force: force.Force
moment: moment.Moment
Loading

0 comments on commit c590c5a

Please sign in to comment.