Otpvondoiats opened a new pull request, #3214:
URL: https://github.com/apache/nuttx-apps/pull/3214
## Summary
uorb_generator this tool can be used in conjunction with uorb_listener.
Before using the tool, it is necessary to set the CONFIG_LINE_MAX parameter
to a sufficiently long length to ensure that the terminal can accept complete
input data. A recommendation is to set it to 256 or 512.
Incoming data can be printed via uorb_listener or concatenated manually
using format information, but it must be ensured that the string and struct
information are consistent. Topics saved using uorb_listener -f can be pulled
and imported into the simulator for debugging (mount -t hostfs -o fs=/home/xxx/
/data).
Parameter Description:
-f specifies the path to the input playback file. -n specifies the number of
times to playback the data. This option is only effective when -s is enabled.
-r specifies the playback frequency (in HZ, e.g., 5hz, 20hz). This option is
only effective when -s is enabled. -t specifies the topic for playback, with
the option to specify a specific instance value afterward. -s enables playback
of simulated (fake) data, generating struct data from input entered via the
terminal. It will modify the timestamp of the current data to real-time.
Simulated data should be placed at the end of the entire command.
By following these instructions, users can effectively utilize the Generator
debugging tool in conjunction with uorb_listener for system debugging and
verification.
The tool publishes topic data via uorb.
Notice:LINE_MAX must be set to 128 or more.
generator <command> [arguments...]
Commands:
<topics_name> The playback topic name.
[-h ] Listener commands help.
[-f <val> ] File path to be played back(absolute path).
[-n <val> ] Number of playbacks(fake model), default: 1
[-r <val> ] The rate for playing fake data is only valid when parameter
's' is used.
default:10hz.
[-s <val> ] Playback fake data.
[-t <val> ] Playback topic.
e.g.:
sim - sensor_accel0:
uorb_generator -n 100 -r 5 -s -t sensor_accel0
timestamp:23191100,x:0.1,y:9.7,z:0.81,temperature:22.15
sim - sensor_baro0:
uorb_generator -n 100 -r 5 -s -t sensor_baro0
timestamp:23191100,pressure:999.12,temperature:26.34
fies - sensor_accel1
uorb_generator -f /data/uorb/20240823061723/sensor_accel0.csv -t
sensor_accel1
## Testing
e.g.:
1. uorb_generator -f /data/sensor/19700101000003/sensor_accel_uncal0.csv -t
sensor_accel_uncal2
2. uorb_generator -s -r 5 -n 200 -t sensor_accel_uncal2
timestamp:1,x:-2.0,y:3,z:4,temperature:5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]