Skip to content

Commit f13da2e

Browse files
committed
small updates to montblanc
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
1 parent 59d0bcd commit f13da2e

File tree

24 files changed

+27
-26
lines changed

24 files changed

+27
-26
lines changed

montblanc/arequipa/arequipa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id : Arequipa
22

3-
uri: file://./target/release/libarequipa.so
3+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libarequipa.so
44

55
inputs:
66
- id: Arkansas

montblanc/barcelona/barcelona.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id : Barcelona
2-
uri: file://./target/release/libbarcelona.so
2+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libbarcelona.so
33
inputs:
44
- id: Mekong
55
type: twist-w-coovariance-ts

montblanc/barcelona/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use datatypes::{LENA_PORT, MEKONG_PORT};
1717
use futures::prelude::*;
1818
use futures::select;
1919
use zenoh_flow::prelude::*;
20+
use rand::random;
2021

2122
#[export_operator]
2223
pub struct Barcelona {
@@ -50,7 +51,7 @@ impl Node for Barcelona {
5051
msg = self.input_mekong.recv().fuse() => {
5152
if let Ok((Message::Data(inner_data),_)) = msg {
5253
let value = data_types::WrenchStamped {
53-
header: Some(inner_data.header.as_ref().ok_or_else(|| zferror!(ErrorKind::Empty))?.clone()),
54+
header: Some(inner_data.header.clone().unwrap_or(random())),
5455
wrench: Some(data_types::Wrench {
5556
force: inner_data
5657
.twist

montblanc/cordoba/cordoba.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id : Cordoba
22

3-
uri: file://./target/release/libcordoba.so
3+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libcordoba.so
44

55
# period:
66
# length: 100

montblanc/datatypes/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use prost::Message;
1616
use rand::distributions::{Alphanumeric, Distribution, Standard};
17-
use rand::Rng;
17+
use rand::{Rng, random};
1818
use std::io::Cursor;
1919
use std::time::{SystemTime, UNIX_EPOCH};
2020
use zenoh_flow::prelude::{DowncastAny, ZFData};
@@ -240,7 +240,7 @@ pub fn deserialize_twist_with_covariance(
240240
impl Distribution<data_types::TwistWithCovarianceStamped> for Standard {
241241
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> data_types::TwistWithCovarianceStamped {
242242
data_types::TwistWithCovarianceStamped {
243-
header: rng.gen(),
243+
header: random(),
244244
twist: rng.gen(),
245245
}
246246
}

montblanc/delhi/delhi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id : Delhi
22

3-
uri: file://./target/release/libdelhi.so
3+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libdelhi.so
44

55
# period:
66
# length: 1

montblanc/freeport/freeport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id : Freeport
22

3-
uri: file://./target/release/libfreeport.so
3+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libfreeport.so
44

55
# period:
66
# length: 50

montblanc/geneva/geneva.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id : Geneva
2-
uri: file://./target/release/libgeneva.so
2+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libgeneva.so
33
inputs:
44
- id: Danube
55
type: str

montblanc/georgetown/georgetown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id : Georgetown
2-
uri: file://./target/release/libgeorgetown.so
2+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libgeorgetown.so
33
inputs:
44
- id: Lena
55
type: wrench-ts

montblanc/hamburg/hamburg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id : Hamburg
2-
uri: file://./target/release/libhamburg.so
2+
uri: file:///home/ato/Workspace/zenoh-flow-examples/montblanc/target/release/libhamburg.so
33
inputs:
44
- id: Danube
55
type: str

0 commit comments

Comments
 (0)