Could not find <log> in log toc!
AndrianH18 opened this issue · 0 comments
Note: I'm well aware that there have been several issues raised regarding this and I have attempted the methods listed in those issues. Also, I believe that (hopefully) I have new findings to share with you. Thank you for bearing with me...
Hi @whoenig,
I have been facing this issue while using crazyflie_ros
whereby ROS fails to fetch logging variable from the Crazyflie. The error message says, for example, Could not find acc.x in log toc!
, but the log variable that "cannot be found" seems random (I have been getting gyro.x
and even state estimate variables as well).
This error happened on 2 different systems that I worked with, an x86 laptop running Ubuntu 18.04 and a Jetson Nano running JetPack (based on Ubuntu 18.04), both with ROS Melodic installed. I managed to fix both, though I feel that the solution is rather tedious and dirty (see below). Here's what I know, checked, and tried:
- The logging variables are enabled in the Crazyflie. When I encountered the error on the Jetson Nano, the laptop (which hadn't encountered this error yet) was able to connect to the Crazyflie and read the logs.
- Tried with both 2020.09 and the new 2021.01 firmwares for the Crazyflie.
- This error happened regardless of the number of Crazyflies being flown (tried with one or two CFs).
- Restarting the troubled computer did not help, neither did restarting the CF (well, almost... see How I Solved the Error below).
- Changing the Crazyradio PA did not help (tried changing the Crazyradio to one that works with the laptop).
- Safelink is already disabled by default (#176).
How I Solved the Error
This error appeared rather suddenly, I haven't been able to pinpoint the cause of the error. Once, I cloned crazyflie_ros
and another ROS package I have that used crazyflie_ros
from the laptop to the Jetson Nano, and this problem emerged. On the Jetson, I managed to solve the error with these steps:
- Delete the entire
.ros/
directory (not just the CSV TOC cache files in.ros/
) - Delete default sources list file:
sudo rm -r /etc/ros/rosdep/sources.list.d/20-default.list
sudo rosdep init
rosdep update
- Restart the Crazyflie
- Launch ROS again
Curiously, this method only works on the Jetson Nano (at least on my Jetson Nano, and it does always solve the error on the Jetson). Also, this is the only case for me where restarting the Crazyflie helps.
Fast forward, I encountered the same error on the laptop. The steps I did to the Jetson Nano did not work; instead, I had to:
- Delete the CSV TOC cache files in
.ros/
and everything inside.ros/log/
- Relaunch the ROS
- Repeat until the error is gone (yes it is a dirty solution, I had to do this 8 or so times until the error went away)
Steps to Reproduce
While I haven't pinpointed the exact cause, I did discover a way to trigger the error: while the ROS is working, purposely delete all CSV TOC cache files in .ros/
and everything inside .ros/log/
. The next time ROS is launched, the error should appear (it did on both my systems).
While I know how to solve the problem should it appear again, I hope that this finding helps in finding the root cause of the problem and solving it once and for all. Will I trouble you if you try to reproduce the problem and find a "cleaner" solution?
Thank you!
Andrian