Don't publish IMU/motor data at fixed 1kHz, but only when new data is present
This allows to tune the publishing frequency according to what the flightcontroller sends. In particular, this can be effectively changed withthe set_sensor_rate() service.
This helps when used in combination with ros that has hard times...
Merge latest skeleton template
In particular, split properly the eigen3 codels dependency.
Reset the time offset of the received data if it diverges too much
The timestamp estimation assumes that the sensors (IMU, motors) are streamingdata at the specified frequency. It can happen that this is not true insimulation (or if the flight controller did not receive the streaming message)....
Be more tolerant to peaks in measured sensor rate
Don't print "unknown message" when receiving a known, but ignored, message
Set measured sensor rate to the desired value when setting a new rate
This accelerates the convergence of the measured rate to the actual value.
Reject duplicate IMU/motor data packets
It can happen (in simulation only) that mrsim-genom3 sends twice the same data,due to approximate scheduling and integer roundings in sequence numbercomputation. Just disregard duplicate data if this happens.
While here, also initialize sensor time structure.
Update sensor measurement rate when no message is received
Log sensor rate
Check rotor status and sensor rate in servo()
Do a smooth stop if sensor rate don't match what's expected.Do a hard stop if any motor is in failure state.
Log bad messages from the flight controller
During startup, resend start message to motors not going into the start state
This accounts for motors that, for some reason, do not receive the initialstart message.
During startup, disabled motors should not spin, but also not start
Actually discard trailing NaNs in set_velocity()
After computing the input length without trailing NaNs, the length must bewritten back so that the computation has some effect.
Don't scale input twice during startup
The input port may not be refreshed exactly at each period. Depending on themiddleware, the input port data may be overwritten after each read() or onlywhen new data arrives. So one cannot scale the input in place, one must do a...
Refuse to start servo() if measured sensor rate is below 90% of requested
Measure effective sensor rate and return information with get_sensor_rate()
Reset imu values to NaN in case of timeout, to clean log files
The imu _present flag is already reset to false in case of timeout. Alsoresetting the values to NaN make the logs more clear, without addingcomplexity to the log function.
Fix vel -> avel typo (after switching to openrobots2-idl)
Switch to openrobots2-idl - No functional change intended
Mechanically replace all pos->q by att->q and vel->w by avel->w. Do thesame for the covariances.
Bump version to 2.0
Use aio(7) for logging and drop log entries when io requests are too slow
Use aio_write(3) to append to the log files. If a previous aio request wasnot completed after one period, drop the next log entry and add an emptyline in the log file to indicate the miss (gnuplot will show it nicely)....
Fix a comment
Also available in: Atom