Debug FAQ
Gazebo crashed when connecting to image_view
This can happen in Ubuntu 16 and under VMware environment.
example error messages:
vmw_ioctl_command error Invalid argument
gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion `bAttached && "A new DepthBuffer for a RenderTarget was created, but after creation" "it says it's incompatible with that RT"' failed.
solution: upgrade to Gazebo 7 by the following commands.
If this cannot solve the problem, run the following command to disable OpenGL 3.0 (and use OpenGL 2.1 instead), or disable "Accelerate 3D Graphics" in VM display settings. In addition, increasing the amount of graphics memory to 2GB (in VM display settings) may also help.
reference: GitHub issue, Gazebo forum
Gazebo: Error in REST request
This is a known issue when running Gazebo in Ubuntu 18, which can cause the model spawn service to fail. The error message is the following.
[Err] [REST.cc:205] Error in REST request
Solution: open the file gedit ~/.ignition/fuel/config.yaml
and replace the url inside from https://api.ignitionfuel.org
to https://api.ignitionrobotics.org
.
Reference: Gazebo forum
Support exFAT File System in Ubuntu
If you have an USB drive with 32GB or less flash memory, it is high likely using FAT32 file system by default. One salient drawback of this file system is that the maximum file size is 4GB. If you have a 5GB ROS bag (logging data) locally on the robot, you cannot copy it to this USB drive.
The good news is you can format this flash drive into exFAT file system, which can support much larger size for a single file. However, this file system is not natively supported by Ubuntu 16.04. The solution is to install the following packages.
Reference: How to Mount an exFAT Drive on Ubuntu Linux
A stop job is running for Session c1 of user gdm (1min 30s)
This happens to Ubuntu 18 (and above probably) Linux OS. The shutdown process is not clean and the user has to wait 1min 30s for the shutdown process to complete. By playing with journalctl
, I was able to identify the daemon process is Xwayland.
The observed behavior is prevented if Xorg instead of Wayland is used for the login screen in gdm3. Therefore, edit section [daemon]
in /etc/gdm3/daemon.conf
as follows:
Reference: Stack Exchange, Debian Bug report logs
Shortcut Ctrl+Shift+E opens Emoji
This can happen on an Intel NUC computer when trying to split the window vertically in terminator
.
To change the OS' emoji picker shortcut, we can open the ibus-setup
GUI and setting a different shortcut under the Emoji
tab as described here.
Or you can do it on the terminal as described here. To completely disable the emoji picker shortcut, run:
(Deprecated) Debug Errors & Solutions
1. install pylint
When installing pylint
by sudo /usr/bin/python -m pip install pylint
, the error message is
solution: pip install --upgrade setuptools
When using RoboWare, we sometimes see the prompt message to remind us of installing pylint
. If click the install button, the command run by itself would be sudo /usr/bin/python -m pip install pylint
. This will install pylint
from pip
. Then you may see the other error message
This is because the package enum34
is managed by apt
rather then pip
. If you then try to uninstall enum34
in pip, you will see that many (103 on my computer) ROS packages will be removed at the same time, because these ROS Kinetic packages depend on this specific version of enum34
, and apt
will automatically manage these dependencies for you. So we cannot just simply uninstall or upgrade this package.
Given the fact that we cannot modify enum34
, how could we solve this problem? The solution could be a "detour" plan. That is to install pylint
directly from apt
rather than pip
, though pip
was run automatically by RoboWare.
To search which package to install: apt search pylint
. Then we can see three possible options: pylint
, python-pylint-common
, and python3-pylint-common
. The first one is good enough. Then just run sudo apt install pylint
. Done!
Finally, check if this package was installed successfully by pip list | grep pylint
.
2. python-environment-related problems
It is high likely that you are running a wrong version python other than required. Check your environment by
which python
which python3
which pip
which pip3
env | grep python
env | grep PATH
env | grep PWD
pip list | grep cflib
pip show cflib
pip3 show cflib
For example: in virtualenv
environment, running which pip
may return /home/username/venv/bin/pip
rather than /usr/bin/pip
.
For the error message above, the reason is that cfclient
is running a wrong version of numpy
library. A related discussion can be found in this issue in numpy
github repo.
This problem is due to the residual files of numpy
of version 1.15.4
, which should be clearly uninstalled before installing the 1.16.0
version.
Showing solution in code,
pip3 uninstall numpy
pip3 install numpy==1.15.4
would solve this issue.
Also, continuing to execute the following two lines would upgrade numpy
to 1.16.0
and cfclient
would still work.
pip3 uninstall numpy
pip3 install numpy
By exploring files in ~/.local
directory, we can see that when this issue happens, there is always a numpy-1.15.4.dist-info
directory in position ~/.local/lib/python3.5/site-packages
, no matter how you uninstall and reinstall numpy. However, after reverting to numpy of version 1.15.4
and uninstalling it, this directory goes away, and only the numpy-1.16.0.dist-info
directory left there.
3. ROS error in Python script
I am trying to do a five robot demo with crazyflies, but some of them failed and dropped to the ground. Then I powered off those failed robots and this error emerged. This is because the server cannot communicate with those powered off robots. This error then terminated the script and I lost control of all my robots.
Possible solutions:
Connect to a joystick and set up an emergency button, so than you will still have control of your robots when bad things happen.
Instead of solution (1), we can also directly send through command line
rosservice call /cf1/emergency
to shut down the robot. Also, it is doable to have a keyboard interface that sends takeoff, land, emergency, etc.Use a "try-except" structure in the Python script to handle (actually pass) these errors. Such that when error appears, the script can still continue running the remaining part.
4. ROS package dependency
This is due to the mismatched path or name in ROS packages. The solution is to upgrade all packages to the latest. This can be solved by
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Last updated