Error on um6_driver when trying to change update_rate from Heron (clearpathrobotics)
Hello, I am trying to change the update rate of UM6 on the HERON and got error when update rate is higher than 40(Hz).
Detailed description:
The um6 package is exactly same from: https://github.com/ros-drivers/um6.git
The default update_rate of um6driver is 20(Hz), specified in the um6/src/main.cpp as a parameter **updaterate. There ‘s error when changing **update_rate to any number higher than 40(Hz).
How to duplicate:
Try turning on debug output for the node, which may give more clues as to what's gone wrong. Add the last line to /opt/ros/kinetic/share/ros/config/rosconsole.config:
#
# rosconsole will find this file by default at $ROS_ROOT/config/rosconsole.co$
#
# You can define your own by e.g. copying this file and setting
# ROSCONSOLE_CONFIG_FILE (in your environment) to point to the new file
#
log4j.logger.ros=INFO
log4j.logger.ros.roscpp.superdebug=WARN
log4j.logger.ros.um6=DEBUG
Then, set the updaterate of um6driver to 50(Hz):
$ rosrun um6 um6_driver _update_rate:=50
[ INFO] [1566411650.479349448]: Successfully connected to serial port.
[ INFO] [1566411650.487981538]: Setting update rate to 50Hz
[DEBUG] [1566411650.488606598]: Computed checksum on string of length 9 as 2803.
[DEBUG] [1566411650.488815348]: Generated message 00 of overall length 11.
[DEBUG] [1566411650.512419927]: Received packet 5e with batched (2) data.
[DEBUG] [1566411650.512712327]: Received packet 6a with batched (4) data.
[DEBUG] [1566411650.512910947]: Received packet 6e with batched (4) data.
[DEBUG] [1566411650.513085337]: Received packet 72 with batched (4) data.
[DEBUG] [1566411650.513290858]: Received packet 76 with non-batched data.
[DEBUG] [1566411650.562617821]: Received packet 76 with non-batched data.
[ WARN] [1566411650.566446769]: Discarding packet due to bad checksum.
[DEBUG] [1566411650.566751834]: Serial read timed out waiting for ack. Attempting to retransmit.
[DEBUG] [1566411650.566962844]: Computed checksum on string of length 9 as 2803.
[DEBUG] [1566411650.567081779]: Generated message 00 of overall length 11.
[ WARN] [1566411650.567452129]: Serial read buffer is 490, now flushing in an attempt to catch up.
[ WARN] [1566411650.619233649]: Discarded 9 junk byte(s) preceeding packet.
[DEBUG] [1566411650.619504600]: Received packet 72 with batched (4) data.
[ WARN] [1566411650.619695895]: Serial read buffer is 469, now flushing in an attempt to catch up.
[ WARN] [1566411650.676300178]: Discarded 25 junk byte(s) preceeding packet.
[DEBUG] [1566411650.676707183]: Received packet 6e with batched (4) data.
[ WARN] [1566411650.677062018]: Serial read buffer is 453, now flushing in an attempt to catch up.
[ WARN] [1566411650.734512847]: Discarded 17 junk byte(s) preceeding packet.
[DEBUG] [1566411650.735037627]: Received packet 66 with batched (4) data.
[ WARN] [1566411650.735379642]: Serial read buffer is 461, now flushing in an attempt to catch up.
[ WARN] [1566411650.789343914]: Discarded 10 junk byte(s) preceeding packet.
[DEBUG] [1566411650.789549579]: Received packet 60 with batched (2) data.
[ WARN] [1566411650.789739199]: Serial read buffer is 476, now flushing in an attempt to catch up.
[ WARN] [1566411650.845231651]: Discarded 7 junk byte(s) preceeding packet.
[DEBUG] [1566411650.845415282]: Received packet 76 with non-batched data.
[ WARN] [1566411650.845612497]: Serial read buffer is 483, now flushing in an attempt to catch up.
[ WARN] [1566411650.903313260]: Discarded 22 junk byte(s) preceeding packet.
[DEBUG] [1566411650.903506371]: Received packet 72 with batched (4) data.
[ WARN] [1566411650.903724296]: Serial read buffer is 456, now flushing in an attempt to catch up.
[ WARN] [1566411650.961264359]: Discarded 14 junk byte(s) preceeding packet.
[DEBUG] [1566411650.961421694]: Received packet 6a with batched (4) data.
[ WARN] [1566411650.961575174]: Serial read buffer is 464, now flushing in an attempt to catch up.
[ WARN] [1566411651.017311602]: Discarded 14 junk byte(s) preceeding packet.
[DEBUG] [1566411651.017531052]: Received packet 64 with batched (2) data.
[ WARN] [1566411651.017740622]: Serial read buffer is 472, now flushing in an attempt to catch up.
[ WARN] [1566411651.072381349]: Discarded 7 junk byte(s) preceeding packet.
[DEBUG] [1566411651.072599684]: Received packet 5e with batched (2) data.
[ WARN] [1566411651.072743509]: Serial read buffer is 479, now flushing in an attempt to catch up.
[ WARN] [1566411651.129316397]: Discarded 19 junk byte(s) preceeding packet.
[DEBUG] [1566411651.129476312]: Received packet 76 with non-batched data.
[ WARN] [1566411651.129593008]: Serial read buffer is 471, now flushing in an attempt to catch up.
[ WARN] [1566411651.187249536]: Discarded 11 junk byte(s) preceeding packet.
[DEBUG] [1566411651.187407511]: Received packet 6e with batched (4) data.
[ WARN] [1566411651.187541056]: Serial read buffer is 467, now flushing in an attempt to catch up.
[ WARN] [1566411651.244702730]: Discarded 26 junk byte(s) preceeding packet.
[DEBUG] [1566411651.244959530]: Received packet 6a with batched (4) data.
[ WARN] [1566411651.245180435]: Serial read buffer is 452, now flushing in an attempt to catch up.
[ WARN] [1566411651.301275643]: Discarded 11 junk byte(s) preceeding packet.
[DEBUG] [1566411651.301436533]: Received packet 62 with batched (2) data.
[ WARN] [1566411651.301580338]: Serial read buffer is 475, now flushing in an attempt to catch up.
[ WARN] [1566411651.354467784]: Discarded 19 junk byte(s) preceeding packet.
[DEBUG] [1566411651.354675164]: Received packet 5e with batched (2) data.
[ WARN] [1566411651.354836254]: Serial read buffer is 467, now flushing in an attempt to catch up.
[ WARN] [1566411651.413265063]: Discarded 8 junk byte(s) preceeding packet.
[DEBUG] [1566411651.413455788]: Received packet 72 with batched (4) data.
[ WARN] [1566411651.413608798]: Serial read buffer is 470, now flushing in an attempt to catch up.
[ WARN] [1566411651.469300831]: Discarded 23 junk byte(s) preceeding packet.
[DEBUG] [1566411651.469469031]: Received packet 6e with batched (4) data.
[ WARN] [1566411651.469650841]: Serial read buffer is 455, now flushing in an attempt to catch up.
[ WARN] [1566411651.527298365]: Discarded 15 junk byte(s) preceeding packet.
[DEBUG] [1566411651.527476765]: Received packet 66 with batched (4) data.
[ WARN] [1566411651.527659220]: Serial read buffer is 463, now flushing in an attempt to catch up.
[ WARN] [1566411651.580309291]: Discarded 8 junk byte(s) preceeding packet.
[DEBUG] [1566411651.580575626]: Received packet 60 with batched (2) data.
[ WARN] [1566411651.580749271]: Serial read buffer is 478, now flushing in an attempt to catch up.
[DEBUG] [1566411651.639280065]: Received packet 76 with non-batched data.
[ WARN] [1566411651.639522965]: Serial read buffer is 485, now flushing in an attempt to catch up.
[ WARN] [1566411651.696453094]: Discarded 20 junk byte(s) preceeding packet.
[DEBUG] [1566411651.696712989]: Received packet 72 with batched (4) data.
[DEBUG] [1566411651.696910564]: Computed checksum on string of length 9 as 2803.
[DEBUG] [1566411651.697059249]: Generated message 00 of overall length 11.
[ WARN] [1566411651.697265729]: Serial read buffer is 458, now flushing in an attempt to catch up.
[ WARN] [1566411651.746304523]: Discarded 7 junk byte(s) preceeding packet.
[DEBUG] [1566411651.746528778]: Received packet 6a with batched (4) data.
[ WARN] [1566411651.746767528]: Discarding packet due to bad checksum.
[DEBUG] [1566411651.746896963]: Serial read timed out waiting for ack. Attempting to retransmit.
[DEBUG] [1566411651.747038108]: Computed checksum on string of length 9 as 2803.
[DEBUG] [1566411651.747172168]: Generated message 00 of overall length 11.
[ WARN] [1566411651.747395918]: Serial read buffer is 466, now flushing in an attempt to catch up.
[ WARN] [1566411651.792252490]: Discarded 6 junk byte(s) preceeding packet.
[DEBUG] [1566411651.792530185]: Received packet 64 with batched (2) data.
[ WARN] [1566411651.792700010]: Serial read buffer is 475, now flushing in an attempt to catch up.
[ WARN] [1566411651.846266811]: Discarded 11 junk byte(s) preceeding packet.
[DEBUG] [1566411651.846450331]: Received packet 60 with batched (2) data.
[ WARN] [1566411651.846605736]: Serial read buffer is 475, now flushing in an attempt to catch up.
[ WARN] [1566411651.905259611]: Discarded 8 junk byte(s) preceeding packet.
[DEBUG] [1566411651.905460401]: Received packet 76 with non-batched data.
[ WARN] [1566411651.905623791]: Serial read buffer is 482, now flushing in an attempt to catch up.
[ WARN] [1566411651.961302153]: Discarded 23 junk byte(s) preceeding packet.
[DEBUG] [1566411651.961481573]: Received packet 72 with batched (4) data.
[ WARN] [1566411651.961650704]: Serial read buffer is 455, now flushing in an attempt to catch up.
[ WARN] [1566411652.018288702]: Discarded 15 junk byte(s) preceeding packet.
[DEBUG] [1566411652.018477402]: Received packet 6a with batched (4) data.
[ WARN] [1566411652.018630837]: Serial read buffer is 463, now flushing in an attempt to catch up.
[ WARN] [1566411652.076421036]: Discarded 15 junk byte(s) preceeding packet.
[DEBUG] [1566411652.076632756]: Received packet 64 with batched (2) data.
[ WARN] [1566411652.076784831]: Serial read buffer is 471, now flushing in an attempt to catch up.
[ WARN] [1566411652.130275722]: Discarded 8 junk byte(s) preceeding packet.
[DEBUG] [1566411652.130462932]: Received packet 5e with batched (2) data.
[ WARN] [1566411652.130649452]: Serial read buffer is 478, now flushing in an attempt to catch up.
[ WARN] [1566411652.187324885]: Discarded 20 junk byte(s) preceeding packet.
[DEBUG] [1566411652.187500216]: Received packet 76 with non-batched data.
[ WARN] [1566411652.187702901]: Serial read buffer is 470, now flushing in an attempt to catch up.
[ WARN] [1566411652.244281724]: Discarded 12 junk byte(s) preceeding packet.
[DEBUG] [1566411652.244541864]: Received packet 6e with batched (4) data.
[ WARN] [1566411652.244696189]: Serial read buffer is 466, now flushing in an attempt to catch up.
[ WARN] [1566411652.302329993]: Discarded 27 junk byte(s) preceeding packet.
[DEBUG] [1566411652.302510268]: Received packet 6a with batched (4) data.
[ WARN] [1566411652.302686663]: Serial read buffer is 451, now flushing in an attempt to catch up.
[ WARN] [1566411652.356447859]: Discarded 12 junk byte(s) preceeding packet.
[DEBUG] [1566411652.356732054]: Received packet 62 with batched (2) data.
[ WARN] [1566411652.356952214]: Serial read buffer is 474, now flushing in an attempt to catch up.
[DEBUG] [1566411652.413299222]: Received packet 5c with batched (2) data.
[ WARN] [1566411652.413512608]: Serial read buffer is 481, now flushing in an attempt to catch up.
[ WARN] [1566411652.470318706]: Discarded 9 junk byte(s) preceeding packet.
[DEBUG] [1566411652.470537136]: Received packet 72 with batched (4) data.
[ WARN] [1566411652.470791916]: Serial read buffer is 469, now flushing in an attempt to catch up.
[ WARN] [1566411652.528464155]: Discarded 24 junk byte(s) preceeding packet.
[DEBUG] [1566411652.528690265]: Received packet 6e with batched (4) data.
[ WARN] [1566411652.528866440]: Serial read buffer is 454, now flushing in an attempt to catch up.
[ WARN] [1566411652.585983703]: Discarded 16 junk byte(s) preceeding packet.
[DEBUG] [1566411652.586165998]: Received packet 66 with batched (4) data.
[ WARN] [1566411652.586347418]: Serial read buffer is 462, now flushing in an attempt to catch up.
[ WARN] [1566411652.640441725]: Discarded 9 junk byte(s) preceeding packet.
[DEBUG] [1566411652.640643930]: Received packet 60 with batched (2) data.
[ WARN] [1566411652.640834745]: Serial read buffer is 477, now flushing in an attempt to catch up.
[ WARN] [1566411652.697310268]: Discarded 6 junk byte(s) preceeding packet.
[DEBUG] [1566411652.697522763]: Received packet 76 with non-batched data.
[ WARN] [1566411652.697722564]: Serial read buffer is 484, now flushing in an attempt to catch up.
[ WARN] [1566411652.754421797]: Discarded 21 junk byte(s) preceeding packet.
[DEBUG] [1566411652.754636932]: Received packet 72 with batched (4) data.
[ WARN] [1566411652.754823452]: Serial read buffer is 457, now flushing in an attempt to catch up.
[ WARN] [1566411652.812419331]: Discarded 13 junk byte(s) preceeding packet.
[DEBUG] [1566411652.812642686]: Received packet 6a with batched (4) data.
[ WARN] [1566411652.812888936]: Serial read buffer is 465, now flushing in an attempt to catch up.
[ WARN] [1566411652.869313809]: Discarded 13 junk byte(s) preceeding packet.
[DEBUG] [1566411652.869525629]: Received packet 64 with batched (2) data.
[DEBUG] [1566411652.869725399]: Computed checksum on string of length 9 as 2803.
[DEBUG] [1566411652.869962449]: Generated message 00 of overall length 11.
[ WARN] [1566411652.870143454]: Serial read buffer is 473, now flushing in an attempt to catch up.
[ WARN] [1566411652.890351976]: Discarded 16 junk byte(s) preceeding packet.
[DEBUG] [1566411652.890559191]: Received packet 60 with batched (2) data.
[DEBUG] [1566411652.890835486]: Received packet 62 with batched (2) data.
[ WARN] [1566411652.891069961]: Discarding packet due to bad checksum.
[DEBUG] [1566411652.891183982]: Serial read timed out waiting for ack. Attempting to retransmit.
[ERROR] [1566411652.896276320]: Unable to set communication register.
At the same time, the output Hz from um6 node is:
$ rostopic hz /imu/data
subscribed to [/imu/data]
no new messages
no new messages
no new messages
Something to notice, this is the output of setting update_rate to 30(Hz):
$ rosrun um6 um6_driver _update_rate:=30
[ INFO] [1566410663.372790454]: Successfully connected to serial port.
[ INFO] [1566410663.381330979]: Setting update rate to 30Hz
[ WARN] [1566410663.430855653]: Serial read buffer is 465, now flushing in an attempt to catch up.
[ WARN] [1566410663.445767127]: Discarded 24 junk byte(s) preceeding packet.
[ WARN] [1566410663.558107737]: Excluding magnetometer updates from EKF.
[ INFO] [1566410663.581051996]: Sending command: zero gyroscopes
And,
$ rostopic hz /imu/data
subscribed to [/imu/data]
average rate: 29.604
min: 0.032s max: 0.036s std dev: 0.00101s window: 28
average rate: 29.593
min: 0.029s max: 0.039s std dev: 0.00167s window: 58
^Caverage rate: 29.600
min: 0.029s max: 0.039s std dev: 0.00163s window: 64
Asked by NienchiWu on 2019-08-21 14:46:04 UTC
Comments