Move from other project.
This commit is contained in:
commit
352126327b
6 files changed
+251
No files matched your search
@@ -0,0 +1,64 @@
|
||||
{
|
||||
/// The node's mode (router, peer or client)
|
||||
mode: "router",
|
||||
|
||||
/// Which endpoints to connect to. E.g. tcp/localhost:7447.
|
||||
/// This should list all the routers for this robot.
|
||||
connect: {
|
||||
endpoints: [
|
||||
],
|
||||
},
|
||||
|
||||
/// Which endpoints to listen on. E.g. tcp/0.0.0.0:7447.
|
||||
listen: {
|
||||
endpoints: [
|
||||
"tcp/0.0.0.0:7447",
|
||||
],
|
||||
},
|
||||
/// Configure the scouting mechanisms and their behaviours
|
||||
scouting: {
|
||||
/// Disable multicast.
|
||||
multicast: {
|
||||
/// Whether multicast scouting is enabled or not
|
||||
enabled: false,
|
||||
},
|
||||
/// Enable gossip scouting.
|
||||
gossip: {
|
||||
/// Whether gossip scouting is enabled or not
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
|
||||
/// Configuration of data messages timestamps management.
|
||||
timestamping: {
|
||||
/// ROS setting: PublicationCache which is required for transient_local durability
|
||||
/// only works when time-stamping is enabled.
|
||||
enabled: true,
|
||||
},
|
||||
|
||||
/// Configure internal transport parameters
|
||||
transport: {
|
||||
unicast: {
|
||||
compression: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
link: {
|
||||
tx: {
|
||||
queue: {
|
||||
congestion_control: {
|
||||
drop: {
|
||||
/// The maximum time in microseconds to wait for an available batch (place in queue) before dropping
|
||||
/// a droppable message if still no batch is available.
|
||||
wait_before_drop: 100000,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
/// Shared memory configuration.
|
||||
shared_memory: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
/// The node's mode (router, peer or client)
|
||||
mode: "peer",
|
||||
|
||||
/// Which endpoints to connect to. E.g. tcp/localhost:7447.
|
||||
/// By configuring the endpoints, it is possible to tell zenoh which router/peer to connect to at startup.
|
||||
/// We only connect our local router at first.
|
||||
connect: {
|
||||
endpoints: [
|
||||
"tcp/localhost:7447",
|
||||
],
|
||||
retry: {
|
||||
period_init_ms: 100,
|
||||
period_max_ms: 10000
|
||||
},
|
||||
},
|
||||
|
||||
/// Which endpoints to listen on. E.g. tcp/0.0.0.0:7447.
|
||||
/// By configuring the endpoints, it is possible to tell zenoh which are the endpoints that other routers,
|
||||
/// peers, or client can use to establish a zenoh session.
|
||||
/// "tcp/[::]:0", "udp/0.0.0.0:0?rel=1;mixed_rel=1"
|
||||
listen: {
|
||||
endpoints: [
|
||||
"tcp/0.0.0.0:0", "udp/0.0.0.0:0?rel=1;mixed_rel=1"
|
||||
],
|
||||
},
|
||||
|
||||
/// Configure the scouting mechanisms and their behaviours
|
||||
scouting: {
|
||||
/// Disable multicast.
|
||||
multicast: {
|
||||
enabled: false,
|
||||
},
|
||||
/// Enable gossip.
|
||||
gossip: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
|
||||
/// Configuration of data messages timestamps management.
|
||||
timestamping: {
|
||||
/// ROS setting: PublicationCache which is required for transient_local durability
|
||||
/// only works when time-stamping is enabled.
|
||||
enabled: true,
|
||||
},
|
||||
|
||||
/// Configure internal transport parameters
|
||||
transport: {
|
||||
unicast: {
|
||||
compression: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
link: {
|
||||
tx: {
|
||||
queue: {
|
||||
congestion_control: {
|
||||
drop: {
|
||||
/// The maximum time in microseconds to wait for an available batch (place in queue) before dropping
|
||||
/// a droppable message if still no batch is available.
|
||||
wait_before_drop: 100000,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
/// Shared memory configuration.
|
||||
shared_memory: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
|
||||
export ZENOH_ROUTER_CHECK_ATTEMPTS=-1
|
||||
export ZENOH_ROUTER_CONFIG_URI=${SCRIPT_DIR}/ROUTER_CONFIG.json5
|
||||
export ZENOH_SESSION_CONFIG_URI=${SCRIPT_DIR}/SESSION_CONFIG.json5
|
||||
export ROS_STATIC_PEERS=""
|
||||
|
||||
# This can be called to setup which routers to connect to.
|
||||
# I.E. On my laptop I source this config. I want to connect to
|
||||
# a robot with IP address 192.168.1.100
|
||||
# I can call `zenoh_router_ip 192.168.1.100` and then I will talk to its
|
||||
# router.
|
||||
zenoh_router_ip() {
|
||||
local endpoints=()
|
||||
for ip in "$@"; do
|
||||
endpoints+=("'tcp/$ip:7447'")
|
||||
done
|
||||
local IFS=,
|
||||
export ZENOH_CONFIG_OVERRIDE="connect/endpoints=[${endpoints[*]}];"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user