The agent works with SEN0233 sensor and publishes every interval
seconds the measurements to Robonomics Network
interval
- interval in seconds. Default is 30 secondsport
- specifies the port where the sensor is. Default is/dev/ttyS0
nix build -f release.nix
roslaunch substrate_sensor_demo agent.launch
From the channel:
substrate_sensor.enable = true;
substrate_sensor.interval = 30; # optional
substrate_sensor.port = "/dev/ttyS0"; # optional
or manually:
systemd.services.substrate_sensor = {
requires = [ "roscore.service" ];
after = ["roscore.service" ];
wantedBy = [ "multi-user.target" ];
environment.ROS_MASTER_URI = "http://localhost:11311";
script = ''
source /root/substrate_sensor_demo/result/setup.bash \
&& roslaunch substrate_sensor_demo agent.launch
'';
serviceConfig = {
Restart = "on-failure";
StartLimitInterval = 0;
RestartSec = 60;
User = "liability";
Group = "users";
};
};